Resources   /   Blogs

Offline Form Access – The Most Effective Weapon in Your App Development Armory!

According to the ‘Internet and Mobile Association of India’, internet penetration in urban India was recorded at 64.84 %, while in semi-urban and rural areas, that statistic stood at a meager 20.26 percent. Though digitally divided, the internet challenges faced by the urban & semi-urban, rural areas are very much the same.
 
In urban areas with internet access, seamless connectivity is still an achievable but a far-fetched dream. In semi-urban cities and towns, connectivity is notoriously unstable and the bandwidth quite limited.
 
Now imagine that an organization is looking to digitize its existing array of paper-based forms or undergoing a digital transformation journey. You, as a business leader, devise an exhaustive plan for the application: you focus on solving a business problem, jot down a rough scope and think about optimization. You procure a mobile device with this application and hand it over to the field agent.
 
A field: marked with an unstable & poor internet connection and limited bandwidth. Imagine the horror, then, when the field agent has captured page after page of user information and upon submitting gets an error ‘Failed to Submit due to limited/No internet’. Not too hard to imagine, is it? In fact, most applications/mobile forms run only when there’s an active internet connection and stop working when there’s none.
 
You faltered on one point. The application was built to rely heavily on seamless data connectivity. One of the most important features to look for while evaluating vendors for your digital transformation journey is the offline capabilities of the proposed solution.


 
Offline Sync –The Battle with Connectivity

With Streebo DXA or Streebo Mobile Forms, you get ‘Offline Sync’ as an inbuilt feature in the end application. I will try to explain how that works.
 
So, let us say that the application has just been initialized in the system with no over-head memory or cache storage. Once the app is initialized and the identity of the user is verified, it asynchronously caches all the service calls and the data in the local DB of the device.

 

Handling Form Data – The Online-Offline Chronicles!

Now whenever you try to access a page/form in the application, it halts and says: ‘Alright! I’ll do what you’ve asked me to but Am I connected to the internet?’ If the answer is ‘Yes’ to that question, i.e. the device has internet access, the application checks with the server if there have been any changes in that page/form since the last sync.  If there has been a change, it will incrementally store and update the cache and render the same on the front-end.
 
If there hasn’t been any change, however, since the last sync, which is verified by comparing the timestamp field, the device refers to the previously stored cache in the local DB. So you can say that the UI Is being referred from the local DB.
 
In case the device is offline, it simply refers and renders the UI from the local copy of the DB, providing a similar experience as if it is online.
 
Alright, you say, I, now have a basic idea of how the UI is being rendered, but what about the data in the application that the field agent might fill? How do you handle that?
 
The answer: All Streebo mobile applications are powered by IBM MobileFirst platform. And the IBM MobileFirst platform comprises of a light-weight, client-side data storage system called the JSONStore: the protagonist in the offline story. We leverage the JSONStore in order to capture all the data which is submitted when the device is offline or does not have a conducive bandwidth to relay the information back in the database. The data in the JSONStore is stored, as you might have rightly guessed, in a JSON format. The JSONStore can account for as many entries which were submitted while the device was offline. If there are multiple users using the same device to submit the records in the system, it creates a separate instance of the JSONStore for each user.
 
Security Saga: Fortifying the Application!

‘It stores my data, you say, but what about security? Is my data really ever secure?’ The answer is: Your data is always secure. We leverage the AES 256 encryption algorithm in order to encrypt and decrypt the data: both at the client side and the server side and irrespective of the fact that the device is online or not.
 
Alright, now we have captured all the data in the JSONStore, but how do you sync it back in the database, when the device comes back online? And what if there are multiple users who come back online at the same time? How does it handle concurrency? For that, we again utilize the capabilities of IBM’s DB2 database manager which places locks on buffer pools, tables, data partitions, table blocks, or table rows, to ensure that this mammoth volume of data is automatically synced seamlessly back into the system. In case of multiple users using the same device, only the JSONStore of the user who has arrived online – is synced back in the system. In case there is an error in synchronizing the data back in the system, it relays the same to the user and continues to maintain a copy of the records in the device. The user can choose to sync it back manually, in case the algorithm falters. As soon as it verified that the data is successfully synced back in the system, the device deletes all the records in the JSONStore for that user.
 
The ‘offline sync’ is built-in all the Streebo proposed solutions and does not have to be separately purchased.

 

About Streebo!

Streebo is a consulting and product company, with a client base that includes medium and large enterprises from across the globe. Leveraging IBM software platforms like IBM MobileFirst, Streebo, helps enterprises modernize their processes and build intuitive forms with offline functioning capabilities. Streebo’s mobile forms builder is changing the way enterprises capture, store and manage data easily through unique digital experiences, while also increasing productivity and optimizing business outcomes.

04 January, 2019

Related Posts