<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Steve Lasker's Web Log - www.SteveLasker.com/Blog : OCS</title><link>http://blogs.msdn.com/stevelasker/archive/tags/OCS/default.aspx</link><description>Tags: OCS</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Demos, Presentations, Links, Screencasts and Videos for SQL Server Compact</title><link>http://blogs.msdn.com/stevelasker/archive/2008/11/25/demos-presentations-links-screencasts-and-videos-for-sql-server-compact.aspx</link><pubDate>Wed, 26 Nov 2008 00:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9142840</guid><dc:creator>Steve.Lasker</dc:creator><slash:comments>8</slash:comments><comments>http://blogs.msdn.com/stevelasker/comments/9142840.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stevelasker/commentrss.aspx?PostID=9142840</wfw:commentRss><description>&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 12"&gt;&lt;meta name="Originator" content="Microsoft Word 12"&gt;&lt;link href="file:///C:%5CUsers%5CSTEVEL%7E1.RED%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 
  
  
 
&lt;/xml&gt;&lt;![endif]--&gt;&lt;link href="file:///C:%5CUsers%5CSTEVEL%7E1.RED%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;link href="file:///C:%5CUsers%5CSTEVEL%7E1.RED%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 
  Normal
  0
  
  
  
  
  false
  false
  false
  
  EN-US
  X-NONE
  X-NONE
  
   
   
   
   
   
   
   
   
   
   
   
   
  
  
  
   
   
   
   
   
   
   
   
   
   
   
  
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
 
&lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt;

