Advice on choosing Providers for Silverlight clients RRS feed

  • Question

  • Hello:

    Silveright at present does not support a clientside Db under any Enterprise ready scenario (there's a Sqlite port that is not production ready, was holding out for VistaDb, until I read a post by them -- http://cc.bingj.com/cache.aspx?q=vistadb+silverlight&d=4535691696802424&mkt=en-NZ&setlang=en-NZ&w=8ac26acf,8aaafd0, and I don't see any mention of SqlServer CE being made portable any time soon.

    Therefore, for a Silverlight app, even in OOB mode, it appears the only options at present are: 
    DB4O: http://developer.db4o.com/Forums/tabid/98/aff/37/aft/8914/afv/topic/afpg/1/Default.aspx (Free if you GPL, unknown if you purchase).
    Perst: (I'll admit I'm a bit irked by their cagey promo text...can't tell if its free for Silverlight or not...probably not) 
    Siqgodb: http://siaqodb.com/ (no free/GPL solution to use while investigating whether it is Enterprise ready...it is the newest on the block after all).
    SilverlightDB: http://silverdb.codeplex.com/ (rather raw (no LINQ) but free and open source...this could become interesting over time).

    And yes -- I know that the SyncFx 2.0 doesn't support Silverlight, but it appears (http://blogs.msdn.com/sync/archive/2010/03/01/organize-yourself-at-mix10-using-mix10-session-planner-beta.aspx)to be coming as part of Sync Fx 3.0 (although does anybody have an idea of ETA?) and hopefully any Eterprise solution you start today will be finished by when SyncFx 3.0 is released in a stable enough way to use... I hope.

    The point is -- for a future dev roadmap, I don't think I can bank on a Db based provider in SyncFx.

    So my questions are:
    a) to save myself pain, has anyone written a Standard Provider that wraps a SQL db on one end, and an Object db on the other?  Is it publicly available to download?
    b) if so, or simply have enough experience to have a good idea of what this direction would entail, any advice, pitfalls to watch out for (I'm brand new to SyncFx btw)?
    c) I'm greatly concerned about upgrades/schema changes in the future. I see there is functionality in the Db based provider for such a scenario...but no mention of this for Custom Standard Providers. Does anybody know of a sample, case study demonstrating how to do write/handle this scenario?
    d) Does anybody have a better suggestion, other than RIA Services, which I don't think is the solution to use for a Mobile app that is Occassionally Connected...or am I wrong about that?).

    Thanks immensly,

    • Edited by SkySigal Saturday, March 13, 2010 2:28 AM
    Friday, March 12, 2010 10:51 PM


All replies

  • Hi Sky,

    Unfortunately, it's not currently possible to use the Sync Framwork in Silverlight.  This is due to the fact that the Sync Framework relies on native code, which is not allowed in Silverlight.  We are, however, thinking about solutions around this.  The current Mix offline client at http://live.visitmix.com/SyncClient is built using some of our prototype and proof-of-concept stuff.  You can find more info in our blog post on it at http://blogs.msdn.com/sync/archive/2010/03/01/organize-yourself-at-mix10-using-mix10-session-planner-beta.aspx, or in our session at Mix: http://live.visitmix.com/MIX10/Sessions/SVC10.

    With regards to schema changes, it's unlikely that the things mentioned above will support this.  Our typical advice is to sync before a schema change and then reinitialize clients.

    SDE, Microsoft Sync Framework
    • Marked as answer by SkySigal Saturday, March 13, 2010 2:38 AM
    Saturday, March 13, 2010 12:11 AM
  • Hi Aaron:
    Thanks for your prompt reply.

    SyncFx v2/v3:
    Good to know that what is the reason it won't work on Silverlight, and that it is being worked on.
    Any vague idea of when v3 is expected to available for end user testing? Right after Mix? Or much later?
    I'll go look at the v3 sample more closely in a while: right now I'm neck deep in first trying to understand how to use v2.

    Schema changes:
    <<Our typical advice is to sync before a schema change and then reinitialize clients.>>
    I think I see where you are heading with this: basically download new updated clientside assemblies, containing the newest schema, and voila...
    Sort of defeats the purpose of P2P, but at least it works :-)

    Thank you,

    Saturday, March 13, 2010 2:38 AM
  • Hi Sky,

    When the video for the Mix session is posted, it should include some information on timing of the release.  I believe we are targeting a release of V3 by the end of 2010.

    Re: Schema changes.. When schema changes are done, there are a lot of moving parts, some of which you hit on.  There are also some other technical issues (when we sync the schema, what do we do if we lose fidelity sync from an instance of SQL Server through SQL ce to another instance of SQL Server...this starts to get into a bunch of complicated scenarios).  These aren't unsolvable, but we've had to make other features a priority, since typically schemas don't change frequently, and when they do, a new version of the app often has to be deployed, at which point, we recommend recreating the client database.

    SDE, Microsoft Sync Framework
    Monday, March 15, 2010 8:07 PM
  • Hi Aaron,

    Is that CY 2010 or FY 2010? :)

    Tuesday, March 16, 2010 2:54 AM
  • Hi Aaron...

    End of 2010? Ouch. Hopefully before Phone 7 hits the shelves...

    As for schema changes: For an LOB, you're right, schema's won't change often. But I'mthinking of a more modular/prism based community based app, where people can upload their modules, and not everybody is a software architect with great foresight...In such a case, schemas would change often ...but just in their module. 

    PS: Any chance SyncFx will lose its C++ underpinnings and become a purely managed set of assemblies? Or is there proprietary knowledge in there that is not suited to be made public? Could that part be made optional? The idea of having Silverlight being fully capable of Syncing P2P with other Mobile devices, using a DB4O database for storage would really be powerful... (Then again maybe there is a better way of doing that, which I havn't found yet...)

    Tuesday, March 16, 2010 6:05 AM
  • Hi Sky,

    Unfortunately, I doubt we will be getting rid of our native layer any time soon, mainly due to the fact that we'd have to rewrite our entire codebase and we would have to do all of our maintenance in two places.  If it's really important to you, I'd suggest voting at http://www.mygreatwindowsazureidea.com/forums/44459-sql-azure-data-sync-feature-voting.

    I should note that, as Mike pointed out in his talk, one benefit of the approach we're taking is that the clients no longer have to be solely on a MS stack (in his talk he demoed an iPhone app doing sync).  I'd really recommend taking a look at it.  Our goal is to provide something to which people can plug in their outside silverlight database implementations (like DB4O), while providing a simple implementation which works over the isolated store.

    In terms of Windows Phone, I don't believe that they've announced the availability of any networking outside of HTTP, so p2p sync is probably not an option.



    SDE, Microsoft Sync Framework
    Friday, March 19, 2010 12:11 AM
  • It would be very nice to see Sync work on a WM7 device right out of the box.  Peer-to-Peer would be nice, but sync with a server should be a top item on the WM7 list.  This is simply because cell coverate is never 100% (no matter what the marketing department of the service providers tell you).

    Thursday, March 25, 2010 5:50 PM