Resco Mobile CRM: Difference between online and offline mode (a technical deep dive) – Part 1/3

Resco MobileCRM is a mobile client for Microsoft Dynamics CRM server able to work in either online or offline mode.

Desktop CRM users will typically intuitively understand the online mode – they will expect similar experience as when sitting behind a remote terminal unit.

However, the offline mode is conceptually harder and one is not quite sure what to expect. Hopefully, you’ll get a better picture after reading the following lines.

Actually I’ll start by explaining the online mode first.

Imagine this model situation: You open Mobile CRM client, open the accounts list, scroll the list to locate the account of interest, do some editing and save the account changes.

What do you think happens in background? (I mean the communication with the server.)

  1. A connection is established.
    This is actually a conversation, where the client introduces the user and asks the server to create a connection to a particular organization.
    The created connection will be used for subsequent communication and will automatically close after a period of inactivity. (In which case the connection will have to be re-established again later – can happen during the steps 2-4.)
  1. Next, the client asks for one page of “brief” accounts.
    A page means approx. 20 items. As you scroll down the list of accounts, additional pages are requested.
    “Brief” means that only selected account properties are requested – those that are shown in the list.
  1. When the user clicks a concrete account in the list, another server request is made. This time the server has to deliver the complete information for the selected account.
  1. Finally, when the editing is over and the user taps the save button, MobileCRM sends the changes to the server and waits for the server to respond with either ok or an error message.

Let’s think how the scheme changes if the CRM client is in offline mode.

(a) The offline client downloads a subset of the CRM Dynamics server database to a local (device) database. As part of this process all accounts for which the logged user has read permissions will be stored on the device.

(b) The user starts to use/edit downloaded data.

  1. The account table in the database is opened and one page of (brief) accounts is read.
    Again, as you scroll down the list, additional pages are read.
  1. When the user opens the account, full account data is loaded from the database.
  1. When the editing is done, the changes are saved to the database.

Additionally the account record is marked as “dirty” (this information is stored in the change log) so that the change can be eventually sent to the server sometime in the future.

(c) Once upon a time the user has to synchronize the local device with the server.

As part of this process the changes done by the user (stored in the change log) are uploaded to the server and eventual new data is downloaded from the server and stored locally.

How can we compare the two models?

Online mode resembles the work of a web browser, but it is a bit more complex. While the browser only gets the screens (i.e. html code), the CRM client gets the data and has to construct the screens itself.

One big difference between both modes immediately pops up – the data treatment.

The offline model keeps the data in the local database; hence the data loading/storing is fast and presents no problem at all. What is difficult – is the (occasional) synchronization between the local and remote databases.

The online mode uses a remote database (located at the server), hence all data operations are slow, costly and potentially risky (depends on quality of the Internet connection). So we have a few characteristics of the online mode:

  • Increased Internet traffic (the same data is sent again and again)
  • Sub-optimal UI responsiveness
  • Occasional connection problems
  • Shorter battery life
  • An advantage of the online mode is that it basically does not need any synchronization.*)
    *) The statement is a bit misleading. The online mode needs to synchronize to download the customization (I.e. the application setup).

While the most readers will intuitively understand the above differences, hardly anybody will imagine how inefficient the client-server communication is.

Here is a small illustration:

When the server sends the information about when a particular record was created, it actually sends xml text like this:

<b:KeyValuePairOfstringanyType>

<c:key>createdon</c:key>

<c:value i:type=”d:dateTime” xmlns:d=”http://www.w3.org/2001/XMLSchema”>2014-05-19T15:35:37Z</c:value&gt;

</b:KeyValuePairOfstringanyType>

 Compare to this string carrying identical information:

createdon=2014-05-19T15:35:37Z

In other words, the CRM Dynamics protocol used for the client-server communication is extremely bloated. (Typically 90% of the data sent is an overhead.)

Luckily, this bloated protocol is wonderfully compressible; hence it does not impact the Internet traffic that much. However, the device battery will feel increased data processing.

What about the application responsiveness?

As a rule of thumb, the user of the online client will perceive similar response times as on the web browser.

Getting one server response (many screens need multiple requests) will usually take 0.1-0.5 sec, occasionally more and exceptionally you will wait a lot longer only to receive broken connection error.

Offline client will typically show no delays at all.

 

Click here to continue reading on how Resco Mobile CRM implements the offline mode (part 2/3). In here, I’ll talk about SyncFilters, conflict resolution and security of locally stored data.

5 thoughts on “Resco Mobile CRM: Difference between online and offline mode (a technical deep dive) – Part 1/3

  1. Pingback: Resco Mobile CRM: How Resco implements the offline mode (a technical deep dive) – Part 2/3 | resco.net

  2. Pingback: Resco Mobile CRM: Synchronization (a technical deep dive) – Part 3/3 | resco.net

  3. Pingback: Major pitfalls of custom app development for Dynamics CRM | resco.net

  4. Pingback: First Glance At Dynamics CRM 2016 - Surviving CRM

  5. Pingback: First Glance At Dynamics CRM 2016 - Microsoft Dynamics CRM Community

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s