&lt;/style&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
	{mso-style-name:"Table Normal";
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-priority:99;
	mso-style-qformat:yes;
	mso-style-parent:"";
	mso-padding-alt:0in 5.4pt 0in 5.4pt;
	mso-para-margin-top:0in;
	mso-para-margin-right:0in;
	mso-para-margin-bottom:10.0pt;
	mso-para-margin-left:0in;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;p&gt;I often find it hard to find my own demos scattered
throughout my blog, so figured I'd just create a single posting that had all my
current demos and powerpoints.&lt;/p&gt;&lt;h1&gt;Recent Presentations at PDC and Tech Ed&lt;br&gt;&lt;/h1&gt;&lt;p&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 12"&gt;&lt;meta name="Originator" content="Microsoft Word 12"&gt;&lt;link href="file:///C:%5CUsers%5CSTEVEL%7E1.RED%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 
  
  
 
&lt;/xml&gt;&lt;![endif]--&gt;&lt;link href="file:///C:%5CUsers%5CSTEVEL%7E1.RED%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"&gt;&lt;link href="file:///C:%5CUsers%5CSTEVEL%7E1.RED%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 
  Normal
  0
  
  
  
  
  false
  false
  false
  
  EN-US
  X-NONE
  X-NONE
  
   
   
   
   
   
   
   
   
   
   
   
   
  
  
  
   
   
   
   
   
   
   
   
   
   
   
  
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
 
&lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt;

&lt;/style&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
	{mso-style-name:"Table Normal";
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-priority:99;
	mso-style-qformat:yes;
	mso-style-parent:"";
	mso-padding-alt:0in 5.4pt 0in 5.4pt;
	mso-para-margin-top:0in;
	mso-para-margin-right:0in;
	mso-para-margin-bottom:10.0pt;
	mso-para-margin-left:0in;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	mso-bidi-font-size:10.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;/p&gt;&lt;p&gt;&lt;a href="http://steve.lasker.members.winisp.net/Presentations/SQLServerCompactHighLevel.pptx"&gt;&lt;b&gt;SQL Server Compact Overview (lots of demos with
supporting slides)&lt;/b&gt;&lt;/a&gt;&lt;b&gt;&amp;nbsp; &lt;br&gt;
&lt;/b&gt;This was a very demo heavy deck with supporting slides.&amp;nbsp; Covers
many of our SQL Server Compact goals and non-goals, including the tooling
scenarios, split between VS and Management Studio.&amp;nbsp; Slides and demo on
ASP.NET soft block, programming models with DataSet and SqlCeResultSet.&amp;nbsp;
(This deck was before we had LINQ to Entity support available).&amp;nbsp; Covers a
quick overview of optimized online, offline enabled architectures, with demos
of Sync Services for ADO.NET, including 2 tier and N Tier.&amp;nbsp; Then wraps up
with Logical Queuing as the overall architecture for client based apps.&amp;nbsp; I
had a lot of fun with this presentation, but it was hard to fit in an hour.&lt;/p&gt;

&lt;p&gt;&lt;br&gt;
&lt;a href="http://steve.lasker.members.winisp.net/Presentations/TechEdEMEA08UnlockingThePowerOfCompact.pptx"&gt;&lt;b&gt;Unlocking the Power of SQL Server Compact (Tech Ed
EMEA 08)&lt;/b&gt;&lt;/a&gt;&lt;b&gt;&lt;br&gt;
&lt;/b&gt;Covered several topics, such as the questions on how fast can SQL
Server Compact insert data.&amp;nbsp; For Tech Ed EMEA, I added the section
discussing stored procedures, and how a common DAL layer can actually provide
more functionality than sprocs for both local data and server data. (yes, I'm
sure there will be lots more to debate on this topic, but here's our thought
process J)&lt;/p&gt;

&lt;p&gt;With some coverage on private deployment, including 64bit,
deep dive on perf and the managed sprocs demos, I bubbled back up to cover
several interesting aspects for using SQL Server Compact, including a
TraceListener to capture information from the field and sync it back with Sync
Services for ADO.NET.&amp;nbsp; Then covered read only databases on DVD's and using
Compact as a custom Document format.&lt;/p&gt;

&lt;p&gt;&lt;i&gt;&lt;u&gt;Associated Demos:&lt;/u&gt;&lt;/i&gt;&lt;/p&gt;

&lt;ul type="disc"&gt;&lt;li&gt;&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/SQLcePerformance.zip"&gt;SQL Server Compact Bulk
     Insert Performance Test Harness (Compares Compact &amp;amp; Express)&lt;/a&gt;&lt;br&gt;
     Demonstrates the power of an embedded database and how much faster it can
     run than SQL Server for many operations.&amp;nbsp; By implementing a few
     things, such as "connection pooling" and caching your SqlCeCommand
     objects, you can achieve similar functionality provided by SQL Server's
     connection pooling and Query Plan caching.&amp;nbsp; However, because Compact
     is "in-proc" with your application, you can get the benefits of not having
     to work through additional networking, process and security layers
     required by SQL Server which is designed to work over the network.&lt;/li&gt;&lt;li&gt;&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/ManagedSprocs.zip"&gt;Managed Stored
     Procedures (A Common DLL for data access to Compact and SQL Server)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/SqlServerCeTraceListener.zip"&gt;SQL Server Compact Trace
     Listener&lt;/a&gt;&lt;br&gt;
     Demo for using Compact as a TraceListener to capture the output of
     System.Diagnostics.Trace.WriteLine and then synchronize that info back to
     the server providing visibility into what's happening out on the
     client.&amp;nbsp; This deck includes animation, which looks a bit like Missile
     Command, demonstrating how this sample works.&lt;/li&gt;&lt;li&gt;&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/RunFromReadOnlyMedia.zip"&gt;Running Compact from
     Read Only Media (DVD, CD, Locked USB Key)&lt;/a&gt; &lt;/li&gt;&lt;li&gt;&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/RecipeManager.zip"&gt;Using Compact as a
     Custom Doc Format (Recipe Manager)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;

&lt;p&gt;&lt;a href="http://steve.lasker.members.winisp.net/Presentations/TechEdEMEA08ScriptBasedDeployment.pptx"&gt;&lt;b&gt;Managing and Versioning Client Databases (Tech Ed EMEA
08)&lt;/b&gt;&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Discusses the pros and cons of managing database deployment
on the client.&amp;nbsp; Why deploying databases as files, through MSI's, ClickOnce
or other technologies can be easy for V1, but could lead to data loss in
V2.&amp;nbsp; Why a little investment up front can yield you productive results
long term, and make for a better user experience.&lt;/p&gt;

&lt;p&gt;&lt;i&gt;&lt;u&gt;Associated Demos:&lt;/u&gt;&lt;/i&gt;&lt;/p&gt;

&lt;ul class="unIndentedList"&gt;&lt;li&gt;
&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/CreatingDatabaseSchemaInCode.zip"&gt;Creating
&amp;amp; Managing Local Database Versions through Scripts&lt;/a&gt; &lt;br&gt;
When deploying applications with a local database, deploying the database with
the app can seem easy at first, but once the user starts making changes to the
local database, it gets messy quickly. If you're not careful, you can
even lose the local data created/updated by the user. In &lt;a href="http://steve.lasker.members.winisp.net/Presentations/TechEdEMEA08ScriptBasedDeployment.pptx"&gt;this
presentation&lt;/a&gt;, I created several animated slides that explain the
complications and why script based deployment and versioning is the only
practical way to manage local databases. This sample walks through the
creation and versioning of local tables. To focus on the script based
versioning aspects, I excluded any interaction with synchronized tables as that
just gets even more complicated.&lt;/li&gt;&lt;li&gt;
&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/VersioningSchema.zip"&gt;Versioning
Local Databases with Scripts when using Sync Services for ADO.NET&lt;/a&gt;&lt;br&gt;
In this demo we see how to version schemas when using Sync Services for
ADO.NET. This includes two projects. One for the initial
installation of V1, and another for the upgrade, or initial creation of
V2. V1 includes creating a set of tables that aren't synchronized, such
as state management for submitting orders to an existing service. Once sync
completes, there are a set of additional scripts to create foreign keys between
the synched tables, and between the synched tables and the local tables.&lt;br&gt;
V2 enhances the synchronized tables with additional columns. The setup of
this demo is a bit more complex as I've configured the server side sync
components in a dll, then hosted the dll in a WCF Web Project. The WCF
Web Project is published to an IIS instance, but uses different sub
directories: for V1-http://localhost/VersionSchema/&lt;b&gt;V1/&lt;/b&gt;LookupSyncService.svc,
for V2-http://localhost/VersionSchema/&lt;b&gt;V2/&lt;/b&gt;LookupSyncService.svc.
Using this versioning scheme we can publish V2, allowing apps to slowly migrate
over to V2, while the V1 apps continue to function and the business continues
to function. The animation in this &lt;a href="http://steve.lasker.members.winisp.net/Presentations/TechEdEMEA08ScriptBasedDeployment.pptx"&gt;presentation&lt;/a&gt;
helps explain this somewhat complex subject. &lt;/li&gt;&lt;/ul&gt;



&lt;h1&gt;&lt;b&gt;Just the demos, and nothing but the demos...&lt;/b&gt;&lt;/h1&gt;

&lt;ul class="unIndentedList"&gt;&lt;li&gt;
&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/SqlServerCeTraceListener.zip"&gt;&lt;b&gt;SQL
Server Compact Trace Listener&lt;/b&gt;&lt;/a&gt;&lt;b&gt;&lt;br&gt;
&lt;/b&gt;Demo for using Compact as a TraceListener to capture the output of
System.Diagnostics.Trace.WriteLine and then synchronize that info back to the
server providing visibility into what's happening out on the client. &lt;a href="http://steve.lasker.members.winisp.net/Presentations/TechEdEMEA08UnlockingThePowerOfCompact.pptx"&gt;This
deck&lt;/a&gt; includes animation, which looks a bit like Missile Command,
demonstrating how this sample works.&lt;/li&gt;&lt;li&gt;
&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/SQLceUnderASPnet.zip"&gt;&lt;b&gt;Using
SQL Server Compact under ASP.NET&lt;/b&gt;&lt;/a&gt;&lt;br&gt;
Demonstrates how to "unblock" SQL Server Compact for usage under ASP.NET.
I discussed our reasoning in this &lt;a href="http://blogs.msdn.com/stevelasker/archive/2006/11/27/sql-server-compact-edition-under-asp-net-and-iis.aspx"&gt;post&lt;/a&gt;.
A quick recap: The reason we blocked Compact for ASP.net scenarios was simply
to not set expectations Compact is meant to be a replacement for SQL
Server. It performs better than Jet. For the most part, we
unblocked it for pre-building a SQL Server Compact database for sync scenarios
where it's faster to download the database as a stream, then to sync the
initial snapshot of data. It's also perfectly fine for small websites or
other services. The main intention is strictly to make sure developers
know, this is not meant to compete with SQL Server. There are coding
differences between Compact and SQL Server, so we really didn't want developers
to start with Compact, only to later find out it doesn't scale to thousands of
concurrent website/service users for updating data. As long as developers
understand the scope, it's perfectly fine to use for ASP.NET, WCF, or other
service scenarios...&lt;/li&gt;&lt;li&gt;
&lt;b&gt;SqlCeResultSet Demos - Scrollable,
Updateable, ISAM like cursors&lt;br&gt;
&lt;/b&gt;Demonstrates how developers can take advantage of embedded a database
directly into your app. The best thing about the SqlCeResultSet is it
works directly over the data in your local database. No queries that
bring the results into another copy in memory that you must mange potential
conflicts with the local store, or potential conflicts between the local store
and the remote server. With the SqlCeResultSet you can scroll directly
over the local table, even setting the index to filter and order the rows
you're viewing. The SqlCeResultSet is a scrollable, updateable cursor and
can really improve the perf and overall working set of your application. &lt;/li&gt;&lt;ul&gt;&lt;li&gt;
&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/SqlCeResultSet.zip"&gt;&lt;b&gt;Direct
Access (ISAM) with the SqlCeResultSet&lt;/b&gt;&lt;/a&gt;&lt;b&gt;&lt;br&gt;
&lt;/b&gt;Why do we need to make copies of the data, update it, then send it
back? In a shared database environment, where you're likely connecting to
the database across the network, and sharing with potentially thousands of
others, because it's the only way we can scale. However, when the
database is local, in-proc with the app, things can be much simpler. In
this demo, you can easily update data, and as soon as you move off the row,
it's committed to the database. To get the most of this demo, run the
same app twice (CTRL+F5). Make changes in one of the instances, move off
the row. In the other instance, move to the row that was just updated,
(note: if you're already on the row, you'll need to move off then back).
You'll see the change made by the other app and can make the change back.
The one piece missing from this scenario is an implementation of eventing so
that instance 2 would see the changes made by instance one. This is why
you must move off, then back to the row to see the change. As you move
across the rows, the DataGridView requests the data. The data is fetched
directly from the local database/table.&lt;/li&gt;&lt;li&gt;
&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/SQLceISAM.zip"&gt;&lt;b&gt;Another
ISAM/SqlCeResultSet demo&lt;/b&gt;&lt;/a&gt;&lt;br&gt;
In this demo we see how the index can be set to control the order of the data.
Using a system view, we can populate the ListBox with the list of potential
indexes. As you change the index, the view is updated to reflect the data
sorted by that index. What isn't covered in this demo is the ability to
"filter" the values using the SqlCeCommand.SetRange() api which uses the index
to directly filter the visible rows.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;
&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/SQLcePerformance.zip"&gt;&lt;b&gt;SQL
Server Compact Bulk Insert Performance Test Harness (Compares Compact &amp;amp;
Express)&lt;/b&gt;&lt;/a&gt;&lt;b&gt; &lt;br&gt;
&lt;/b&gt;Demonstrates the power of an embedded database and how much faster it can
run than SQL Server for many operations. By implementing a few things,
such as "connection pooling" and caching your SqlCeCommand objects, you can
achieve similar functionality provided by SQL Server's connection pooling and
Query Plan caching. However, because Compact is "in-proc" with your
application, you can get the benefits of not having to work through additional
networking, process and security layers required by SQL Server which is designed
to work over the network.&lt;/li&gt;&lt;li&gt;
&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/SQLce3264.zip"&gt;&lt;b&gt;Privately
deploying both the 32 and 64bit versions of SQL Server Compact with your app&lt;/b&gt;&lt;/a&gt;&lt;br&gt;
Do your users know whether they have 32bit or 64bit machines? If they are
64bit, are they running a 64bit version of the OS? Should they have to
figure this out? Using private deployment, developers can include both
the 32 and 64bit versions of Compact so the user never has to make a choice.
Yes, it's a bit more k to include in your app, but if it "just works", is that
a small price to pay?&lt;/li&gt;&lt;li&gt;
&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/RunFromReadOnlyMedia.zip"&gt;&lt;b&gt;Running
Compact from Read Only Media (DVD, CD, Locked USB Key)&lt;/b&gt;&lt;/a&gt;&lt;b&gt; &lt;/b&gt;&lt;br&gt;
Ever get a CD or DVD in the mail. Pop it in the drive to see what's on
it, and it prompts you to install some software - yikes! Let's see if you
can use this as a Frisbee and get it in the trash across the room, J With this demo, you can deploy a large
amount of content, but stored in a Compact database so your users can run the
app, search the data, and with private deployment, you can include the Compact
engine so your users can "view the data" without having to install
anything. &lt;br&gt;
The demo is simply an extension of private deployment, but modifies the
connection string to tell Compact to open the database in ReadOnly mode, and
specifies a temp directory: &lt;br&gt;
connStr = String.Format("Data Source = {0}\Northwind.sdf;Mode = Read
Only;Temp Path={1} ", Windows.Forms.Application.StartupPath,
My.Computer.FileSystem.SpecialDirectories.Temp)&lt;/li&gt;&lt;li&gt;
&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/RecipeManager.zip"&gt;&lt;b&gt;Using
Compact as a Custom Doc Format (Recipe Manager)&lt;/b&gt;&lt;/a&gt;&lt;b&gt; &lt;/b&gt;&lt;br&gt;
Need to save data from your app in a "document"? Want to post that
"document" to a SharePoint site or email it to another team member? Want
to double click your document and launch the associated app? Since SQL
Server Compact uses a single file, code free, file format, and since it doesn't
care what extension you use, developers can use custom extensions for the
database file to launch their app. In this demo I use Click Once
enhancements in .NET FX 3.5 SP1 to associate the custom extension with my
ClickOnce installed application.&lt;/li&gt;&lt;li&gt;
&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/ManagedSprocs.zip"&gt;&lt;b&gt;Managed
Stored Procedures (A Common DLL for data access to Compact and SQL Server)&lt;/b&gt;&lt;/a&gt;&lt;b&gt;
&lt;br&gt;
&lt;/b&gt;The great debate will forever continue on the debate of sprocs and its
religion or science. I wrote about this &lt;a href="http://blogs.msdn.com/stevelasker/archive/2008/02/11/stored-procedures-and-sql-server-compact-the-great-debate.aspx"&gt;here&lt;/a&gt;,
but rather than debate the topic, here's a sample that shows how you can write
a common data access layer to target against SQL Server (Express included) and
Compact (SQLce) As outlined in &lt;a href="http://steve.lasker.members.winisp.net/Presentations/TechEdEMEA08UnlockingThePowerOfCompact.pptx"&gt;this
presentation&lt;/a&gt;, you can get far better scalability from your database by
moving the logic out of the database as you can create several front end
services to a single database, but you can only scale up a database so far
before you need to scale out, which today is a difficult task.&lt;/li&gt;&lt;li&gt;
&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/LogicalQueuing.zip"&gt;&lt;b&gt;Logical
Queuing&lt;/b&gt;&lt;/a&gt;&lt;br&gt;
In a service oriented world, is it really practical to assume all "services"
can be synchronized? Or, is it a mixture of synchronizing some data, and
submitting to existing, non synchable services that really touches on
reality? In this demo, associated by this &lt;a href="http://blogs.msdn.com/stevelasker/archive/2007/08/21/sync-services-forado-net-and-sql-server-compact-presentation.aspx"&gt;blog
post&lt;/a&gt;, I demonstrate why using a database as your "queue" to services
provides much more practical and realistic methods for working with existing
services than expecting all the existing services to rev to support
"sync". Sync is a very important technology, but no one technology
serves all. In this &lt;a href="http://blogs.msdn.com/stevelasker/archive/2008/10/18/evolution-or-revolution-for-moving-to-offline-architectures.aspx"&gt;blog
post&lt;/a&gt; I noted down some thoughts, but not as polished as I was hoping to
post.&lt;/li&gt;&lt;li&gt;
&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/ExcelWorkbook.zip"&gt;&lt;b&gt;Using
Compact within Excel&lt;/b&gt;&lt;/a&gt;&lt;b&gt; &lt;br&gt;
&lt;/b&gt;Ginny Caughey and I co-presented at Tech Ed US in 08. Ginny assembled
some great demos on using SQL Server Compact within VSTO, particularly within
Excel. &lt;/li&gt;&lt;li&gt;
&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/DatabaseViewer.zip"&gt;&lt;b&gt;Database
Viewer&lt;/b&gt;&lt;/a&gt;&lt;b&gt; &lt;/b&gt;&lt;br&gt;
Every wanted to just look inside a SQL Server Compact Database, but didn't want
to install Visual Studio or SQL Server Management Studio Express? With
this little utility you can see the list of tables, and the data within each
table. Not a full featured app, but rather a utility I use to show
encryption or the ability to open a database across multiple users. It
does show how to query the system views to get the list of tables.&lt;/li&gt;&lt;li&gt;
&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/CreatingDatabaseSchemaInCode.zip"&gt;&lt;b&gt;Creating
&amp;amp; Managing Local Database Versions through Scripts&lt;/b&gt;&lt;/a&gt;&lt;b&gt; &lt;br&gt;
&lt;/b&gt;When deploying applications with a local database, deploying the database
with the app can seem easy at first, but once the user starts making changes to
the local database, it gets messy quickly. If you're not careful, you can
even lose the local data created/updated by the user. In &lt;a href="http://steve.lasker.members.winisp.net/Presentations/TechEdEMEA08ScriptBasedDeployment.pptx"&gt;this
presentation&lt;/a&gt;, I created several animated slides that explain the
complications and why script based deployment and versioning is the only
practical way to manage local databases. This sample walks through the
creation and versioning of local tables. To focus on the script based
versioning aspects, I excluded any interaction with synchronized tables as that
just gets even more complicated.&lt;/li&gt;&lt;li&gt;
&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/VersioningSchema.zip"&gt;&lt;b&gt;Versioning
Local Databases with Scripts when using Sync Services for ADO.NET&lt;/b&gt;&lt;/a&gt;&lt;b&gt;&lt;br&gt;
&lt;/b&gt;In this demo we see how to version schemas when using Sync Services for
ADO.NET. This includes two projects. One for the initial
installation of V1, and another for the upgrade, or initial creation of
V2. V1 includes creating a set of tables that aren't synchronized, such
as state management for submitting orders to an existing service. Once sync
completes, there are a set of additional scripts to create foreign keys between
the synched tables, and between the synched tables and the local tables.&lt;br&gt;
V2 enhances the synchronized tables with additional columns. The setup of
this demo is a bit more complex as I've configured the server side sync
components in a dll, then hosted the dll in a WCF Web Project. The WCF
Web Project is published to an IIS instance, but uses different sub
directories: for V1-http://localhost/VersionSchema/&lt;b&gt;V1/&lt;/b&gt;LookupSyncService.svc,
for V2-http://localhost/VersionSchema/&lt;b&gt;V2/&lt;/b&gt;LookupSyncService.svc.
Using this versioning scheme we can publish V2, allowing apps to slowly migrate
over to V2, while the V1 apps continue to function and the business continues
to function. The animation in this &lt;a href="http://steve.lasker.members.winisp.net/Presentations/TechEdEMEA08ScriptBasedDeployment.pptx"&gt;presentation&lt;/a&gt;
helps explain this somewhat complex subject. &lt;/li&gt;&lt;/ul&gt;





























&lt;p&gt;&lt;strong&gt;·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/strong&gt;&lt;a href="http://steve.lasker.members.winisp.net/Demos/TechEdEMEA07/Express/ExpressScriptDeploy.zip"&gt;&lt;b&gt;Deploying
Express with Scripts&lt;/b&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Similar to the Compact deployment model, but with the
additional steps required to create the physical mdf/ldf combination.&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul class="unIndentedList"&gt;&lt;li&gt;
&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/CompactEntityProviderPrivateDeployment.zip"&gt;Private
Deployment using the ADO.NET Entity Provider&lt;/a&gt;&lt;br&gt;
One of the most popular features of SQL Server Compact is its ability to
privately deploy the Compact runtime as a set of dlls directly within your
application. But when using the ADO.NET Entity framework, things get a
little more difficult as the Entity Framework uses the Provider Factory model
for loading the individual data providers. I discussed this in more
detail in &lt;a href="http://blogs.msdn.com/stevelasker/archive/2008/10/22/privately-deploying-sql-server-compact-with-the-ado-net-entity-provider.aspx"&gt;this
post&lt;/a&gt;, but here's a sample showing how to include the dlls and changes in
app.config to work properly. &lt;/li&gt;&lt;li&gt;
&lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/CommonDataDeviceDesktop.zip"&gt;Common
Programming between Desktop &amp;amp; Device&lt;/a&gt; &lt;br&gt;
While SQL Server Compact provides the same apis between desktop and device
(.NET Framework and the .NET Compact Framework), it can get a little more
complex as the surrounding apis, such as the lack of the |DataDirectory| macro,
and the lack of settings make it more difficult. This project shows a
strategy for filling in the missing pieces of the .NET Compact framework so you
can compile the same sourcecode for desktop, then device.&lt;/li&gt;&lt;/ul&gt;



&lt;h1&gt;Other interesting
links to previous posts:&lt;/h1&gt;

&lt;ul class="unIndentedList"&gt;&lt;li&gt;
&lt;a href="http://blogs.msdn.com/stevelasker/archive/2006/04/10/SqlEverywhereInfo.aspx"&gt;Information
about SQL Server Compact Edition (SQLce) &lt;/a&gt;- the original post when we
unlocked SQL Server Mobile for desktop usage&lt;/li&gt;&lt;li&gt;
&lt;a href="http://blogs.msdn.com/stevelasker/archive/2006/07/06/SQLServerEverywhereDeploymentOptions.aspx"&gt;Screencast
of Deployment Options for SQL Server Compact&lt;/a&gt; - shows how to deploy Compact
privately. This has changed now that we've incorporated 64bit deployment
as well, so suggest you also look at: &lt;a href="http://blogs.msdn.com/stevelasker/archive/2008/10/22/privately-deploying-sql-server-compact-with-the-ado-net-entity-provider.aspx"&gt;Privately
Deploying SQL Server Compact with the ADO.NET Entity Provider&lt;/a&gt;&lt;/li&gt;&lt;li&gt;
&lt;a href="http://blogs.msdn.com/stevelasker/archive/2006/07/07/SqlServerEverywhereResultSet.aspx"&gt;ADO.net
Programming options for SQL Server Compact&lt;/a&gt; discussion of DataSets,
SqlCeResultSet, and the pending LINQ programming models (this was originally
posted before we launched VS 2008)&lt;/li&gt;&lt;li&gt;
&lt;a href="http://blogs.msdn.com/stevelasker/archive/2006/11/08/comparing-sql-server-express-and-compact-editions-whitepaper.aspx"&gt;Comparing
SQL Server Express and Compact Editions Whitepaper&lt;/a&gt; - an older, but still
relevant and accurate discussion Mike Wachal and I put together describing the
pros and cons of each engine&lt;/li&gt;&lt;li&gt;
&lt;a href="http://blogs.msdn.com/stevelasker/archive/2006/11/13/doc-storage-in-sqlce-and-the-4gb-limit.aspx"&gt;Doc
storage in SQLce and the 4gb limit&lt;/a&gt; a bit of discussion on why we have a 4gb
limit, and how this is a technical, not business reason. At some point,
in a future version/incarnation of SQL Server Compact, we will remove this
limitation.&lt;/li&gt;&lt;li&gt;
&lt;a href="http://blogs.msdn.com/stevelasker/archive/2006/11/14/bill-vaughn-writes-an-ebook-on-sql-server-compact-edition.aspx"&gt;Bill
Vaughn writes an eBook on SQL Server Compact Edition&lt;/a&gt; - A good, cheap, quick
book to get you started&lt;/li&gt;&lt;li&gt;
&lt;a href="http://blogs.msdn.com/stevelasker/archive/2006/11/27/sql-server-compact-edition-under-asp-net-and-iis.aspx"&gt;SQL
Server Compact Edition under ASP.net and IIS&lt;/a&gt; - why is this blocked by
default?&lt;/li&gt;&lt;li&gt;
&lt;a href="http://blogs.msdn.com/stevelasker/archive/2007/03/18/QAforOCS_2D00_SyncServicesForAdoNet.aspx"&gt;Q&amp;amp;A
on OCS &amp;amp; Sync Services for ADO.NET&lt;/a&gt; - an initial discussion on the
positioning of Sync Services for ADO.NET, RDA and Merge Replication. This
was posted prior to us announcing the Sync Framework. &lt;/li&gt;&lt;li&gt;
&lt;a href="http://blogs.msdn.com/stevelasker/archive/2007/03/21/additional-q-a-on-the-visual-studio-orcas-sync-designer.aspx"&gt;Additional
Q&amp;amp;A on the Visual Studio Orcas Sync Designer&lt;/a&gt; - Additional information
on the VS 2008 Sync Designer, including what it does and doesn't attempt to
solve.&lt;/li&gt;&lt;li&gt;
&lt;a href="http://blogs.msdn.com/stevelasker/archive/2007/03/22/first-look-at-the-visual-studio-orcas-sync-designer.aspx"&gt;First
look at the Visual Studio Orcas Sync Designer&lt;/a&gt; - A screencast showing how to
use the VS 2008 Sync Designer&lt;/li&gt;&lt;li&gt;
&lt;a href="http://blogs.msdn.com/stevelasker/archive/2007/03/23/going-n-tier-w-wcf-synchronizing-data-using-sync-services-for-ado-net-and-sql-server-compact-edition.aspx"&gt;Going
N Tier w/WCF, Synchronizing data using Sync Services for ADO.NET and SQL Server
Compact Edition &lt;/a&gt;- A screencast showing how to take the default "2
tier" configuration to "N-Tier"&lt;/li&gt;&lt;li&gt;
&lt;a href="http://blogs.msdn.com/stevelasker/archive/2007/05/14/empowering-your-users-with-reference-data-and-knowledge.aspx"&gt;Empowering
your users with reference data and knowledge&lt;/a&gt; - A discussion related to
whether it's realistic to assume we can implement a common programming model
between the server and local database (regardless of whether you use Express or
Compact locally)&lt;/li&gt;&lt;li&gt;
&lt;a href="http://blogs.msdn.com/stevelasker/archive/2007/08/07/configuring-visual-studio-2005-for-use-wtih-sql-server-2005-compact-edition.aspx"&gt;Configuring
Visual Studio 2005 for use with SQL Server 2005 Compact Edition &lt;/a&gt;- SQL
Server Compact 3.1 shipped just after VS 2005 SP1. So how do you get
these working together?&lt;/li&gt;&lt;li&gt;
&lt;a href="http://blogs.msdn.com/stevelasker/archive/2007/08/10/notification-to-pull.aspx"&gt;Notification
to Pull&lt;/a&gt; - A bit of an architectural conversation on where Sync, existing
services, queuing, and local data fit into an application architecture.
The demo for this discussion is &lt;a href="http://steve.lasker.members.winisp.net/Demos/SQLce35/LogicalQueuing.zip"&gt;here&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;
&lt;a href="http://blogs.msdn.com/stevelasker/archive/2007/08/30/sql-server-compact-3-5-features.aspx"&gt;SQL
Server Compact 3.5 Features&lt;/a&gt; - A quick recap of what shipped in Compact 3.5&lt;/li&gt;&lt;li&gt;
&lt;a href="http://blogs.msdn.com/stevelasker/archive/2008/02/11/stored-procedures-and-sql-server-compact-the-great-debate.aspx"&gt;Stored
Procedures and SQL Server Compact - the Great Debate&lt;/a&gt; - the title says it
all&lt;/li&gt;&lt;li&gt;
&lt;a href="http://blogs.msdn.com/stevelasker/archive/2008/01/15/msdn-webcast-introducing-sql-server-compact-3-5.aspx"&gt;MSDN
Webcast: Introducing SQL Server Compact 3.5 &lt;/a&gt;a webcast covering our 3.5
release&lt;/li&gt;&lt;li&gt;
&lt;a href="http://blogs.msdn.com/stevelasker/archive/2007/11/07/presentations-demos-from-tech-ed-barcelona-07.aspx"&gt;Presentations
&amp;amp; Demos from Tech Ed Barcelona 07&lt;/a&gt; - There are more up to date demos,
but this is where we first announced the deprecation of RANU or otherwise known
as User Instances. This deck also covered the script based deployment and
management of SQL Server Express.&lt;/li&gt;&lt;li&gt;
&lt;a href="http://blogs.msdn.com/stevelasker/archive/2008/10/18/evolution-or-revolution-for-moving-to-offline-architectures.aspx"&gt;Evolution
or Revolution for moving to offline architectures&lt;/a&gt; - a high level discussion
on mapping today's programming concepts (get &amp;amp; put), and converging them to
a more "occasionally connected" or online optimized model where get=cache,
put=queue, and we add sync to the common verbs used with working with data&lt;/li&gt;&lt;/ul&gt;





































&lt;h1&gt;Some great partner
tools&lt;/h1&gt;

&lt;ul class="unIndentedList"&gt;&lt;li&gt;
&lt;a href="http://www.primeworks-mobile.com/Products/DataPortConsole.html"&gt;Data Port
Console&lt;/a&gt; by Primeworks&lt;br&gt;
Great tool for scripting tables from SQL Server Compact. For only $50,
it's hard to beat&lt;/li&gt;&lt;li&gt;
&lt;a href="http://www.gui-innovations.com/html/remotesqlce.html"&gt;Remote SQLce&lt;/a&gt;&lt;br&gt;
Great tool for managing a Compact database on the device, from the desktop &lt;/li&gt;&lt;li&gt;
&lt;a href="http://www.codeplex.com/"&gt;CodePlex&lt;/a&gt;&lt;br&gt;
Codeplex is starting to collect several great code projects related to SQL
Server Compact. I'm sure this will continue to grow, so it's a great
place to look for what pain someone else has already endured &lt;/li&gt;&lt;ul&gt;&lt;li&gt;
&lt;a href="file:///C:/Users/SteveLas.REDMOND/AppData/Local/Temp/Search%20for%20SQLce"&gt;Search
for SQLce&lt;/a&gt;&lt;/li&gt;&lt;li&gt;
&lt;a href="http://www.codeplex.com/Project/ProjectDirectory.aspx?ProjectSearchText=sql%20compact"&gt;Search
for SQL Compact&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;









&lt;h1&gt;Great books&lt;/h1&gt;

&lt;ul class="unIndentedList"&gt;&lt;li&gt;
&lt;a href="http://www.hitchhikerguides.net/"&gt;&lt;b&gt;HitchhikerGuides.net
&lt;/b&gt;&lt;/a&gt;&lt;b&gt;- &lt;/b&gt;Bill Vaughn&lt;br&gt;
Bill has a great, no BS style that just helps you get to the facts. It's
a quick read, and at only $10, it's hard to pass up when you want to get up to
speed quickly on Compact.&lt;/li&gt;&lt;li&gt;
&lt;a href="http://www.amazon.com/Microsoft-SQL-Server-2005-Compact/dp/0672329220/ref=pd_bbs_sr_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1225297297&amp;amp;sr=8-1"&gt;&lt;b&gt;Microsoft
SQL Server 2005 Compact&lt;/b&gt;&lt;/a&gt;&lt;b&gt; &lt;/b&gt;- Prashant Dhingra&lt;br&gt;
Prashant originally worked in the Compact team, and provides a great insiders
look at SQL Server Compact&lt;/li&gt;&lt;li&gt;
&lt;a href="http://shop.campusmvp.com/Product-SQL-Server-Compact-2008-SP1-Referencia-Completa_34.aspx"&gt;&lt;b&gt;SQL
Server Compact &lt;/b&gt;&lt;/a&gt;&lt;b&gt;&lt;i&gt;(In Spanish)&lt;/i&gt;&lt;/b&gt;- Jose M. Torres &lt;br&gt;
If you're looking for a book on Compact in Spanish, here you go. I wish I
could say I've read it, but, it's been years since I was at all fluent in
Spanish. From what I have flipped through, it looks like it's covered all
the topics. Jose has been active in the community, so I'd say it's a
great bet.&lt;/li&gt;&lt;li&gt;
&lt;a href="http://www.amazon.com/Windows-Mobile-Synchronization-Server-Compact/dp/0979891205/ref=pd_bbs_sr_2?ie=UTF8&amp;amp;s=books&amp;amp;qid=1225297297&amp;amp;sr=8-2"&gt;&lt;b&gt;Windows
Mobile Data Synchronization&lt;/b&gt;&lt;/a&gt;&lt;b&gt; &lt;/b&gt;- Rob Tiffany&lt;br&gt;
Need some help, or want to know about Merge Replication? Might as well
get it from the mast of Merge - Rob Tiffany. Rob spends his time
traveling around the world helping customers scale and configure Merge.
If it's been done, Rob has seen it, and likely has helped get it working.&lt;/li&gt;&lt;/ul&gt;







&lt;h1&gt;Other Support/Info
Channels&lt;/h1&gt;

&lt;h2&gt;SQL Server Compact
Blogs &amp;amp; Forums&lt;/h2&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/SteveLasker"&gt;Steve Lasker's
Blog&lt;/a&gt;&lt;br&gt;
The blog you got this document from, :) Lots of information on how we got here,
demos and powerpoints.&amp;nbsp; But, since I've moved off the team, won't be able
to maintain the information going forward, so I'd recommend the following blogs
going forward.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/SqlServerCompact"&gt;SQL Server
Compact Team Blog&lt;/a&gt;&lt;br&gt;
Where most of the team posts info.&amp;nbsp; Everything from our encryption
details, Entity support, query processor details, etc.&amp;nbsp; You can think of
it as the authoritative source.&amp;nbsp; Even Laxmi posts to the Team Blog as well
as his own...&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/Laxmi"&gt;Laxmi's Blog&lt;/a&gt;&lt;br&gt;
One of great and passionate developers on the SQL Server Compact team.&amp;nbsp; Be
careful what you ask for, ‘cause Laxmi will tell you J.&amp;nbsp; Seriously, Laxmi spends a lot of time in the forums
listening and answering the issues and has a lot of experience with the
product.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://forums.microsoft.com/msdn/showforum.aspx?forumid=152&amp;amp;siteid=1"&gt;SQL
Server Compact Forums&lt;/a&gt;&lt;br&gt;
Where the team and our MVPs hang out to answer your questions.&amp;nbsp; In
addition to the product team, you'll also find answers from those that are
actually using the product.&amp;nbsp; We've gotten some great info here as well for
how the product is actually used, as opposed to what we thought developers
would do with Compact &amp;lt;g&amp;gt;&lt;/p&gt;

&lt;h1&gt;Sync Framework/Sync
Services for ADO.NET Blogs &amp;amp; Forums&lt;/h1&gt;

&lt;p&gt;&lt;a href="http://msdn.com/sync"&gt;Sync Development Center&lt;/a&gt;&lt;br&gt;
The home for the sync team and discusses the Sync Framework as well as Sync
Services for ADO.NET.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/sync/"&gt;Sync Team Blog&lt;/a&gt;&lt;br&gt;
Less formal information on Sync Services and the Sync Framework&lt;/p&gt;

&lt;p&gt;&lt;a href="http://forums.microsoft.com/sync/default.aspx?ForumGroupID=529&amp;amp;SiteID=75"&gt;Sync
Framework/Sync Services for ADO.NET Forums&lt;/a&gt;&lt;br&gt;
A great place to post questions and find answers from the Sync team&lt;/p&gt;





&lt;p&gt;&lt;a href="http://www.syncguru.com/"&gt;Syncmaster Rafik website&lt;/a&gt;
and &lt;a href="http://blogs.msdn.com/synchronizer/"&gt;Blog&lt;/a&gt;&lt;br&gt;
Rafik Robeal was one of our core developers for Sync Services for ADO.NET and
has all the nuts and bolts knowledge for what we originally built.&amp;nbsp;
Unfortunately, Rafik has moved onto other ventures.&amp;nbsp; However, he's still
got some great content on his site.&lt;/p&gt;&lt;p&gt;Enjoy the holidays,&lt;/p&gt;&lt;p&gt;Steve&amp;nbsp;



&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9142840" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stevelasker/archive/tags/Code+Samples/default.aspx">Code Samples</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/Presentations/default.aspx">Presentations</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/Q_2600_amp_3B00_A/default.aspx">Q&amp;amp;A</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/SQLce/default.aspx">SQLce</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/Sync+Services/default.aspx">Sync Services</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/SQL+Server+Compact+Edition/default.aspx">SQL Server Compact Edition</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/OCS/default.aspx">OCS</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/offline/default.aspx">offline</category></item><item><title>Evolution or Revolution for moving to offline architectures</title><link>http://blogs.msdn.com/stevelasker/archive/2008/10/18/evolution-or-revolution-for-moving-to-offline-architectures.aspx</link><pubDate>Sat, 18 Oct 2008 03:15:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9003995</guid><dc:creator>Steve.Lasker</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/stevelasker/comments/9003995.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stevelasker/commentrss.aspx?PostID=9003995</wfw:commentRss><description>&lt;P&gt;There's been a lot of talk, momentum and questioning for where and how occasionally connected designs fit into the application landscape.&amp;nbsp; There have been a lot of questions for "if and how" developers can take their existing apps "offline".&amp;nbsp; There have been a number of efforts for enabling offline apps and some longer term plans.&amp;nbsp; In VS 2008 (Orcas) we introduced Sync Services for ADO.NET as a developer focused way to synchronize data.&amp;nbsp; The roadmap continues with the Microsoft Sync Framework releases.&amp;nbsp; We've started to show "Astoria Offline" as a means to enable sync over REST based HTTP protocols enabling more generic services.&amp;nbsp; But do any of these "solve the problem".&amp;nbsp; It's been a while since I've done a brain dump on some thoughts related to the evolution vs. revolution of app models, so what better way to dump thoughts than a blogicle.&amp;nbsp; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;B&gt;Can you take your current app and make it offline?&lt;BR&gt;&lt;/B&gt;The reality is "it depends".&amp;nbsp; There are so many app designs, it's hard to say definitely what works and what doesn't.&amp;nbsp; There are some well established things that have worked and haven't, but it's not fair to say these apply 100% of the time.&amp;nbsp; One size doesn't fit all.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Intercept/fall back&lt;BR&gt;&lt;/B&gt;Do you go with the intercept model?&amp;nbsp; When online and connected, the app communicates directly to the service.&amp;nbsp; (Note I'm using "service" here to represent any remote source.&amp;nbsp; It could be a database "service" a Web Service, a WCF service, or some other API that's only available when your device is connected to "the network").&amp;nbsp; When the network falls away, the app &lt;B&gt;"falls back"&lt;/B&gt; to a local "cache".&lt;/P&gt;
&lt;P&gt;This is generally a bad (opinion), or complicated (fact) model.&amp;nbsp; This assumes one of two things.&amp;nbsp; Either your user knows they're going offline and they synchronize before they yank the cable or they predict when the network fails.&amp;nbsp; Of course the application can constantly synchronizing data in the background.&amp;nbsp; Crystal ball? When do you really know or have time to sync beforehand?&amp;nbsp; You're working in your office, and Outlook pops up reminder.&amp;nbsp; Or worse, you get an IM or Text message asking "where are you".&amp;nbsp; You grab your laptop and run... oh, wait, you forgot to sync.&amp;nbsp; Do you have the info needed for the meeting?&amp;nbsp; &lt;/P&gt;
&lt;P&gt;For the background sync, one of two things could be happening.&amp;nbsp; When you "fall offline", your view of data suddenly changes because your local copy is so out of date compared to the data you were just looking at, or your synching often enough that there's no difference, asking why you're even trying to work online in the first place.&amp;nbsp; Or, you've effectively created a denial of service attack by asking, has anything changed, has anything changed, has anything changed?&lt;/P&gt;
&lt;P&gt;Outlook 2003 (I think that was the version) tried this fallback model.&amp;nbsp; It was awful.&amp;nbsp; You're sitting in your office, writing an email, looking at your inbox.&amp;nbsp; The network goes down, your inbox view completely changes, or worse Outlook froze, and you lost that message you were carefully wording.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Always work locally&lt;BR&gt;&lt;/B&gt;In this model, you synchronize everything you need, and make all your interactions against the local store.&amp;nbsp; This is sort of the Outlook model today (Outlook 2007).&amp;nbsp; There are equal problems here.&amp;nbsp; Is it realistic to have all the data locally?&amp;nbsp; Even Outlook data can be significantly large, and that's clearly your data.&amp;nbsp; What about public folders?&amp;nbsp; By default, these are only available online.&amp;nbsp; If you're online, they work.&amp;nbsp; If you're not, they don't.&amp;nbsp; Fairly straight forward; but what about historical data for all the products the company has shipped?&amp;nbsp; What about your list of customers, or the current list of stocks and their prices?&amp;nbsp; &lt;/P&gt;
&lt;P&gt;The reality is data volume is growing at an exponential rate.&amp;nbsp; Storage continues to get cheaper and faster.&amp;nbsp; 1TB disks and Solid State storage are becoming mainstream.&amp;nbsp; The problem is while connectivity is getting better; the bandwidth isn't increasing at the same rate.&amp;nbsp; And, even as it does, is it realistic to have everything local?&amp;nbsp; Do you keep one of everything that Home Depot or Safeway keeps in stock?&amp;nbsp; Would be really nice, but not all that practical.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;B&gt;One size fits nobody&lt;BR&gt;&lt;/B&gt;The reality is there's no easy answer.&amp;nbsp; This is really an architectural and user model change is required to make this happen.&amp;nbsp; We've been through these before.&amp;nbsp; In the "old times", families ate what they grew.&amp;nbsp; Corn, milk, meat, etc.&amp;nbsp; Others only had Ice or Milk that was delivered to their house daily.&amp;nbsp; You could think of this as the "online model".&amp;nbsp; Today, we go shopping to &lt;A href="http://www.safeway.com/"&gt;Safeway&lt;/A&gt;, &lt;A href="http://dagnyc.com/"&gt;D'Agostino&lt;/A&gt;, or your local grocery store.&amp;nbsp; The stores don't grow anything locally.&amp;nbsp; They stock goods they get from somewhere else.&amp;nbsp; You take stuff home and stock it in your pantry, frig, freezer.&amp;nbsp; When you throw out the garbage it goes into the can.&amp;nbsp; The can gets picked up on Thursday.&amp;nbsp; It gets taken to &lt;A href="http://www.beavertonoregon.gov/departments/recycling/information/graphics/garbpath.jpg"&gt;the transfer station&lt;/A&gt;, and then off to the dump.&amp;nbsp; The point is we have lots of "store and forward"/sync models already in place.&amp;nbsp; What's really interesting is the "online" things are actually more expensive.&amp;nbsp; It turns out it's cheaper to stock goods that may be used, and accept a percentage of loss for things that don't sell than it is to create on demand.&amp;nbsp; Why do we think electronic bits and bytes should be "online" only?&amp;nbsp; Why are 1's and 0's more expensive than physical goods?&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;B&gt;Evolutionary approach: Mapping concepts&lt;BR&gt;&lt;/B&gt;If we look at the concepts we have today in web/service/stateless models, they break down into two common, and one advanced models:&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Get&lt;BR&gt;&lt;/B&gt;Get maps very easily to HTTP:Get.&amp;nbsp; Essentially you make a request to a domain, application and method.&amp;nbsp; You likely pass parameters and of course all the authentication goo.&amp;nbsp; The result of the get is returned and you now have a copy of information relevant to that point in time, and the specific question you've asked.&amp;nbsp; Most likely, but no guarantee it's accurate by the time you quickly display it on your 64bit, quad laptop with a gigabit connection to the internet.&amp;nbsp; Even historical data is subject to "correctness"- remember the Florida elections J&amp;nbsp; But, we live with "copies" all the time.&amp;nbsp; Copies are tangible, things that are "just there".&amp;nbsp; There's a separate question of how "out of date" the copy is.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;B&gt;Submit&lt;BR&gt;&lt;/B&gt;You have some information you're sending back.&amp;nbsp; You expect some action to be taken on the data you're submitting.&amp;nbsp; That submit can be accepted, rejected or modified.&amp;nbsp; You get an immediate response, but no guarantee what you've submitted will be accepted.&amp;nbsp; That might happen later on, it might not.&amp;nbsp; You hope, or expect to be notified if something changes.&amp;nbsp; But is that concept built into our app models?&amp;nbsp; Or, do we just assume the world is globally connected, and everything is always running so things can be asked and answered immediately, with 100% accuracy, in one big transaction so no two people can allocate the same "goods".... Whew, that's as ridiculous to assume as it is to type.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;B&gt;Can Get and Submit evolve?&lt;BR&gt;&lt;/B&gt;With &lt;B&gt;Get&lt;/B&gt;, you &lt;I&gt;can&lt;/I&gt; implement a "caching" model.&amp;nbsp; Rather than Get directly from the source, imagine you &lt;B&gt;Get&lt;/B&gt; through an abstraction layer.&amp;nbsp; For each Get the abstraction layer keys off the domain/app/method and name/value pairs for parameters.&amp;nbsp; Let's say I make a service call to: &lt;A href="http://acmeservices.com/Books/GetBookByName.asmx"&gt;http://AcmeServices.com/Books/GetBookByName.asmx&lt;/A&gt;.&amp;nbsp; I pass in:&amp;nbsp; Title=SQL Server Compact&amp;nbsp; &lt;/P&gt;
&lt;P&gt;In the GetCache, it looks for the service and name/value pairs that match.&amp;nbsp; If it finds a result, it may not have to actually make the network call.&amp;nbsp; It &lt;I&gt;could&lt;/I&gt; just return the cached result.&amp;nbsp; But what about stale data?&amp;nbsp; You can put an expiration policy on the cache.&amp;nbsp; For a list of states, a day is likely more than generous.&amp;nbsp; For pricing, maybe an hour.&amp;nbsp; The point is you can customize this per source.&amp;nbsp; For many things, one could argue most queries, the data is fairly static and the app could benefit immensely by caching the "gets".&amp;nbsp; If, however, you were to look online first, than only if the resource wasn't available look in the local cache than what benefit are you getting?&amp;nbsp; Sure, the app would "work offline", but you don't see any benefit in the online mode.&amp;nbsp; Each request still takes the time to roundtrip.&amp;nbsp; If you implement a smart caching model you can provide dramatically faster user responses. ...and in most cases, the data is perfectly accurate.&amp;nbsp; Now it would sure be nice to know when something changes, so if California does sink, Iraq or Canada become the 51&lt;SUP&gt;st&lt;/SUP&gt; state, you don't have to watch CNN and ask all your clients to either wait for the cache to update, or "invalidate" the cache.&amp;nbsp; I talked about notifications a bit &lt;A href="http://blogs.msdn.com/stevelasker/archive/2007/08/10/notification-to-pull.aspx"&gt;here&lt;/A&gt;, so I'll keep going. &lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;B&gt;Submit&lt;BR&gt;&lt;/B&gt;This one gets interesting as well.&amp;nbsp; You have an order to submit for some widgets.&amp;nbsp; Sure, you can submit directly to a "Web Service", or web page.&amp;nbsp; But in many situations the order submission doesn't actually mean the order will ship.&amp;nbsp; Accounting needs to verify your credit.&amp;nbsp; The products that were supposed to be in stock may have been routed to a bigger customer, or "fell off the truck".&amp;nbsp; Again, the point is just because you may get an immediate acknowledgement the order was accepted, doesn't mean it will be fulfilled.&amp;nbsp; So, why not accept this as the model, and when it works, it just works.&amp;nbsp; When a problem occurs, it's not really a problem because it's built into the system.&amp;nbsp; What if you "queued it up" for sending?&amp;nbsp; In this case we save the message locally, in a "logical queue", and when the service is available, we send it on its way.&amp;nbsp; I used the term "logical queuing" as I'm not implying you must use something like SQL Server Broker, MSMQ or WCF Queues, etc.&amp;nbsp; These tend to be a bit over complicated for what you need on the client, and it makes it difficult to act, query or evaluate the data in its transient state.&amp;nbsp; A while back I wrote a blogicle on and some samples for &lt;A href="http://blogs.msdn.com/stevelasker/archive/2007/08/21/sync-services-forado-net-and-sql-server-compact-presentation.aspx"&gt;Logical Queuing&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;&lt;B&gt;Sync&lt;BR&gt;&lt;/B&gt;This is what some might assume is the answer to all of these problems.&amp;nbsp; If I can synchronize changes from other nodes (the server and other clients) with my local store, and I can make changes locally and have them synchronize back "up" to the other nodes, doesn't that solve everything?&amp;nbsp; In the land of demos, sure.&amp;nbsp; But in the real world there are just too many complications.&amp;nbsp; The volume of data, requirements for business logic, and workflow make it difficult to assume Sync can solve all the problems.&amp;nbsp; Where sync does do really well is for synchronizing reference data.&amp;nbsp; That list of states, codes, or even larger volumes like the product catalog.&amp;nbsp; The &lt;A href="http://blogs.msdn.com/stevelasker/archive/2007/08/21/sync-services-forado-net-and-sql-server-compact-presentation.aspx"&gt;Logical Queuing&lt;/A&gt; blogicle and sample demonstrate some thoughts here.&amp;nbsp; I recently saw some work the Microsoft Mobile Line of Business CRM team, and it also uses a similar model.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;B&gt;Revolution is on the horizon&lt;BR&gt;&lt;/B&gt;With all the complications and half way solutions, you have to wonder what's the real answer to all this mess.&amp;nbsp; Will this problem just go away because we'll have high speed internet available everywhere?&amp;nbsp; Even if you could be guaranteed internet access everywhere, do we think that every service will be available all the time?&amp;nbsp; As the world gets more connected, will systems be more reliable and capable of enlisting in massive distributed transactions?&amp;nbsp; Or, will computing systems evolve to what every other large scale system as evolved to. Queuing, Caching, Reserving, Buffering, Acknowledgement, Conflict Detection &amp;amp; Resolution and Notifications.&amp;nbsp; &lt;/P&gt;
&lt;P mce_keep="true"&gt;While I talked a bit about the food supply earlier, this is also a bit like the VB Classic to Web transition.&amp;nbsp; For those old enough to remember the great 90's there was a big transition from "fat clients" to "thin clients".&amp;nbsp; No subtle suggestion of which is better there J&amp;nbsp; When developers first started building ASP Classic (pre .net) apps they simply moved their session state to the ASP Session object.&amp;nbsp; Which meant web servers could serve about 5-10 people before falling over.&amp;nbsp; Not exactly the promise we had all hoped for.&amp;nbsp; It took a while to realize the app models had to change. But, moving from Client apps to Web apps was a bit more obvious.&amp;nbsp; Mostly because the UI changed (for the worse), but at least users could get their work done because we couldn't get the VB apps deployed.&amp;nbsp; (yes, I'm over simplifying things, but run with me for a minute).&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Since developers had to re-write their UI anyway, it was an obvious change.&amp;nbsp; Making the transition from online to offline mode apps isn't as obvious.&amp;nbsp; The only UI required is the UI really telling them when problems occur.&amp;nbsp; Who wants that?&amp;nbsp; &lt;/P&gt;
&lt;P mce_keep="true"&gt;The reality is things are a changing.&amp;nbsp; Nothing to announce, nothing to promise, but there is a revolution on the way.&amp;nbsp; Revolutions take time for people to live through denial that it's coming, but it comes as a wave of reality that just smacks you with "duhh, I guess that was a stupid assumption".&lt;/P&gt;
&lt;P mce_keep="true"&gt;While we all wait for the revolution, you can look at things like ADO.NET Sync Services, the Sync Framework, Astoria Offline, and lots of goodies the Patterns and Practices team has done.&lt;/P&gt;
&lt;P mce_keep="true"&gt;Steve&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9003995" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stevelasker/archive/tags/Microsoft+Synchronization+Platform/default.aspx">Microsoft Synchronization Platform</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/Sync+Services/default.aspx">Sync Services</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/OCS/default.aspx">OCS</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/offline/default.aspx">offline</category></item><item><title>Application Services - Optimizing Online, Enabling Offline clients</title><link>http://blogs.msdn.com/stevelasker/archive/2007/05/20/application-services-optimizing-online-enabling-offline-clients.aspx</link><pubDate>Sun, 20 May 2007 18:23:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2752997</guid><dc:creator>Steve.Lasker</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/stevelasker/comments/2752997.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stevelasker/commentrss.aspx?PostID=2752997</wfw:commentRss><description>&lt;P&gt;Saurab, a PM on the UiFX team posted a screencast on the new application services coming in Visual Studio Orcas enabling settings to be cached locally, and synchronized with the profile store in ASP.net.&amp;nbsp; He also demonstrates caching authentication and roles as well.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/saurabh/archive/2006/11/27/live-from-redmond-client-application-services-in-orcas.aspx" mce_href="http://blogs.msdn.com/saurabh/archive/2006/11/27/live-from-redmond-client-application-services-in-orcas.aspx"&gt;http://blogs.msdn.com/saurabh/archive/2006/11/27/live-from-redmond-client-application-services-in-orcas.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;The screencast is a bit old, and seems sluggish, so for those that prefer a walkthrough, Saurab and Karl have created this step by step info:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;A href="http://blogs.msdn.com/winformsue/archive/2007/05/20/client-application-services-in-windows-forms-end-to-end-walkthrough-available.aspx"&gt;&lt;FONT face=Calibri size=3&gt;http://blogs.msdn.com/winformsue/archive/2007/05/20/client-application-services-in-windows-forms-end-to-end-walkthrough-available.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;Steve&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2752997" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stevelasker/archive/tags/Presentations/default.aspx">Presentations</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/OCS/default.aspx">OCS</category></item><item><title>First look at the Visual Studio Orcas Sync Designer</title><link>http://blogs.msdn.com/stevelasker/archive/2007/03/22/first-look-at-the-visual-studio-orcas-sync-designer.aspx</link><pubDate>Thu, 22 Mar 2007 03:32:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1928112</guid><dc:creator>Steve.Lasker</dc:creator><slash:comments>16</slash:comments><comments>http://blogs.msdn.com/stevelasker/comments/1928112.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stevelasker/commentrss.aspx?PostID=1928112</wfw:commentRss><description>&lt;P mce_keep="true"&gt;Here's part 1 of the new Sync Designer.&amp;nbsp; In this screen cast I walk through how to cache lookup tables locally.&amp;nbsp; In this screencast I use the 2 tier sync, starting simple.&amp;nbsp; In the next screencast I'll show how to take the same designer, and split it across N tier to keep the intimate knowledge of the server, connection string, queries, passwords, etc. from the client.&amp;nbsp; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;A class="" href="http://channel9.msdn.com/posts/SteveLasker/Visual-Studio-Orcas-Sync-Designer-for-Caching-Data-in-SQL-Server-Compact-Edition/" mce_href="http://channel9.msdn.com/posts/SteveLasker/Visual-Studio-Orcas-Sync-Designer-for-Caching-Data-in-SQL-Server-Compact-Edition/"&gt;http://channel9.msdn.com/posts/SteveLasker/Visual-Studio-Orcas-Sync-Designer-for-Caching-Data-in-SQL-Server-Compact-Edition/&lt;/A&gt;&lt;A href="http://channel9.msdn.com/ShowPost.aspx?PostID=293600" mce_href="http://channel9.msdn.com/ShowPost.aspx?PostID=293600"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;Just as a note, this screencast shows an internal build of Visual Studio Orcas between the Feb CTP and Beta 1.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Steve&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1928112" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stevelasker/archive/tags/Presentations/default.aspx">Presentations</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/SQLce/default.aspx">SQLce</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/MSP/default.aspx">MSP</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/Microsoft+Synchronization+Platform/default.aspx">Microsoft Synchronization Platform</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/Sync+Services/default.aspx">Sync Services</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/SQL+Server+Compact+Edition/default.aspx">SQL Server Compact Edition</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/OCS/default.aspx">OCS</category></item><item><title>Additional Q&amp;A on the Visual Studio Orcas Sync Designer</title><link>http://blogs.msdn.com/stevelasker/archive/2007/03/21/additional-q-a-on-the-visual-studio-orcas-sync-designer.aspx</link><pubDate>Wed, 21 Mar 2007 20:54:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1926933</guid><dc:creator>Steve.Lasker</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/stevelasker/comments/1926933.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stevelasker/commentrss.aspx?PostID=1926933</wfw:commentRss><description>&lt;P&gt;&lt;B&gt;Q: Why does the Orcas Feb CTP Typed DataSet designer not work on Vista?&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;A: &lt;/B&gt;Visual Studio Orcas is not yet fully compatible with Vista.&amp;nbsp; In the Feb CTP there are several issues with something we call "red bits".&amp;nbsp; These are changes to the runtime that shipped in .NET 3.0 which shipped with Vista.&amp;nbsp; For our own internal testing, we do have fixes allowing us to test on Vista and all the scenarios are working.&amp;nbsp; However, due to the way the dlls are signed and shipped in Vista, and the time crunch we're working under, we weren't able to get the work done in such a way that we could service a Vista box that had the Feb CTP installed.&amp;nbsp; This was a very tough decision as we do not want to set the expectation that Visual Studio Orcas won't be Vista compatible.&amp;nbsp;&amp;nbsp; But, it was felt more important to make sure that anything we ship, including the CTP must be serviceable.&amp;nbsp; As we all know, we're working on to maintain our schedule, and since CTP's are not meant to reflect the final quality, it was determined to ship the Feb CTP without full Vista support.&amp;nbsp; As those that have seen my demos, we do have Vista working, and we will have full support for Vista.&amp;nbsp; I believe, but not sure, that B1 will be fully Vista compatible.&amp;nbsp; So, for now, if you're using Vista, the Feb CTP should be run in a VPC.&amp;nbsp; In general, it's not a bad practice anyway.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;B&gt;Q: Will the Sync Designer generate time based sync?&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;A:&lt;/B&gt; This feature was unfortunately cut.&amp;nbsp; We had some great designs, and even some prototypes that I've demo'd previously.&amp;nbsp; However, we just didn't have the time to do all the background task, network resource detection, and timer work.&amp;nbsp; Rather than hack something together we didn't have time to fully design, dev and test, we've had to cut this feature altogether.&amp;nbsp; Of course this doesn't mean developers aren't smart enough to do this work with a combination of the BackgroundWorker, Timer and Network events.&amp;nbsp; It just means we don't have a checkbox to do all the work automatically.&amp;nbsp; We will have samples on how to do this, and we're in discussion with Patterns &amp;amp; Practices group on filling these gaps ‘till we have fully integrated runtime components that make this "just work".&amp;nbsp; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;B&gt;Q: Will tombstone records be automatically cleaned up?&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;A:&lt;/B&gt; This was another cut we made in the sync designer with Visual Studio Orcas.&amp;nbsp; Tombstone records are how we track deletes.&amp;nbsp; If you sync on Monday and get the full product catalog, and then sync again on Wednesday, how can the server answer the question of "what was deleted".&amp;nbsp; There are many ways to handle this.&amp;nbsp; You can mark the main record with a status of Active = False, or you can physically delete the row and in the Deletion Trigger copy the PK to a [Table]_Tombstone record.&amp;nbsp; The later is what the Visual Studio Orcas Sync Designer does.&amp;nbsp; We had planned to create a Scheduled Task to automatically purge these deleted records, but since SQL Server Express doesn't have the Agent, we felt this was going to be too confusing.&amp;nbsp; We also expect developers will do some additional work between their development and production boxes, so for now we punted this.&amp;nbsp; We're not yet talking in detail about our SQL Server Katmai release, but you can expect we're doing some cool things here.&amp;nbsp; So, for now, you'll have to create a scheduled task to purge the tombstone records that are say older than 30 days.&amp;nbsp; Stay tuned, and we'll have more exciting things to discuss about the upcoming Katmai rlease.&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Q: How do I get my cached tables to be synchronized in a single transaction?&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;A:&lt;/B&gt; The Orcas Sync Designer is focused on download scenarios.&amp;nbsp; You can absolutely extend the sync designer generated code to do uploads as well, and in fact we even generate the upload SyncAdapter commands.&amp;nbsp;&amp;nbsp; For download only scenarios it was felt we should keep things simple by default and enable the ability to easily recover from dropped connections.&amp;nbsp; So, by default, the Sync Designer synchronizes each table individually.&amp;nbsp; As one table is finished, the next table is synchronized.&amp;nbsp; This means if table 1 finishes, and the connection drops during table 2, that the next time a sync occurs, Table1 is likely already complete.&amp;nbsp; To put all the tables in a single transaction, expand the [advanced] expando button and choose the sync all tables in a single transaction option.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;For the Feb CTP, the Sync Designer generated a SyncGroup for each table.&amp;nbsp; This wasn't necessary as the SyncAgent knows to place each in it's own SyncGroup when one isn't specified.&amp;nbsp; This has since been changed so you'll only get a SyncGroup when placing all in a single transaction.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;B&gt;Q: Once all the tables are placed in a single transaction, how do I control the order the tables are updated to handle parent/child relationships?&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;A:&lt;/B&gt; The Sync Runtime will apply inserts, updates and deletes based on the order of the SyncTables and SyncAdapters in their respective collections.&amp;nbsp; This isn't fully implemented in the Orcas Feb CTP, or the Jan Sync CTP.&amp;nbsp; However, we do now have that updated internally and will be releasing it soon in the CTP. &amp;nbsp;&amp;nbsp;In an upcoming screen cast you'll see the current updates to the Sync Designer, including the ability to move items in the collection up and down.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;B&gt;Q: Does the sync runtime create relationships locally within SQLce?&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;A:&lt;/B&gt; No, I touched on this here: &lt;A href="http://blogs.msdn.com/stevelasker/default.aspx#constraints"&gt;http://blogs.msdn.com/stevelasker/default.aspx#constraints&lt;/A&gt; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;B&gt;Q: Does the sync runtime work with server side identities for PK's?&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;A:&lt;/B&gt; No, no, and maybe.&amp;nbsp; In general, despite the fact that many of our own samples depend on the Identity feature to manage the primary key, identities are an overall poor design.&amp;nbsp; Building offline apps is only the extreme of the problem.&amp;nbsp; How do you create a new row on the client, assign it a primary key when the client won't actually know the PK until it posts it to the server?&amp;nbsp; However, the problem exists in "connected" stacks as well.&amp;nbsp; Say you're creating a Order with a collection of OrderDetails.&amp;nbsp; The standard model is to have the OrderDetails table reference the PK of it's parent, than add another sub key, say line number.&amp;nbsp; You can't actually create the OrderItem records until the Order record is posted first.&amp;nbsp; This creates complications for connected development.&amp;nbsp; Sure, you can use the @@scope_identity value, but you still have to do a bunch of updates.&amp;nbsp; Sure, you can wrap this in a sproc, but it's still a PITA.&amp;nbsp; Now, consider you're building a high availability system.&amp;nbsp; You have multiple server nodes managing the creation of data.&amp;nbsp; Who owns the master identity range?&amp;nbsp; We see this in rollup scenarios all the time.&amp;nbsp; Each branch maintains their own data.&amp;nbsp; Each uses identities.&amp;nbsp; When the data is rolled up to corporate, you have collisions, requiring you to add the branch id to the corporate database.&amp;nbsp; Now, you could partition the identity values, which is what we do in Merge Replication, but now we've introduced additional problems.&amp;nbsp; Prior to joining Microsoft we deployed many mobile applications.&amp;nbsp; If a person is in the field, using Merge Replication, and is working with their partition of IDs, what happens when they use them up?&amp;nbsp; They have to re-synchronize with the server to get a new allocation, which they may not be able to do at the time they've run out.&amp;nbsp; So, the app is dead.&amp;nbsp; Another client doesn't use up their allocation and leaves "holes" in the server.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;B&gt;So, what's the solution?&lt;/B&gt;&amp;nbsp; There are two ways, the simple but not always the most efficient, and the complex.&amp;nbsp; The simple is to simply use GUIDs.&amp;nbsp; SQL Server and SQLce both have UniqueIdentifier data types.&amp;nbsp; You can either set the IsRowGuid property, or create your own GUID with Guid.NewGuid().&amp;nbsp; The other is to create your own hashing.&amp;nbsp; Each client is given a hash when the initially connect to the server.&amp;nbsp; They then create incremental counters, possibly even with Identity within their hash.&amp;nbsp; Now when you push up the new values, voila, no conflicts.&amp;nbsp; If you still want incremental counters, say for that single, simple OrderId, you could still use the Identity feature, just don't make it the primary key.&amp;nbsp; You upload a new order from the client.&amp;nbsp; The client assigned a primary key using it's hash.&amp;nbsp; When that order is uploaded to the server, the server applies the identity value to the non-pk column.&amp;nbsp; The update is then brought back down to the client.&amp;nbsp; Life is good.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Steve&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1926933" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stevelasker/archive/tags/Code+Samples/default.aspx">Code Samples</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/Q_2600_amp_3B00_A/default.aspx">Q&amp;amp;A</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/SQLce/default.aspx">SQLce</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/MSP/default.aspx">MSP</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/Microsoft+Synchronization+Platform/default.aspx">Microsoft Synchronization Platform</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/Sync+Services/default.aspx">Sync Services</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/SQL+Server+Compact+Edition/default.aspx">SQL Server Compact Edition</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/OCS/default.aspx">OCS</category></item><item><title>Q&amp;A on OCS &amp; Sync Services for ADO.NET</title><link>http://blogs.msdn.com/stevelasker/archive/2007/03/18/QAforOCS_2D00_SyncServicesForAdoNet.aspx</link><pubDate>Sun, 18 Mar 2007 17:25:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1907415</guid><dc:creator>Steve.Lasker</dc:creator><slash:comments>47</slash:comments><comments>http://blogs.msdn.com/stevelasker/comments/1907415.aspx</comments><wfw:commentRss>http://blogs.msdn.com/stevelasker/commentrss.aspx?PostID=1907415</wfw:commentRss><description>&lt;P&gt;Not surprisingly we've been get a lot of great questions about specific features and scenarios for our new Sync Services for ADO.NET (OCS).&amp;nbsp; &lt;A class="" href="http://www.syncguru.com/" mce_href="http://www.syncguru.com/"&gt;Rafik&lt;/A&gt; has been fielding most of these on the &lt;A class="" href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=1225&amp;amp;SiteID=1" mce_href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=1225&amp;amp;SiteID=1"&gt;Sync Services forums&lt;/A&gt;.&amp;nbsp; Since the Q&amp;amp;A for SQLce seemed popular, I thought I'd do the same here.&amp;nbsp; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Q: How does Sync Services compare to Merge Replication and RDA?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;A: &lt;U&gt;Merge replication &lt;/U&gt;&lt;/STRONG&gt;is our developer oriented, feature rich, SQL Server based database "replication" product.&amp;nbsp; It's designed for a DBA to configure a publication on the database exposing a set of tables (articles) enabling filtering and rules.&amp;nbsp; Clients then "subscribe" to the publication and receive a local database reflecting the publication.&amp;nbsp; It's a very powerful and mature product that we will continue to invest in.&amp;nbsp; From the server side (publications), Merge Replication is a SQL Server only feature that is available in our SQL Server Workgroup, Standard and Enterprise SKUs.&amp;nbsp; Merge Replication, as a publisher, is not available in the free SQL Server Express SKU.&amp;nbsp; Merge replication supports 2tier sync and sync over HTTP(s)&amp;nbsp; to enable internet synchronization.&amp;nbsp; However, I wouldn't say that Merge is SOA oriented in that you don't have much control of what's sent or received across the wire, nor do you have the ability to support additional transports.&amp;nbsp; It's a fantastic end to end replication product that handles a lot of complicated scenarios.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Remote Data Access (RDA)&lt;/STRONG&gt; is a developer oriented, simple but RAD sync technology.&amp;nbsp; It works over HTTP, so it enables internet protocol sync, but again, it's not very SOA friendly.&amp;nbsp; While the client doesn't directly open a connection to SQL Server, it does require the client provide the connection string and query to be executed on the server.&amp;nbsp; So, it pretty much violates the notion of keeping the server information from the client.&amp;nbsp; While it is limited, you can't deny it's popularity for it's simplicity.&amp;nbsp; We continually hear many people implementing RDA rather than merge as theire requirements are simple and RDA just worked great.&amp;nbsp; Which brings me to Sync Services for ADO.NET&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Sync Services for ADO.NET &lt;/STRONG&gt;is our answer to this dilemma of having to choose between the dba focused powerful features of Merge, the simplicity of RDA, and the developer motivation for them to write their own.&amp;nbsp; When designing Sync Services we used RDA as our user model.&amp;nbsp; Debra Dove and her team did an excellent job with RDA, and we wanted to take it to the next level.&amp;nbsp; We used the provider and developer programming model of ADO.NET and wanted to leverage all the great transport, security and protocol work others were doing. &amp;nbsp;Essentially, rather than build additional solutions to existing problems, we wanted to scope the solution to what we needed to solve, and leverage others who were experts in their field.&amp;nbsp; The Sync Services for ADO.NET features are built by the same team that delivers Merge Replication.&amp;nbsp; I've been truly amazed at the knowledge these guys have.&amp;nbsp; It's because of their experience that I have a hard time calling Sync Services a 1.0 product.&amp;nbsp; It's really a culmination of all the great work from Merge, RDA, file synchronization, and even the WinFS sync work.&amp;nbsp; &lt;/P&gt;
&lt;P mce_keep="true"&gt;The quick bullet for Sync Services is it's a componentized synchronization framework, built on ADO.NET, but factored to provide a common sync platform for Entities, Files, and other formats.&amp;nbsp; Sync Services for ADO.NET is our first delivery in our Microsoft Synchronization Platform.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;The key advantages of Sync Services is its developer focus, w/DBA empowerment.&amp;nbsp; Rather than force your DBA to understand all the details of how you're going to synchronize data within your application, you engage the DBA for the portions that touch the server database.&amp;nbsp; The transports are up to you, and we have a great WCF designer integrated story, but you can use other transports as well.&amp;nbsp; The local database schema/structure is up to the developer to decide as it's their apps database.&amp;nbsp; Of course you can engage your DBA as well, but you don't get what you get as the result of a synch operation.&amp;nbsp; You can use just the client components and use Java and Oracle on the server, or you can use just the server components and other technologies on the client.&amp;nbsp; If your data is locked up in Oracle, you can still use Sync Services to synchronize that data directly from Oracle to your client.&amp;nbsp; You don't have to put SQL Server in the middle just to enable sync.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;The point here is regardless of what cards you've been dealt, we want to help you get your app done to make your users happy.&amp;nbsp; The more Microsoft products you use, the better the experience we can provide, but we're not locking you in, or out of our platform just because something is out of your control.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Q: What's the roadmap for Merge, RDA and Sync Services&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Merge replication &lt;/STRONG&gt;will continue to be our database replication product and will have Katmai investments in the next release.&amp;nbsp; Merge will be the DBA tool for replicating a database, and those that are already using Merge shouldn't feel like we're abandoning them by any means.&amp;nbsp; If Merge is working for you, don't worry, we're continuing to take feature work and making improvements.&amp;nbsp; In fact, many of the Sync Services features will work into Merge as well.&amp;nbsp; That's about all I can say for now.&amp;nbsp; We'll announce more about Katmai later on.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;RDA &lt;/STRONG&gt;will eventually be phased out.&amp;nbsp; We truly believe the Sync Services features address the simplicity of RDA, but don't have any of the limits imposed by RDA.&amp;nbsp; Specifically, incremental changes, ability to synchronize several tables in one transaction handling all the interleaving of inserts, updates and deletes.&amp;nbsp; Support for other ADO.NET Providers, etc.&amp;nbsp; If you're already using RDA, we're not killing it yet, but we won't be doing any new work there either.&amp;nbsp; We do expect to deprecate it within the next release or so as Sync Services are released.&amp;nbsp; If you haven't yet deployed RDA, but are looking into it, definitely look at the Sync Services CTP.&amp;nbsp; If you need to go into production now and can't wait ‘till Sync Services are released, than by all means use RDA.&amp;nbsp; It's not like it has that much functionality that you won't be able to easily switch to Sync Services later on.&amp;nbsp; &amp;lt;g&amp;gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Sync Services &lt;/STRONG&gt;is where we're doing a lot of our investments.&amp;nbsp; It's just the first delivery in our new Microsoft Synchronization Platform.&amp;nbsp; I'll write a different blog post on our naming.&amp;nbsp; (I love discussing naming, ...not).&amp;nbsp; Sync Services are our developer oriented, SOA enabled data synchronization features.&amp;nbsp; We won't have all the database replication features of Merge, as we really focus on synchronizing data.&amp;nbsp; Sync Services provides and end to end story, but is a componentized model allowing you to get in the middle, or completely replace one end.&amp;nbsp; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Q: Can I use Merge and Sync Services together?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;A: &lt;/STRONG&gt;As we've all seen with our &lt;A class="" href="http://blogs.msdn.com/stevelasker/archive/2006/11/08/comparing-sql-server-express-and-compact-editions-whitepaper.aspx" mce_href="http://blogs.msdn.com/stevelasker/archive/2006/11/08/comparing-sql-server-express-and-compact-editions-whitepaper.aspx"&gt;SQLce and Express discussions&lt;/A&gt;, one size doesn't fit all.&amp;nbsp; But we also don't believe you need 10 ways to solve the same problem.&amp;nbsp; Just as with Express being our entry point to our Data Service platform and SQLce being our client/embedded platform, we expect Merge and Sync Services to address the needs of two types of scenarios.&amp;nbsp; It's likely that some scenarios, such as a branch office may actually use both Merge and Sync Services.&amp;nbsp; Merge to replicate data between the branch office and the corporate office, and Sync Services to enable branch workers to go out into the field.&amp;nbsp; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Q: Does Sync Services support N Tier?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;A: &lt;/STRONG&gt;Absolutely.&amp;nbsp; The beauty about the N, is it could imply 1 to many.&amp;nbsp; With Sync Services we have Server and Client Providers.&amp;nbsp; Actually, we like to think of them as local and remote providers as we currently focus on hub/spoke, but we'll be enabling p2p as well in the future.&amp;nbsp; You can start with 2 tier and move to N tier.&amp;nbsp; You can intermix 2 tier and N tier based on where the clients are connecting from.&amp;nbsp; When you first start working with Sync Services you may ask why you have to specify the tables your synchronizing on the client and server providers.&amp;nbsp; That's because we want to make sure you can easily split the client and server code to different tiers.&amp;nbsp; All the "intimate" knowledge of the server can easily be moved to the mid tier, while the client provider configuration is maintained on the client.&amp;nbsp; Even the Sync Designer allows you to easily split the client and server provider code.&amp;nbsp; It's quite sweet when you see it.&amp;nbsp; Screen cast coming soon...&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Q: What transports do you support?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;A&lt;/STRONG&gt;: What do you want?&amp;nbsp; As noted above, the sync team wants to get out of the transport business.&amp;nbsp; We have many bright people in Microsoft thinking about those problems.&amp;nbsp; In Orcas the Visual Studio designers will focus on enabling WCF, but you can use Web Services, SSE, SyncML or if you can figure out how to convert Jelly Beans to .NET objects, you can use those as well.&amp;nbsp; Essentially, you simply plug in a matching service and a proxy, and you're good to go.&amp;nbsp; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Q: Do you support column level tracking?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;A: &lt;/STRONG&gt;Not yet.&amp;nbsp; For this first release, we only support row level tracking.&amp;nbsp; We are working on column level tracking, but it does require additional functionality on the server, and we wanted to make it easy for developers to start synchronizing data from their existing databases.&amp;nbsp; As with any good database design, you should think about how you partition your tables.&amp;nbsp; For various reasons, it's good to separate images, or other large blobs from your primary table into other tables and maintain a 1:1 relationship.&amp;nbsp; It's not meant to be an excuse, and we will be implementing column level tracking in the future.&amp;nbsp; Using features like ADO.NET V3 entities you can roll up the 1:1 mappings into a single object allowing your developers to work in a normal fashion, while managing performance and isolation in your database.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Q: Do you support custom conflict resolvers?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;A: &lt;/STRONG&gt;Of course.&amp;nbsp; How could we not?&amp;nbsp; On both the server and client providers we expose a conflict event.&amp;nbsp; In that event you'll get the client and server rows that represent the conflict.&amp;nbsp; You can simply say force overwrite, or implement very custom logic.&amp;nbsp; Such as determining if the person who made the change is a manager, or owner of that particular customer account.&amp;nbsp; Based on that custom logic, you simply make the logical change.&amp;nbsp; All this is in managed code, with your favorite .NET language.&amp;nbsp; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Q: Do you support partitioning/filtering?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;A: &lt;/STRONG&gt;Of course.&amp;nbsp; We don't really expect people to synchronize terabytes of their data to all their clients.&amp;nbsp; The partitioning is the normal horizontal and vertical partitioning.&amp;nbsp; You simply provide the query that represents the filter you wish to support.&amp;nbsp; You can do joins, etc.&amp;nbsp; It's just a query.&amp;nbsp; The client sends up as many parameter values as you need.&amp;nbsp; There's no limitation on the number of parameters.&amp;nbsp; In fact, you can even intercept calls on the server and set sync parameter values based on other logic.&amp;nbsp; In WCF you can determine who the client is, and based on that info, send them their customers without exposing the SalesPersonId to the client to substitute another value.&amp;nbsp; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Q: Does the server track each client individually?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;A: &lt;/STRONG&gt;No.&amp;nbsp; This is one of the major differences when compared to Merge.&amp;nbsp; One of the powerful features of Merge is it knows all its clients, so when the client connects, it already has the data ready for it, and easily supports "data repartitioning". In Sync Services, the server has no idea who all the clients are.&amp;nbsp; The benefit here is Sync Services don't have the same scalability constraints.&amp;nbsp; You can synchronize as many clients as your server can handle queries.&amp;nbsp; The server doesn't necessarily know it's a publisher, but rather it's just answering queries.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Q: Does Sync Services support multiple publications&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;A: &lt;/STRONG&gt;Yes/no.&amp;nbsp; Sync Services doesn't utilize the pub/sub model per se.&amp;nbsp; You can configure the server provider to offer 20 tables you want to synchronize.&amp;nbsp; The client simply say it cares about 3.&amp;nbsp; Another client cares about a different 3.&amp;nbsp; Another client cares about 4, which overlap the first two clients.&amp;nbsp; In fact, we also support a client dynamically adding tables.&amp;nbsp; A sales person may cover another sales person for a week and needs to bring in an additional product line.&amp;nbsp; Within the app, the developer can change the filtering query, and off they go.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Q: How are schema changes handled?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;A: &lt;/STRONG&gt;Unlike merge which is geared around replicating a database, Sync Services is geared around synchronizing data.&amp;nbsp; I'm not a big believer that generally speaking the DBA simply adds a column to the server and the UI automatically updates on the client and life is good.&amp;nbsp; While it can be done, most of the time I'd bet you want some control over where and how the new element is displayed, add some interaction logic to the client, tab order etc.&amp;nbsp; We really treat schema updates as an app update.&amp;nbsp; It's a holistic update of the app overall.&amp;nbsp; The model we've gone with the Sync Services are the following:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;A new requirement is defined, say AddressLine3.&amp;nbsp; The DBA would add the column to the server.&amp;nbsp; All the normal rules apply.&amp;nbsp; If the column is non-nullable, than a default should be provided.&amp;nbsp; &lt;/LI&gt;
&lt;LI&gt;The developer involved with the sync layer would most likely create a new version of the Sync Service, say v2.&amp;nbsp; This means that apps that were using v1 can be slowly migrated, or at least be migrated within some level of control.&amp;nbsp; If the user is in the middle of an important deal, the last thing they need is a forced software upgrade.&amp;nbsp; Ever been in the middle of something important and IT forces an update that reboots your computer or app?&amp;nbsp; Software is an enabler, it should help me achieve my goals, not fight me because &lt;STRONG&gt;&lt;EM&gt;IT &lt;/EM&gt;&lt;/STRONG&gt;thinks its important now.&lt;/LI&gt;
&lt;LI&gt;The app developer updates their service proxy to point to v2 of the sync service, exposing the extra column.&lt;/LI&gt;
&lt;LI&gt;In the version check code, the app author can either choose to reset the table, or they can execute the alter table script locally adding the additional column.&amp;nbsp; They may even bring down a single data call to retrieve the values for the new column on all the existing rows.&lt;/LI&gt;
&lt;LI&gt;The developer than decides what they want to do with the new element, updating their ui, logic etc.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;So, while we didn't implement something as simple as point click, we think it tends to fit the SOA model where apps may consume services from other apps, and they should have control over how and when they consume new schema.&lt;/P&gt;&lt;A class="" title=constraints name=constraints&gt;&lt;/A&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Q: How are constraints, keys, and other db objects brought down to the client?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;A: &lt;/STRONG&gt;This again falls in the category of Sync Services is about synchronizing data, not replicating a database.&amp;nbsp; Sync Services does do some schema and even database creation with SQL Server Compact Edition.&amp;nbsp; If you're starting from scratch, and you first synchronize, the SQLce database will be created based on the connection string properties, name, encryption, password, etc.&amp;nbsp; It will then create all the tables the client has said they're interested in.&amp;nbsp; Remember, just because the server exposes 20 tables, doesn't mean the client must use all of them.&amp;nbsp; The client determines which tables it wants to consume with the SyncTable collection.&amp;nbsp; When the tables are created, primary keys are created, datatypes are mapped to the clients datatypes, and nullability is applied.&amp;nbsp; No additional indexes, constraints, defaults, etc. are applied.&amp;nbsp; There are SchemaCreating/ed events fired where you can either initial create the schema to be used, or alter the schema after the tables are created.&amp;nbsp; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Q: Does sync services handle parent/child/grandchild relationships?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;A: &lt;/STRONG&gt;Yes.&amp;nbsp; Unlike RDA where you can only sync one table at a time, Sync Services handles the hierarchical nesting of inserts, updates and deletes.&amp;nbsp; In fact you can even control it seperatly on the server from the client.&amp;nbsp; On the server, tables are placed in the SyncAdapter collection.&amp;nbsp; The order of the SyncAdapters defines the order by which updates will be applied.&amp;nbsp; Inserts and Updates are done from the top down, while deletes are done from the bottoms up.&amp;nbsp; The same is done on the client, in the SyncTables collection.&amp;nbsp; This allows the server to control its order, while allowing the client to control its order of updates.&amp;nbsp; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Q: Can I update only a few tables at a time?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;A: &lt;/STRONG&gt;Yes.&amp;nbsp; Say you want to only synchronize your lookup tables, states, codes, etc. once a day.&amp;nbsp; You can create a specific service just for your lookups, and another for your product catalog.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Q: Can I update everything in a single operation, or can I control things more granularly?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;A: &lt;/STRONG&gt;Within the SyncAgent, you can utilize the SyncGroup to determine the grouping of updates.&amp;nbsp; In the previous example, you may choose to put all the lookup tables in their own individual groups.&amp;nbsp; If the connection drops while you're synchronizing your lookups, it can pickup where it left off next time it synchs.&amp;nbsp; However, when synchronizing Orders, you probably don't want Orders to ever go up/down without OrderDetails.&amp;nbsp; Simply put the Orders and OrderDetails table in the same SyncGroup, and you're all set.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Q: Does Sync Services support batching for large data sets?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;A: &lt;/STRONG&gt;Yes, but not quite yet.&amp;nbsp; We initially scoped this out of the first release, but we believe we'll be able to get it in, so look for it sometime around March 07.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Q: How does Sync Services track changes?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;A: &lt;/STRONG&gt;Sync Services uses an Anchor based model.&amp;nbsp; Each time a sync operation occurs it gets a reference mark from the server.&amp;nbsp; It could be the servers DateTime, or a TimeStamp (RowVersion).&amp;nbsp; The client saves that value for the next sync operation.&amp;nbsp; Each time the client synchronizes a particular SyncGroup, it first requests the server anchor.&amp;nbsp; It than executes the queries on the server using the last anchor as the low range, and the new anchor as the high range.&amp;nbsp; This gets a consistent set of changes across several queries.&amp;nbsp; In future releases of the Microsoft Synchronization Platform we'll be supporting a knowledge based sync model as well as the anchor based model discussed here.&amp;nbsp; Rafik does a great job explaining it in his &lt;A class="" href="http://blogs.msdn.com/synchronizer/archive/2007/02/20/a-nice-gift-from-sql-server-2005-sp2-to-sync-developers.aspx" mce_href="http://blogs.msdn.com/synchronizer/archive/2007/02/20/a-nice-gift-from-sql-server-2005-sp2-to-sync-developers.aspx"&gt;blog&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Q: How are deletes purged?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;A: &lt;/STRONG&gt;On the server, deletes are either kept in a tombstone table, or simply tracked by some sort of active/status flag in the primary table.&amp;nbsp; Since this version of Sync Services isn't tightly coupled to SQL Server, we actually don't do anything.&amp;nbsp; In general, we'd expect the DBA to write a scheduled task to purge tombstone records on their determined interval.&amp;nbsp; You can expect us to do more in the "future", tease, tease, tease...&lt;/P&gt;
&lt;P&gt;On the client, SQLce purges deleted records once it confirms data has been sent to the server.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Q: Can I purge old data on the client without triggering a delete on the server?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;A: &lt;/STRONG&gt;Yes.&amp;nbsp; While we don't have a simple API to do this today, you can delete a bunch of rows on the client based on what ever criteria you decide, than simply "AcceptChanges" on the client prior to these changes being sent to the server.&amp;nbsp; Of course you could intercept these on the server an toss deletes as well to protect your server data.&amp;nbsp; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;Q: Does Sync Services support low bandwidth type sync scenarios?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;A: &lt;/STRONG&gt;By low bandwidth, I mean can I synchronize only the important things now, and catch up later.&amp;nbsp; Yes.&amp;nbsp; You can either upload only, download only, or synchronize just a particular SyncGroup based on your own logic at the time.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Q: When will Sync Services ship?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;A: &lt;/STRONG&gt;Sync Services for ADO.NET will ship at the same time Visual Studio Orcas ships.&amp;nbsp; This is currently scheduled for Q4 2007.&amp;nbsp; Note: This is not meant to be the official place to get the timeframe for Orcas, but rather just saying that our current plan is to ship Sync Services within SQL Server Compact Edition 3.5, which will ship with Orcas.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Q: Will Sync Services ship on both the desktop framework and the .NET Compact Framework?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;A: &lt;/STRONG&gt;Yes, but at different times. At current, March 16th '07, we are scheduled to ship for the full framework, but we are not planning on shipping Sync Services for the device platform in the Orcas product.&amp;nbsp; We do plan to ship the client components for Sync Services soon after Orcas, but are still working out the schedule.&amp;nbsp; The problem is the various .NET Compact Framework teams, including the Visual Studio for Devices teams and Sync teams have a lot of work to manage with many different device platforms and a very short schedule, and we haven't been able to get all the appropriate ship level test coverage complete.&amp;nbsp; We have designed, and done preliminary testing with the client components working and synching over Web Services.&amp;nbsp; We are still hopeful we can pull it in, but at this point, we're just not ready to commit to Orcas, but rather shortly thereafter. &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Q: Will Sync Services or SQL Server Compact Edition be in the .NET Framework, or .NET Compact Framework?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;A: &lt;/STRONG&gt;No, we are not shipping within either framework, but rather shipping as an add-on component.&amp;nbsp; Why?&amp;nbsp; Because we wanted more flexibility with our ship schedule.&amp;nbsp; SQLce will ship 2-3 times between .NET 2.0 and .NET 3.5.&amp;nbsp; While it would be nice to ride the distribution of the frameworks, with the embedded/private deployment options of SQLce and Sync Services, we felt it was better to have more flexibility with our schedule.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Q: Are these the only questions?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;A: &lt;/STRONG&gt;I doubt it.&amp;nbsp; So, keep them coming, and I'll update this FAQ as I receive them.&lt;/P&gt;
&lt;P mce_keep="true"&gt;Thanks for all the great questions.&amp;nbsp; Keep them coming as they help us make sure we're shipping the right features in the right order.&lt;/P&gt;
&lt;P mce_keep="true"&gt;Steve&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1907415" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/stevelasker/archive/tags/Q_2600_amp_3B00_A/default.aspx">Q&amp;amp;A</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/SQLce/default.aspx">SQLce</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/MSP/default.aspx">MSP</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/SQLev/default.aspx">SQLev</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/Microsoft+Synchronization+Platform/default.aspx">Microsoft Synchronization Platform</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/SQL+Server+Everywhere/default.aspx">SQL Server Everywhere</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/Sync+Services/default.aspx">Sync Services</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/SQL+Server+Compact+Edition/default.aspx">SQL Server Compact Edition</category><category domain="http://blogs.msdn.com/stevelasker/archive/tags/OCS/default.aspx">OCS</category></item></channel></rss>