8 Replies Latest reply on Mar 6, 2014 8:14 AM by Ruben Ruben

    Redis master document inconsistent with SQLite and backend data servers

    Ruben Ruben



      I'm working on a software for a handheld computer that needs to sync data with our backend server.

      Our backend runs a REST service that uses JSON to accept and return data. I've configured RhoConnect according to the documentation, and i've found some behaviour that i'm not quite sure is expected:


      If I update an existing record synced from our backend and push the changes to the RhoConnect server, the changes get send to our backend REST service correctly, but seem to have no effect on the RhoConnect Redis DB. If I connect to the RhoConnect web admin page, I still see the data prior to the update.


      This has the side effect that until the poll_interval is reached in the source adapter, there is a data inconsistency: If I sync another device with the same user (i'm using "user partitioning"), the new device gets the data prior to my update, and I get two devices, supposedly synced but with different data.


      I've succesfully reproduced the issue with the rhostore example in the documents. If you want to try it yourself:


      1. Create a RhoConnect project and add a source adapter for Products

      2. Create a RhoMobile app and add a model for Products (dont forget to enable sync for the model).

      3. Run the RhoMobile app & Sync data

      4. Change any attribute, for example, Brand name

      5. Push changes



      As expected, you will see your changes appear in http://rhostore.herokuapp.com . BUT until poll_interval interval is reached (and a sync is done clientside), if you check your rhoconnect's master document for that user/source combination, it will still show the brand name prior to the update.


      Is this expected? Is there anyway to avoid this? Is it same to reduce poll_interval to 0?