jay-jayswal
2/23/2015 - 4:20 AM

Version Control System and Synchronization System between Desktop and Web applications

Version Control System and Synchronization System between Desktop and Web applications

Version Control System and Synchronization System between Desktop and Web applications

Activity log created at local desktop database

Steps:

  1. When internet connected, first update all activity log from local database to server.
  2. Download snippet info(xml) from database
  3. Compare it with local database (update newly created snippet from server to DA and delete snippet if it’s exist on DA but not at server.

Required Variables:

  • Snippet ID
  • Version Number
  • Version time stamp
  • Desktop app UID or Web app UID (Exception case)
  • Updated device ID
  1. Manage entry of new Code Snippet
CaseSolution
New snippet at server sideDownload latest and old version of that snippet and update local desktop database (at step 3)
New snippet at desktop appUpload latest and old version of that snippet and update server database (at step 1)
Exception Case:Consider situation when DA not connected to internet,And last snippet ID is 10005.If user add snippet via webapp then its ID will be 10006.But, client’s DA is not updated yet. So if user add another snippet at via Desktop app then it will also have ID 10006. And then if user connect to internet it will create conflict.1. Give every desktop app unique ID(DAUID) and register it with user. And make snippet ID and DAUID cluster primary key.So conflict can resolved by DAUID checking.(at step 1 & 3 both) OR 2. U have to restrict user to add snippet when Internet connection not available.
  1. Manage removing Code Snippet
CaseSolution
delete snippet at server from desktop appDelete snippet and it’s old version at server (step 1)
delete snippet at desktop app from serverDelete snippet and it’s old version at local database (step 3)
  1. Manage Version control (update) of code snippet
CaseSolution
update snippet at server from desktop appupdate snippet and store it’s old version at server (step 1)
Update snippet at desktop app from serverupdate snippet and store it’s old version at local database (step 3)
Exception case:Just like create exception case, If update made by both web app and DA then version no. will be same.At a time of first step we check time stamp too, If time stamp different then it means conflict occur, so upload all updates to server then re arrange it by time stamp then again download it. OR Don’t allow user to update snippet when internet is not available.