MS Sync Framework

H

Harry Simpson

I've been looking at the MS Sync Framework today and it looks like the next
best thing in constructing data syncing between a device and the data on a
server. Started to download the Tech Preview edition and in the instructs
it tells me to uninstall any other sync bits including Sync Services for
ADO.NET. Didn't this come as part of VS2008?
I don't want to mess up VS2008. Is this MS Sync Framework a great thing?
Lost in the technical woods again....
Harry
 
G

Ginny Caughey [MVP]

Harry,

The Sync Framework 1.0 is a part of VS 2008, but the new tech preview
doesn't seem to hurt that isntallation in any way as far as I can tell in
early testing. In any case, the part you're probably most interested in -
the part that includes mobile device syncing - is still not available but
will be available as a tech preview or beta in a few months. I'm looking
forward to it myself.
 
H

Harry Simpson

Thanks Ginny
I was thinking that the Sync Services (?) was a subset and included in
VS2008 but that the Sync Framework was the bigger piece. Apparantly if I'm
developing a product for sale in the next few months I can't use the new
mobile connection bits anyhoo since they aren't released per se.
think we need a wise wizard to direct our use of these technologies.....as
to prioritizing them.
Thanks again
Harry
 
G

Ginny Caughey [MVP]

Harry,

I'm not completely clear myself where the lines are drawn between Services
and Framework, but it seems to need both. And you're right that if you need
to deploy pretty soon, the mobile piece isn't there yet so you'll have to
roll your own or use RDA, Merge, etc.
 
H

Harry Simpson

Welp I already have a RDA pull and Web service upload sync process but it is
synchronous and requires the user to wait the 11-20 seconds required to
get/give data. Happens every 5 minutes in the cradle (Ethernet) or if
wireless the user must now manually initiate.
Need a solution where the user just uses the app and the data sync is
completely transparent.
I suppose I could just wrap all that into a background thread that just
fires when it can periodically and replaces the database SDF on the device.
Problem has always been that the SDF might be being used when the new SDF is
generated so there's got to be a smooth switch of fresh(less stale)
databgase for the more stale one.
 
G

Ginny Caughey [MVP]

Harry,

Since SQL Compact supports multiple simultaneous connections to the database
from the same machine, you should be able to update the sdf file from a
separate thread or process if you use perhaps Web Services and read/write
the data yourself rather than using RDA. Sync Services would really be
ideal, but then we've discussed that already.
 
H

Harry Simpson

Really would not need to connect but once at a time. The local app would
use the SDF on the device for "current" data.
Looking at the Mobile Client Application block's Disconnected Application
Block too. Every messed with that Ginny?
 
D

Daniel Moth

Please note that I have nothing to offer to this thread beyond the URLs
below:
I was thinking that the Sync Services (?) was a subset and included in
VS2008 but that the Sync Framework was the bigger piece.

That's correct. ADO.NET Sync Services v1.0 shipped with VS2008. It is the
first step towards the Sync Framework.

Articles on each one of those in the CODE magasine issue distributed at Tech
Ed Europe:
http://www.code-magazine.com/Article.aspx?quickid=990712092
http://www.code-magazine.com/Article.aspx?quickid=990712102

The official home page:
http://msdn2.microsoft.com/en-gb/sync/default.aspx

HTH

Cheers
Daniel
 
G

Ginny Caughey [MVP]

Harry,

I haven't used the Disconnected Application Block in my code, but I am
familiar with it.
 
H

Harry Simpson

Thanks Ginny and Daniel,

I'm just looking to jump into use of these tools and want to make sure I'm
jumping into the right pool. Its confusing to me to say the least - Even
the Code article intermengles Sync Services for ADO.NET and Sync Framework
as if they were the same thing. The way i understand it, the only bits I
can use are Sync Services for ADO.NET v.1 which is "included in VS2008" but
when I try to find reference to this in the help it's like it doesn't exist.
Now my boss tells me that he doesn't think it will work with smart device
projects at all.
So from a Windows Mobile 5 developer standpoint none of this can be used -
correct?

I've also had a terrible head cold/flu which doesn't help either.

I'm just trying to get the big picture before I dive deeper into any
particular technology.

Thanks and Merry Christmas to all
Harry
 
G

Ginny Caughey [MVP]

Harry,

Your boss is correct for now, but this will be changing sometime in the new
year. Merry Christmas to you too! Hope you'll be feeling better soon.
 
H

Harry Simpson

Thanks Ginny,
Barely survived.....
I'll put this on hold and see what comes about. Guess for now I can just try
to move the whole sync that I'm already doing to a background thread. And
suppose it would be possible to copy the recently synced SDF over the
existing one on the device in a split second right?

So the app may be calling the stale database and then after syncing in the
background thread I just copy one SDF (just synced) over the working one the
app uses? Is this what most are doing now?

Thanks!!
Harry
 
G

Ginny Caughey [MVP]

Harry,

The only problem I see with that plan would be if the SDF file you want to
replace is in use by another thread, but probably you've already thought of
that.

I think in practice people are using a variety of syncing techniques
depending on the situation.
 
H

Harry Simpson

That's "the problem" partially solved by at least just updating a separate
SDF database which is the duplicate of the working one the app is actually
using.
The trick would be to "copy" the updated one over the working one in a
locked fashion.

Anyone doing this?

Harry
 
G

Ginny Caughey [MVP]

Harry,

The only way I can see to update the database already in use would be to
write code that determines when a row needed updating, similar to what the
Sync Framework does under the covers using a TimeStamp or LastEditDate
column.
 
H

Harry Simpson

Ginny,

Could you not "lock the app" in some way and simply make the IO copy of the
one SDF over the other SDF on the device. Just copy the updated database
into the active directory where the SDF the app actually hits is located?

Harry
 
G

Ginny Caughey [MVP]

Harry,

Well yes I guess you could but since I haven't done it I couldn't recommend
the exact best way to do it. I tend to think more along the lines of
multi-user access to the same data rather than somehow locking one user out
while another does an update, but just because my brain is prejudiced that
doesn't mean it's necessarily the best approach here.
 
H

Harry Simpson

For the most part I'd just be doing a RDA PULL - the only uploading would be
logs via Web service.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top