Synchronization at the speed of light

by Matteo Sirri on 10/09/2013

The ability to operate offline may be the most important feature of a mobile app, and to achieve it you have to synchronize all data between the server and the device. Instant Developer greatly simplifies development of this feature: simply use a component based on Document Oriented classes shared between the server application and the client application, so that synchronization is reduced to implementing a few events.

The JavaScript portion of the framework takes care of keeping the SQLite database consistently up-to-date, in a fully transparent way for the user. The only snag is that, as in most mobile apps, this operation blocks the user interface: although it’s not a problem in most cases, when there’s a sizable quantity of data to transfer and without optimizations from the developer, standard operations could require a wait of several minutes.

A few months ago we showed you a possible route to speed up synchronization: populate the server-side database and then restore it on the client side. But the proposed solution still didn’t satisfy us: we wanted more. So we thought about a new type of synchronization managed by the native part of the application.

The new native synchronization delivers many advantages:

  • it’s faster than JavaScript synchronization;
  • it’s transparent to the developer and there’s no need to change the code;
  • it can also function in asynchronous mode.

This new feature is active by default in offline applications compiled with Instant Developer 12.5, and can be disabled using the SyncService.NativeSync property. To capitalize on this in your apps, all you have to do is recompile them with the new version. The only hitch is that if you want to use Caravel, you’ll have to wait for version 2.5 to be released on the stores, but don’t worry: that will happen soon.

Aren’t you curious to recompile your apps to see how much faster they are?

Leave a Comment

Previous post:

Next post: