1
I have a process that makes a match between the items[books, movies, music and games] of a particular user on Facebook with the items registered in my database. The problem is that the whole process takes around 18~25 seconds and would not want to leave the user waiting that time.
I was thinking as soon as the user logs in with their Facebook account, shoot like a thread(I don’t even know if it’s possible in Ror) and redirect it to the root_path
and when the process ended presented in a div
some message.
How this should be done in Ruby On Rails, ie there is some Gem for that purpose or some good practice for that?
Thank you in advance..
Why not use ajax? It is already asynchronous (client-side), and on the server side represents only one more request.
– bfavaretto
I could even use Ajax, but I don’t know how it works when switching pages...
– Vitor Vezani