locked
How should I implement this type of sync RRS feed

  • Question

  • Hi,

    I am a total NEWBIE regarding the SYNC framework.

    I need to compose a small service that will do the following, and I wanted to know if SYNC FRAMEWORK is the solution for me :

    The service will get a request via MSMQ for a file, and will check if the LOCAL COPY of the file is identical (or even exists) to the REMOTE COPY of the file (or folder).

    If it is identical - it will return a message via MSMQ saying 'synced'.

    If it is not identical - it will get the REMOTE COPY ALWAYS (local changes must be discarded).

    If the REMOTE COPY was deleted - it SHOULD DELETE THE LOCAL COPY.

    If the LOCAL COPY does not exist - it should COPY THE REMOTE COPY locally.



    Should I use SYNC FRAMEWORK for this ?

    Or should I just write an app that checks the SIZE+DATE MODIFIED of both copies to determine if they are identical ?

    I just don't know if SYNC FRAMEWORK can give this functionallity ?

    (that ALWAYS copies the REMOTE FILE, and if it doesn't exist - DELETES THE LOCAL COPY).

    Thank you very much in advance !
    Sunday, August 23, 2009 7:51 AM

All replies

  • Hi,

    I am a total NEWBIE regarding the SYNC framework.

    I need to compose a small service that will do the following, and I wanted to know if SYNC FRAMEWORK is the solution for me :

    The service will get a request via MSMQ for a file, and will check if the LOCAL COPY of the file is identical (or even exists) to the REMOTE COPY of the file (or folder).

    If it is identical - it will return a message via MSMQ saying 'synced'.

    If it is not identical - it will get the REMOTE COPY ALWAYS (local changes must be discarded).

    If the REMOTE COPY was deleted - it SHOULD DELETE THE LOCAL COPY.

    If the LOCAL COPY does not exist - it should COPY THE REMOTE COPY locally.



    Should I use SYNC FRAMEWORK for this ?

    Or should I just write an app that checks the SIZE+DATE MODIFIED of both copies to determine if they are identical ?

    I just don't know if SYNC FRAMEWORK can give this functionallity ?

    (that ALWAYS copies the REMOTE FILE, and if it doesn't exist - DELETES THE LOCAL COPY).

    Thank you very much in advance !

    anyone can't help me ?


    Tuesday, August 25, 2009 1:06 PM
  • Hi John,

    Yes Sync framework can help you build a service that sychronizes files. Sync framework is transport independent so you can use the transport of your choice. It seems though that you have some contraints in which you have to build this system. If you can elaborate on the constraints a bit more and describe the scenario then we can discuss further.

    thanks
    Sudarshan
    Development Lead , Microsoft
    Wednesday, August 26, 2009 5:29 PM
    Moderator
  • Hi John,

    Yes Sync framework can help you build a service that sychronizes files. Sync framework is transport independent so you can use the transport of your choice. It seems though that you have some contraints in which you have to build this system. If you can elaborate on the constraints a bit more and describe the scenario then we can discuss further.

    thanks
    Sudarshan
    Development Lead , Microsoft
    Hi,

    Well - I'll try to elaborate as much as I can.
    We have a software here that needs to use large files.
    The problem is - these files are stored on our network.
    We have dozens of stations here with this software, and each station needs to access these large files on the network.
    The problem is - if each station now tries to access a 4-5 GB file on the network - it will 'kill' the network.

    So what I proposed was to write a service that will run on each computer, and our software would 'ask' the service for the desired file.
    If the file has not been synced to the local drive of that station - the software will start working with the 'remote' file, till the SYNC SERVICE will finish
    'bringing' the file to the local station, at which point the software will start using only the 'local' version.

    This means that only on the 'first' attemp to access a file on the network - it will be 'synced' to the local station, and after that the software will use only the local copy.

    A couple of problems :

    If the local copy exists but the 'remote' copy was deleted - the local copy should be deleted , too.
    If the local copy exists but the 'remote' copy is more updated - the remote copy should be synced to the local copy.
    If the local copy is updated - is should be 'discarded' and the remote copy should always be the one that is synced to the local station.

    The service has also additional 'smart' features like :
    * The size of the local 'cache' is limited to 20 GB, meaning - if the user has requested in the past 4 different files from the network, each one 5 GB large,
    and now requests to use a new 5 GB file - the 'oldest' 5 GB file will be deleted from the synced LOCAL folder, so there is space for the new 'remote' file to be synced.


    So ...

    Can I implement this using the SYNC FRAMEWORK ?

    I hope I've elaborated enough.
    If there are any more questions  - I would be glad to answer them.
    Thursday, August 27, 2009 6:31 AM
  • Hi John,

    Thanks for the details. It looks like what you are looking to do is similar to what CSC (Client Side Caching) provides on file access in Windows. Have you looked at that. If that satisfies your needs then you may not have to build this system.

    thanks
    Sudarshan
    Development Lead , Microsoft
    Thursday, August 27, 2009 11:14 PM
    Moderator