|
YOUR FEEDBACK
Did you read today's front page stories & breaking news?
SYS-CON.TV
|
TOP THREE LINKS YOU MUST CLICK ON Solutions The Pitfalls of Creating Data in an Occasionally Connected Application
The offline Web – introduced complexity
By: Eric Farrar
Aug. 3, 2008 09:00 AM
Up until recently, Web applications were "connected-only" applications. Users could only use the application by connecting to the central server and all data access was done in a single place. For many years, people accepted that was the limitation of Web applications. But it isn't a limitation any longer.
Migrating your "connected-only" application to an "occasionally connected" application will likely require significant architecture changes to facilitate the change tracking and conflict detection needed for synchronization. It's extremely important that all the architecture changes are considered, and that a synchronization strategy is designed carefully from the start. To illustrate the complexities that occasionally connected applications bring, and to exhibit the sort of architecture changes that may be required, this article will focus on only one problem: How do you create and uniquely identify data that's created while offline? While this is among the simplest of the synchronization problems that you'll encounter, it provides an excellent example of the changes you must consider when designing occasionally connected applications. Why Good Old Auto-Increment Isn't Enough To show why it doesn't work, consider an application that lets multiple users share a single contact list between them. The master version of the contact list resides on the central server, and a copy of that list is stored in the local database of each user's application. Assume that two users, User A and User B, synchronize their contact list with the server at the beginning of the day and then proceed to work offline. Later, while working offline, each user adds a new contact to his application. What value should they use as a primary key? Auto-incrementing seems to work fine on the server, so what happens if auto-increment is used in the offline applications? The answer: collisions. LATEST AJAXWORLD RIA STORIES
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
|
SYS-CON FEATURED WHITEPAPERS MOST READ THIS WEEK |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||