Blog
Sybase Unwired Platform – Synchronization Models: What suits you?
By Bhavna Bharti on 13th January, 2012 in Mobility
The Sybase Unwired Platform (SUP) is a Mobile Enterprise Application Platform (MEAP) for mobilizing enterprise data from backend systems to mobile devices such as smartphones and tablets. Having been around for quite some time, SUP came into the limelight when SAP acquired Sybase in May 2010 and began promoting it as the new SAP mobile platform going forward.
With mobility fast becoming a key focus area for many organisations around the globe, some concepts that are unique to mobility need to be considered when deciding on a mobility solution. One such consideration is data Synchronization.
Most of you already understand what we mean by the term “Synchronization”. To the benefit of those who don’t, let me give you a simple example: There is data in the backend system which has been sent to the device, now when this data changes/updates or new data is created on either end, data needs to be synced so there are no discrepancies between the backend system and the device.
This is called Synchronization.
Synchronization in SUP can be achieved in two ways
SUP supports two kinds of Synchronization techniques:
- Replication Based Synchronization (RBS)
RBS is based on the technique of issuing a pull from the device to fetch the data from the Cache DB on the SUP server (This is where all data from the backend system is replicated by the SUP server and cached to be sent to the device). This can either be achieved through a user initiated data pull or a timed pull depending upon the nature of the data and replication requirements. A third option known as the “Poke-Pull” model can also be used where a notification is sent to the device to initiate the data pull.
- Message Based Synchronization (MBS)
MBS is based on the technique of a push from the backend, so whenever there is a data change in the backend system, it is always pushed out to the device.
A mobile application can be either message-based or replication-based, but cannot be both at the same time. A package of mobile business objects (MBOs – are Data Objects created by SUP to model your backend data) can be deployed as either message-based or replication-based.
Efficiency and Data considerations
RBS is efficient in situations when your device stays in offline mode most of the time, so that when there is a connection you can synchronize with the backend data. It is also very efficient with bulk transactional data which can be uploaded in a single sync.
MBS is very good for devices in online or connected mode, as they keep receiving instantaneous updates. Each transaction is however considered as a single message so it is not very efficient for bulk data.
Another big difference between RBS and MBS is freshness of data. With MBS this is considerably high as updates are received as soon as your device comes online or a data connection is restored.
With RBS, unless the device initiates a sync, the data on the device will not be updated and will retain an old state which over time will become inconsistent with the backend.
SUP and Devices
Well the device is also a concern because SUP does not support RBS and MBS for all client devices e.g. iPhone/iPad (iOS clients) only support MBS and not RBS, whereas Blackberry(RIM) on the other hand only supports RBS.
Staging of data
With RBS, data that is to be mobilized is copied to a consolidated database on the SUP Server before sending it out to the device. This is known as Data Staging and results in Data being stored on a Cache Database (CDB) on the SUP server. An architectural requirement is needed for this synchronization model. For MBS, data staging is optional.
Device Registration
With the RBS model, device registration with the SUP server is implicit, meaning the first time the device connects to the SUP server it gets registered, whereas with MBS the device has to be explicitly registered at the SUP server before it tries to connect.
Summary
The points discussed above constitute some key differences between these two techniques. So based on the enterprise requirements, a careful decision needs to be made as to which of these techniques to adopt, and what the device supports.
To sum up both techniques have their pros and cons, so depending upon the data and the device, the enterprise has to take a balanced decision on which technique to use with SUP, because this is a very important initial step towards building applications with SUP.
