I have mobile and rails application. I wrote synchronization between both apps. On server app I have API. Mobile app send request I process all data and respond to mobile. My problem is that many times I have situations that user want to synchronize a lot of data and this process spend more. In these situations I exceed http response timeout and I got http errors. Best solution for me is to put whole synchronization algorithm to separate ruby worker. But in this case how to respond to mobile application. I would like to avoid that mobile will "bomb" server by requests like "Is synchronization over?". How to response with processed data? What is the best solution? Thanks for all answers
Edit:
I decided to use push notifications to inform mobile app that synchronization is over. Then mobile can send request http to the server.