I'm developing some internal testing apps using RhoMobile, and so far, i've alredy synced my backend database server with a simple RhoMobile app that allows basic interaction. I've also set up a push server, and managed to successfully push messages, but I'm not sure what the right approach should be when it comes down to transparently syncing (and not beeing so dependant on user's manually clicking the sync action):
1. I've tried forcing a sync when RhoConnect wants to create, update or delete stuff in the backend database (under the create, update and delete methods), but two problems arise:
- I want to ping every user registered, but in the documentation, I only find how to push a single user (by its id, or by "current_user"). Is this posible? I'm also trying to use :push_notify: 'true' on the desired sources under settings.yml, but it seems to have no effect.
- In the client side, I want to force a sync when new data is entered, updated or created in the local database, so the server gets the update, and pings the other devices. I do this with RhoConnectClient.doSyncSource(...), but it fails a throws a error when the terminal doesn't have network connectivity. Is there a way to "queue" sync's, so they get done later or when network connectivity is back? Is there any documentation on error handling?
2. There are also other software's that interact with the backend database. What should be the correct approach?
- Server-side: use the poll_interval in settings.yml (Seems to have no effect, what am I doing wrong?).
- Client-side: use the REST interface to force sync's on the Redis database.
Thanks for your time!