Crosslight Sync Service Has Just Got Even More Powerful, And Smarter.
In my previous blog post, I have covered many enhancements we’ve made to the push notification service which we will ship in this month’s update, including the introduction of new push registration service, and bunch of improvements in notifications for Apple platforms. But that’s not all. This update will also include major improvements to synchronization service, form builder, and support for more enterprise application scenarios.
Over the past few months, our team has been busy improving the overall stability of synchronization service, in addition to implementing new exciting features requested by our customers. In this post, I will share what you can expect about data sync service in this update.
In a nutshell, Crosslight Sync Service is part of Crosslight Enterprise App Framework which enables developers to easily add two-way data synchronization functionality targeting multiple platforms including iOS, Android, and Windows. The sync service leverages multiple Crosslight technologies to achieve high-performance data sync, including comprehensive integration with push notifications, background service, app’s life cycle, as well as local data storage and Crosslight Entity Services in the server-side. To learn more about how data sync works in Crosslight, please head to Data Synchronization topic in our Developer Center.
In this post, I presume that you’re already familiar with Crosslight sync service. I’d like to share what’s new in sync service introduced in this update.
Performance and Stability Improvements
When speaking of data sync, one of the most important aspects is its stabiilty and reliability, in addition to performance, of course. That’s why we decided to spent some time to revisit our data sync architecture and improve it further to meet today’s demanding cross-platform apps. First, we tweaked the overall performance by eliminating unnecessary processes in the client-side. In addition, the sync process will no longer have chance for re-entry if an existing session is in progress asynchronously.
The entire changes detection mechanism have been much improved, including new entities processing and updated entities processing. Pending changes made during offline have also been ensured to sync perfectly when online. In the sync’ed device, the updated entities are not only reflected in the list view, but also in the editing view — thanks to the smart merging feature of Crosslight’s entity manager.
To make it easier to understand how data sync works, I have prepared some animated clips using two iPhones. The sample app was installed on both devices, with push notification enabled. Changes on the right device will automatically sync to the left device in near real time — and more importantly — with ultra-smooth animation. See the clip below to get a clearer picture.
Synchronizing Deleted Entities
The deletion support, new in this release, is now fully supported in Crosslight sync service. To allow deleted entities to be detected and sync’ed back to other clients, the data needs to remain in the database physically even after deleted. One of the most efficient way to determine the deleted records is to introduce a new boolean field, typically called IsDeleted, which will be set to true in the case of deletion. Called “logical delete”, Crosslight now fully support this feature in both runtime and designer level. At the simplest, you just need to specify the logical delete column in the Crosslight Entity Designer in Visual Studio. This will automatically enable delete support in the sync service.
The video below shows how deleted entities sync works.
As seen above, the item in the left device will be smoothly removed from the list as the sync service detects the deletion from the server. Although the clip uses only two devices for demo purpose, the sync service works consistently with any number of devices — across multiple platforms.
Smarter User Experience
The sync service is not just about data management. In fact, the user experience must be thoughtfully designed to give an intuitive feedback in response to the data sync. Otherwise, users might be looking at a record no longer exist in the server. Fortunately, the enhanced Crosslight App Framework have got you all covered. The latest update now includes automatic delete detection in both editor and list view.
When the edited item was deleted due to sync, the editing form will be automatically closing.
Likewise, if the app is showing a list of tasks which project has just been deleted, Crosslight now automatically navigate back to the parent view.
And to make it more complex, we even tried to edit a task in one device, then delete its owning project on other device. The result is simply consistent and reliable. It just works!
With these smart features built right out-of-the-box, the apps you built on Crosslight App Framework will enjoy these features as soon as you apply this new update.
To test drive the new features as seen in the above videos, please download the updated OSSyncSampleFromPNS sample in enhanced-push-sync branch.
That’s not all. In the next post, I will cover many more new stuff that we plan to make available this month.