locked
wcf based sample for sync service RRS feed

  • Question

  • Hi Rafik
    Thanks for the great example.
    I was actually looking out for a viable solution to implement sync feature with our product.
    Ours is a health care product and we need to make available the application and the data (partail content) to doctors who go to remote locations to visit patients.

    I was looking out for various options like SCOAB, SQL Merger Replication, etc..
    finally got hold of the ADO.Net sync service, and I hope this would provide me with the right solution to for adoption.

    I initially had a look at the webcast from Steve, was pretty interesting and then was looking out for samples, which I could run through. then luckily happened to come across your samples, which were of great help.

    Rafik, do you also have a sample which demostrates a n-tier scenarion, that is the sync being handled by a webservice or  wcf service, cause in out product I am desigining all the communication part to be handled through WCF services.(.net 3.0)

    Some sample on that lines would be a great help.

    I would come up with more queries and hope it wouldn,t be a problem for you to guide us on this area.

    Thanks n great work..

     

    • Moved by Max Wang_1983 Friday, April 22, 2011 11:21 PM forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Monday, January 29, 2007 8:38 AM

All replies

  •  

    Hi there,

    My plan is that Demo III will cover the n-tier with web services. I am working on it as we speak and should post it today or tomorrow.
    I'd like to learn more about your scenario though, here are few questions I have in mind:

    + In average, how many tables\rows on the backend server and how many of those you expect to take offline? 
    + What type of devices doctors are carrying around?
    + How are you filtering the "partial content"?

    Thanks!

    Monday, January 29, 2007 5:07 PM
  • Hi Rafik

    Thanks a lot for the quick response.

    Demo III would be of great help.

    Sure, I would be happy to share the screnario (as much as I can) with you and get your inputs on the same.

    The product is basically a desktop application, used by doctors when they are in thier practice locations and would also need the application not the complete set but certain feature when they visit a patient on a remote location (away from the practice).

    The idea is to provide the doctors with a subset of the data for a patient/multiple patients and few operations which they can perfom on them while in a dis-connected mode and then provide sync capability when they get back to the practice.

    To answers your queries:

    + In average, how many tables\rows on the backend server and how many of those you expect to take offline? 
    - I wouldn't be in a state to give you the excat count of tables, but an rough estimate would be around 120 tables on the back-end server and would require about 25-30 tables offline.

    + What type of devices doctors are carrying around?
    - The doctors would be carrying Tablet PC's (running Win XP Tablet PC edition) for now and we may have requirements in future for PDA'a.
    + How are you filtering the "partial content"?
    - Even I am not sure as to how to approach for this, I would like to put back the question to you, but when I mean partial content, it is subset of the data to be made available, say for example the back-end server has 1000 rows for patients but the doctor may just need to carry with him 100 rows file on visit. What approach would be best to accomlplish this.

    I also have some more queries which just came across my mind today:
    1. We also have to support for availability of documents/images on the filed unit for doctors on the move. These could be for example medical history documents and images could be Diagnosis Images/X-Rays, etc..(big in size), Now the doctors can also make changes to the documents and if possible could do annotations to the images while on remote location and when they get back to the practice these also needs to be synchronised to the db server. So what could be the best way to accom;ish this, Do you suggest storing docs/images on the db server and making it available through sync or if its on a physical network location, how can I perform sync operations seamlessly on them.

    2. What would be the typical back-end db server requirement for using the syn services. Is SQL Server 2005 a must or would any flavor or SQL Server be supported.

    3. I am making use of SQL Ev as my client side database, is this a good option or can I make use of any other flavor of client side SQL DB.

     

    Wednesday, January 31, 2007 2:04 PM
  • Thanks for sharing your scenario with me.

     

    I think you have a great scenario in which Synchronization Services for ADO.NET was designed to address. You touched on several issues, let me give you my thoughts:

     

    1- Regarding Partial Content

    The sync services gives you full power to decide how you want to partition your data. This is done through two layers:

     

    On the server: you can pick the columns you want through the set of db commands you write on the SyncAdapter. This allows you to do vertical partitioning.

     

    On the client: If you examine the SyncAgent interface, you will find a SyncParameter collection property. In your scenario, you could create SyncParamter for doctor’s name, or id. This value will be passed to the server during sync which means you can use it as part of your db command to pick those rows that belong to that doctor only and skip the rest. This way you achieve horizontal partitioning of you data. You can define more sync parameters on the client to help you filter your data in any desired way.

     

    2- Synchronizing files along with relational data

    Well, ADO.NET sync framework is only for relational data and thus it does not handle any file sync for you. While putting files in the database might work for SQL Server Express and above, it could prove to be problematic for SQL CE, especially for large files. I think using a network share and\or windows client side cashing to achieve this might be a good solution for file sync.

     

          3-  Backend database
    The sync framework works with any backend as long as you have ADO.NET provider for it. This include SQL Server product line (2000, 2005, etc), Oracle, DB2 .. etc

     

          4-  Client database
    SQLCE (old name was SQLEv) is the database of choice for Sync Services. For any other database you want to use as a client, you will need to write a ClientSyncProvider for it. Sync Services provides one for SQLCE.


    Thanks

    Friday, February 2, 2007 6:01 PM
  • Hi Rafik

    Thanks a lot for the response and for the encouragement, i was all through waiting to go ahead and adopt sync services.

    Just few more questions so that I can move ahead with my implementation.

    Point 4 Client Database.

    Is SQL Ev an old version, I was under the impression that SQL Ev is replacing SQL CE and MSDE and the new version of DB for mobile and desktop (single user) DB.? Pls clarify.

    Say for example I want to use SQL Express / MSDE on my client machine as local DB, do I have a to write a ClientSyncProvider for it, if  I have to how laborious is that work.

    Point 2 Synchronising docs and images.

    Do you have and articles/samples/links etc..which can help me get an idea as to how do I implement this programatically.

    Thanks

    Rajesh

     

     

    Monday, February 5, 2007 9:03 AM
  • Rajesh,

    SQL Ev is the old name, SQLCE is the new name. SQLCE is the good old SQL Mobile but now runs on devices as well as desktop.

    If you choose to use MSDE or SQL Express as the client database, you will have to implement ClientSyncProvider. Well, personally I would avoid doing that if I can. However, the good news is that you can reuse the code you will write for the server side anyways.

    As for file sync, I don't have a link handy for this. Try to lookup "Client Side Caching" and "Sharepoint Services 3.0".

    Tuesday, February 6, 2007 5:47 AM