Advice Needed. Is this possible?

Topics: CAB & Smart Client Software Factory
Oct 29, 2004 at 11:09 PM
originally posted by: JamesE

We have around 60 construction sites around the country that have their own LAN's (with various numbers of users, from around 4 to around 20), but they also have access to the local domain at our head office via a VPN connection. Some of the comm's are unreliable and speed is poor so we are intending to write a smart client app. The goal will be:

1. Allow the users to work on shared data on their LAN whilst the comm's to our head office are down.

2. Use a SQL-Server or MSDE database on their LAN (depending on the number of users) for the 'offline' data store.

3. Allow more than one construction site to share and work on the same data (some construction sites are in different locations, but there are no comms between them - only via our head office).

What would be better:

Option 1:
Have them work on a local database which synchronizes itself with the head office database. This kind of does away with the need for a smart client.

Option 2:
As suggested in the 'Smart Client Architecture Guide', use the Caching Application Block to cache data in a local SQL database? If we choose this architecture, can users on the construction site LAN's still share the cached data?

Option 3:
Any suggestions?


Thanks in advance...

James E
Nov 8, 2004 at 3:49 PM
originally posted by: Ansari

James,

Here are my thoughts on your needs (Ofcourse with quite a lot of assumptions I have made)

>> Allow the users to work on data while communication to the head office is not possible
(So you need a data store which synchronizes data across sites and makes it available to the clients/ group of clients who can work off this local data store say at a local site - I would say this is a primary requirement)

IMHO I think an approach for this is to keep all relevant sharable data stored in a centralized data mart from where clients make calls and maintain this data locally (at the machine level or at the local office's data store).

The choice of whether you want to maintain your local data at the machine level or at the network's central point (a site level sql server which replicates itself at intervals from the central data store) depends on what the end user of your application would do; will the user be working at HIS/HER data or site level data. If its going to be in the form of end user contextual data then it makes sense to have the data at the machine level rather than at the site level data store.

I have this experience that the key pain point in a smart client application is that of how well you keep data on the client side upto date or in sync with the central data store.

Going the way as you suggested of having Sql / MSDE databases running off your local site offices sounds good to me because I believe you would rely on the replication features of Sql Server to maintain data in sync with the central data store and it also becomes a way to cache data and making it available to the clients at the local offices.

But I am not sure how much of a pain it would be once your 60 odd local offices start upward synchornization of data back to the central server I suspect that you may end up with too much of conflicting information back at the centralized data store.

I am elaborating an approach that has been working quite well for me below...
Have a central database (probably at the head office) implement services surrounding it to pull/push data from anywhere; The services should be smart enough to do transaction management (more about why a few sentences later).

Clients would make calls to these services at intervals and download/upload chucks of relevant data which would be required by the client and save locally(after this point it doesn't matter if the services are available over the network or not, the client already has data which it needs to work with). During updates when the client would make calls to the services to update data on the centralized server the client should pass information which would allow the services to accept or reject data depending on whether the updates are being done to the data which is latest from the server or else reject the data as the client was manipulating stale information from his side. (Client X updated data on the client which is stale - he didnt happen to update whats latest on the server which otherwise would lead to overwriting or losing changes made by another client Y)

HTH,
- Teucer -
Nov 10, 2004 at 6:33 AM
originally posted by: JamesE

Teucer,

that is a great help, thanks. You're quite right about thinking about thinking about it in terms of whether the users are working at user or site level - I hadn't really thought of it like before.

I guess that really makes the decision for me....I need to use an MSDE/SQL db at the sites and let that Sync with the head office DB. I guess it also makes sense because we want to also develop an interface for PDA's...so I suppose I could use SQL CE for those?

Thanks for your help.

James E