1 / 38

Occasionally Connected Smart Clients PRS034

Occasionally Connected Smart Clients PRS034. Steve Lasker Program Manager Microsoft Corporation. Agenda. Resources for working offline Occasionally Connected Systems Common Architecture Demo Scenario Demo Architecture Embedded/Local Database Options Sync Options Application Updates

toshi
Download Presentation

Occasionally Connected Smart Clients PRS034

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Occasionally Connected Smart Clients PRS034 Steve Lasker Program Manager Microsoft Corporation

  2. Agenda • Resources for working offline • Occasionally Connected Systems Common Architecture • Demo Scenario • Demo Architecture • Embedded/Local Database Options • Sync Options • Application Updates • Running Background Tasks Asynchronously

  3. What is: Occasionally Connected Empowering users to leverage their computer, applications, data and files regardless of network availability Application proactively retrieves necessary data necessary to work offline As the network comes available, the application will automatically sync their work and log conflicts for the user to resolve Network operations occur in the background so the user can stay focused on their task Example: Outlook 2003

  4. Resources needed offline • Data • A subset of the data from the server(s) • Heterogeneous Sync (SQL, Oracle, DB2, …) • Files • Not all data exists within the database • Media files, Office Files, … • Application Messaging (Web Services, Indigo, …) • Ability to queue outbound messages • Ability to async process inbound messages • Read Only Informational/Reference Data Services • Ability to pre-fetch data from existing services

  5. Visual Studio Microsoft Windows / Windows Mobile OCS Components Occasionally Connected Smart Client Smart Client Application / UI Background Tasks Canned UI Controls Data Sync Services File Sync Services Embedded API Network Resources Message Queuing Message Caching Embedded Data Store Files Application Updates

  6. Occasionally Connected Architecture Smart Client Data Center Logic Indigo Queue Transport Logic Accounting UI Indigo Cache Sales Logic Background Tasks Logic Rules Rules Network Resources Logic Inventory Logic Rules Sync Embedded Data Store Sync Client Fulfillment App Updates App Deployment Logic Files Rules

  7. Adventure Works Sales • Field Sales • Multi-level marketing • Consumers sell Adventure Works Products • Need for the app to run disconnected • Sellers are independent • Hardware not owned by Adventure Works • Many platforms • Browser • Desktop • Tablet PC • Pocket PC • Smart Phone

  8. AdventureWorks Sales App

  9. Adventure Works Sales Architecture Weather Services Adventure Works Corp Adventure Works Sales Smart Client Background Tasks Desktop TabletPC PocketPC Smart Phone Sync Services Sync Services App Logic Data Server Weather Caching Embedded Data Store Network Services Order Services Order Submission Queue PromoVideos • Product Catalog • My Customers • Order Scratchpad • My Inventory App Updates

  10. Which local data store? MS Database Technologies • SQL Server 2005 • SQL Workgroup 2005 • SQL Express 2005 • SQL Mobile 2005 • Jet (Access) • Fox • Excel • XML • Something new

  11. Occasionally Connected Devices • Servers • Desktops • Laptops • Tablet PC’s • Windows CE • Pocket PC • Smart Phone ? Sweet spot Win 32

  12. MultiUser Single User Scenarios Local Database Options Server (1000’s of users) SQLServer Workgroup (Dozens of users) Desktop (Single User) SQL Express Laptop Tablet PC Win 32 Windows CE Device SQL Mobile Pocket PC Smart Phone

  13. SQL Express w/Sync • SQL Express now has User Instance features • Great for VS Development • Connect w/File Path Connection String • Merge Replication not supported w/User Instances

  14. Deploying SQL Express for OCS • Add DBO Privileged Account • Script creation of database • Verify / Create / Attach database at startup • Deploy SQL Replication .Dlls

  15. Configuring SQL Express w/Merge Repl

  16. Deploying SQL Mobile • SqlMobile Engine: • Add runtime dlls to project (sqlce*.dll) C:\Program Files\Microsoft Visual Studio 8\Common7\IDE • Set files to Copy to Output Directory = Copy if newer • ADO for SqlMobile: • Add reference to Microsoft SQL Mobile • Located in: C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PublicAssemblies\System.Data.SqlServerCE.dll

  17. Deploying SQL Mobile

  18. How - To Cache • Roll your own • Ultimate in flexibility • Highest cost to develop and maintain • RDA • Easy entry point for well partitioned data, no config to database • Limited to SQL Mobile • Merge Replication • Most power, broadest features for different data partitions, spans all devices • Need DBO/DBA privileges, must “own” server • Transactional Replication • Primarily targeted towards server to server replication scenarios. Good for regional distribution but not great for occasionally connected scenarios

  19. Configuring Merge Replication

  20. Remote Data Access (RDA)

  21. App Updates w/ClickOnce • ClickOnce Background API’s • Imports System.Deployment.Application.ApplicationDeployment • … • CurrentDeployment.Update()

  22. App Updates - ClickOnce

  23. Background Tasks • Code running on background threads • Watching for Network Resources • Sending Orders • Looking to sync • Pre-Fetching Weather Information

  24. Background Tasks

  25. Data Designers & Occasionally Connected Systems Discussions:http://blogs.msdn.com/SmartClientData Data Runtime:http://msdn.Microsoft.com/Data/ Windows Forms: http://www.WindowsForms.net Patterns & Practices: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag/html/SCAG.asp Resources

  26. Community Resources • At PDC • For more information, go see • Tue 1pm & 4:15pm PRS402 Windows Forms: Harnessing the Power and Flexibility of Windows Forms 2.0 • Thur 11:30am PRS321Windows Forms: Integrating Windows Forms and Windows Presentation Foundation ("Avalon") • Fri 1pm FUN222Windows Vista: What’s New in Software Installation for Windows Vista: Exploring the Windows Installer (MSI) and ClickOnce Options • Labs: • FUNHOL15 ClickOnce Deployment • PRSHOL17 New UI Features in Windows Forms • PRSHOL18 New Data Features in Windows Forms • PRSHOL19 Windows Forms: Advanced Layout • Ask The Experts • After PDC • MSDN dev center: http://msdn.microsoft.com/windowsforms/ • MSDN Forums: http://forums.microsoft.com/msdn/default.aspx?ForumGroupID=2

  27. Questions, Contact, and More Info SteveLas@Microsoft.com http://blogs.msdn.com/SmartClientData

  28. © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

  29. Existing Architectures

  30. Standalone Application Evolution Local Data App UI Validation Logic DAL Local Database Central Database

  31. Data Island  Shared Data • Users lose offline functionality • Applications aren’t typically written with multi-user in mind • Rearchitecture typically required to make multi-user

  32. Orders Customers DataSets over Web Services Smart Client Accounting SELECT *FROM Customers Logic Controls Web Service Validation Logic* Sales Web Service Client Logic Logic Rules Inventory Logic XML XML Rules Fulfillment Logic Rules

  33. DataSet Caching • Excellent for serialization and change tracking • Contain different views of the same data • Storage is based on XML / Binary • Querying requires loading the entire dataset into memory * • Updating the local dataset requires loading the entire dataset into memory • Transaction support * • Query processor * • No canned, E2E, sync technology • Has change tracking w/DataAdapters • XML DiffGram based

  34. Customers Orders Message Based Queuing / Caching Smart Client Accounting SELECT *FROM Customers Logic Controls Service Validation Logic* Sales Logic Service Client Logic Rules Inventory Service Cache Logic Rules Fulfillment Logic Rules

  35. Message Based Caching • Similar to DataSet Caching • Blobs are now stored in queues • No ability to query on uncommitted data

  36. Logical Queuing • Sending mail in outlook • Pressing send a little too quickly • Submitting Expense Reports • Found a receipt in the bottom of your bag

  37. Logical Queuing

  38. Sync Components Occasionally Connected Systems Services Sync Groups Sync Group Items Database Items File Items Message Items Message Pre-Fetch Items App Update Items

More Related