Databases Reference
In-Depth Information
Designing an application for performance becomes much more important for cloud computing solutions that
depend on remote storage. For more information on these topics and more, see Chapter 9.
Data Synchronization
There are two primary ways to synchronize data with SQL Database: the Microsoft Sync Framework and the SQL Data
Sync service. The Microsoft Sync Framework offers bidirectional data-synchronization capabilities between multiple
data stores, including databases. SQL Data Sync uses the Microsoft Sync Framework, which isn't limited to database
synchronization; you can use the framework to synchronize files over different platforms and networks.
Specifically, as it relates to SQL Database, you can use the Microsoft Sync Framework to provide an offline mode
for your applications by keeping a local database synchronized with a SQL Database instance. And because the
framework can synchronize data with multiple endpoints, you can design a shard, described in detail later, in which
all database instances keep their data in sync transparently.
The SQL Data Sync service provides a simpler synchronization model between on-premise SQL Server
databases and SQL Database, or between SQL Database instances. Since this service runs in the cloud, it is ideal for
synchronizing cloud databases without having to install and configure a service on-premise.
Direct vs. Serviced Connections
You may also consider developing Azure services to keep the database connection to a local network, and send the
data back to the client using SOAP or REST messages. If your Azure services are deployed in the same region as your
SQL Database instances, the database connection is made from the same datacenter and performs much faster.
However, sending data back to the consumer using SOAP or REST may not necessarily improve performance; you're
now sending back XML instead of raw data packets, which implies a larger bandwidth footprint. Finally, you may
consider writing stored procedures to keep some of the business logic as close to the data as possible.
Figure 2-2 shows the two different ways an application can retrieve data stored in a SQL Database instance.
A direct connection can be established to the database from the application, in which case the application issues
T-SQL statements to retrieve data. Alternatively, a serviced connection can be made by creating and deploying
custom SOAP or REST services on Windows Azure, which in turn communicate to the database. In this case, the
application requests data through web services deployed in Azure.
Figure 2-2. Data connection options
 
Search WWH ::




Custom Search