On Nov 4, 2013, at 2:42 AM, Sur Max <sur....@gmail.com> wrote:

> @Fahim
> 
> In my opinion memcached is not a suitable tool for the purpose you've 
> mentioned. In fact it'd be waste of resources in such a case.
> I would go for processing that thing in background using any of the available 
> gem for processing the background job.
> Showing an interim screen to the user mentioning that your uploaded file is 
> being processed and process it in background with the help of ActiveRecord + 
> DelayedJob.
> 

I tend to agree. ActiveRecord does not do well for mass insert/updates, and 
better to offload this task and not keep the Rails stack busy with it.

I also wouldn’t hold up the user with a wait screen. I’d put a little indicator 
in an area that shows the processing is being done but does not restrict 
further use of the site, except for that new data. When the background 
processing is finished, the indicator can be removed.

> 
> On Monday, 4 November 2013 00:26:08 UTC+5:30, Fahim Patel wrote:
> Thanks for reply. 
> @josh - So you are saying that we can validate request on memcache level 
> also. Please correct me If I am wrong ?
> 
> 
> On Sunday, November 3, 2013 1:46:20 AM UTC+5:30, Fahim Patel wrote:
> Hi All ,
> 
> Can we validate request input data using memcache ? Actually I am facing 
> scenario in which user uploading CSV file which can have hundreds of rows and 
> to validate each row using ActiveRecord taking long time.
> 
> I have below question:-
> 
> 1. So can we cache our validation rule in memcache ?
> 2. If it is possible to store validation rules in memcache but can I able to 
> perform
> validation check ?
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to rubyonrails-talk+unsubscr...@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/rubyonrails-talk/70f5120b-b8f2-4726-8467-586edaf2873f%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/D7B94C1C-51CA-4556-8065-2378811B70B3%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to