次の方法で共有


Windows Azure Sync Service Sample Available for Download

The Windows Azure Sync Service Sample is a complete sample that shows you how to extend the reach of your data to anyone that has an Internet connection. The sample uses Microsoft Sync Framework 2.1 deployed to a Windows Azure Hosted Service, so your data extends even to users who have a poor or intermittent connection because the data needed by the user is kept on the user's local computer and synchronized with the server database only when needed.

Download: https://j.mp/bibIdl.

The typical scenario for this sample is when you have data that is stored in a SQL Azure database and you want to allow remote users to have access to this data but you don't want to allow users to connect directly to your SQL Azure database. By creating a middle tier that runs as a Windows Azure Hosted Service, client applications connect to your hosted service, and the service connects to your SQL Azure database, providing a layer of security and business logic between the client and the server. Client applications can create a synchronization relationship with your server database, take their data offline, and synchronize changes back to the server database when a connection is available. In this way, client applications operate seamlessly even when the Internet connection is unreliable.

Why Deploy to Windows Azure Hosted Service?

Deploying Sync Framework in a middle tier component as a Windows Azure Hosted Service gives the following benefits:

  • Security: No need to allow users direct access to your SQL Azure database. You control the middle tier, so you control exactly what flows in and out of your database.
  • Business rules: The middle tier allows you to modify the data that flows between the server database and the client, enforcing any rules that are peculiar to your business.
  • Ease of connection: The hosted service in this sample uses Windows Communication Foundation (WCF) to communicate between the client and the middle tier component, allowing a flexible and standard way of communicating commands and data.

The sample is a 3-tier application that includes these components:

  • SyncServiceWorkerRole: a Windows Azure worker role that runs in the middle tier. This component handles the majority of synchronization operations and communicates with the web role component by using a job queue and blob storage.
  • WCFSyncServiceWebRole: a Windows Azure web role that runs in the middle tier combined with a proxy provider that runs in the client application. This component uses WCF to communicate between the proxy provider on the client and the web role on Windows Azure, and communicates with the worker role component by using a job queue and blob storage.
  • ClientUI: a Windows application that you use to establish a synchronization relationship between a SQL Server Compact database and the SQL Azure database. This component uses WCF to communicate with the web role component.

For a complete walkthrough of the sample, see Walkthrough of Windows Azure Sync Service Sample.

Comments

  • Anonymous
    October 07, 2010
    Nice one. Any updates on an potential sync provider for azure tables ?

  • Anonymous
    October 12, 2010
    Hi Clement, Sorry we do not have any plans to create a sync provider for azure tables that we can talk to at this time. Liam

  • Anonymous
    October 19, 2010
    This example does not work for me. Whenever I open the solution, Visual Studio 2008 freezes, presents the following error and crashes without me being able to do anything: "A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Shared Memory Provider, error: 40 - Could not open a connection to SQL Server)" I have SQL Server 2008 Express R2 installed. But I would think that such an example should not crash just because some server isn't there - before even running the example This means I cannot even get to point (3) of your build guide. Any clues? Regards

  • Anonymous
    January 13, 2011
    Will this sample work unchanged in MS SyncFx CTP 4.0 or are there changes needed? Thanks, Scott