Hidden Treasure : The Disconnected Service Agent Application Block




Currently I am designing casually connected (offline) solutions for both desktop applications and Windows Mobile.

Store and Forward

Part of the solution requires that requests can be submitted and queued for execution when the network (or the resource you’re being disconnected from) is available.  This has traditionally been known as “Store and Forward”.  These mechanisms can be seen in every day desktop applications such as Microsoft Outlook or in traditional enterprise products such as MSMQ.

As a product developer, customers have an expectation that the product works immediately, “out of the box”, with few dependencies and little configuration.  The difficulty with using MSMQ is that it can be problematic to setup.

To address the simpler “Store and Forward” requirement, the Patterns and Practices team created the original “Smart Client Offline Application Block“.    Recently I spent a great deal of time learning and converting this to .net 2.0, only to discover that it has been superceded (somewhat) by the “Disconnected Service Agent Application Block”.

Disconnected Service Agent Application Block

This is a nicer (in my opinion) implementation of the original OAB which is part of both the Smart Client Software Factory and the Mobile Smart Client Software Factory.  It uses the latest version of the Enterprise Library and seems easier to use.  Annoyingly the guidance and recipes provided only seem to work if you’re creating a CAB (Composite Application Block) application, but the Quickstarts make up for this.

It appeals to me as I can use the same solution in both desktop and mobile applications.


By default the application block is dependent on SQL Server CE.  This may have licensing implications.  Fortunately this is abstracted away behind the IRequestQueue interface, which isn’t too hard to implement.  I’m not sure which way I personally will go yet.

Interestingly it has generic proxies to invoke both WCF and traditional Web Services, “Out of the Box”.

So how do I get it?

The Disconnected Service Agent Application Block is only available as part of the download of the Smart Client Software Factory.  The main point of this software factory seems to be as a vehicle for CAB.  (read about it’s future here)   Interestingly DSAAB is independent of CAB.  (That’s the way I may use it). 

Currently it’s only downloadable on it’s own.

Orcas Sync Services

Visual Studio 2008 contains a sophisticated online/offline solution called “Sync Services”.  Currently it seems to me this is only oriented toward database synchronization, which is a different solution to the one DSAAB covers.  Take a look at Nick Randolph’s blog entries on this here

The code of the libraries is quite simple regardless, so I think the solution will continue to work for a long time to come.

What else?

I’ll post some simple code samples of using DSAAB using VB in future posts.



5 responses »

  1. Pingback: A Simple Example of a Disconnected Service Agent in VB « An Original Idea

  2. I think the term you are really chasing is “occasionally connected” applications. As you pointed out I’ve posted a few times on the merits of such applications, the MCSF and Sync Services.

    There is a relatively new community portal for Sql Server Compact Edition (http://www.sqlserverce.org) that actually has a FAQ for both SSCE and Sync Services. Unfortunately I have only just managed to get back to them to update them with the latest info out about both.

    w.r.t. SSCE there are a few hidden treasures coming in v3.5 which is due for shipment with VS2008 in particular around large database sizes and transactions!

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s