Rails+Dropbox Sync Architecture -


Tracks 4, Ruby 2

The railway app I have a sink does here user data with Dropbox how to sink current flows:

  1. what is your updated_flag set the record in MySQL and sink it need to?
  2. Okay, now we have to sync a database records that need to be synced.
  3. Repeat this list and make a dropbox API call. We upload / merge these records one at a time.
  4. & lt; Data crushing sound & gt;
  5. Well, Reset updated_flag for each record for each record has been synced to Dropbox.
  6. Done!

    This works when the user imports a bunch of new data (thousands of records), this process is very slow - so slow that the process time of the Unicorn Eliminates and kills.

    If you are familiar, then I am still using the same data architecture in a web app. So

    I'm concerned: However, I want it to sink to the user clicks the "Sync" at the prompt, you need to use some kind of background to this whole operation needed? Or is there a more efficient way to take action on these so that a single HTTP request timeout is not finished to sync because it is cranking through hundreds of questions?

    OK, because nobody else is screaming, what I am giving is learned as an answer Am

    Yes, a background procedure is required to do these. Some sync tasks may include hundreds of questions, and they can currently start with a single HTTP request. They will not end in time before Unicorn Times (60 seconds), hence the delayed job (or similar) is required here.

Comments

Popular posts from this blog

sonata admin - how to add ManyToOne property field in configureListfield in sonataAdmin -

wpf - ControlTemplate with changes for every class -

sql - Return Function using Cursor -