Presentation is loading. Please wait.

Presentation is loading. Please wait.

Viney Sindhu Dr. Yanqing Zhang

Similar presentations


Presentation on theme: "Viney Sindhu Dr. Yanqing Zhang"— Presentation transcript:

1 Viney Sindhu Dr. Yanqing Zhang
Synchronization Viney Sindhu Dr. Yanqing Zhang

2 Agenda Overview Synchronization Techniques
WebDAV(Web Distributed Authoring and Versioning) Future Work References

3 What is Synchronization?
In general it is process of precisely coordinating or matching two or more activities, devices, or processes in time. It has various applications, for e.g. operating systems, web applications, mobile development etc.

4 Two types of Synchronization
Process synchronization Data synchronization modification Process A Process B System A System B Time Data item 1 modification Process Process Synchronization Data Item 1 Data Item 1 Process A correspondance modification 1: 1 Synchronization 1: 1 Synchronization Data item 1 Time Main System Process B modification Data Item 1 Data item 1

5 Synchronization Solutions
File system oriented: Unix tool rsync: Incremental exchange of files Coda file system Version control systems: CVS WEBDav protocol: HTTP based file transfer protocol Locking and Versioning included Mobile Application oriented: Microsoft Active Sync: Synchronization between Desktop and Windows CE mobile devices

6 What is WebDAV? Web-based Distributed Authoring and Versioning
“DAV” is the usual short form Provides a simple means to lock a shared document, and to create, delete, copy, and move documents from remote Web servers. Turns the Web into a writeable medium Applies to all kinds of content - not just HTML and images Based on extensions to HTTP

7 WebDAV Infrastructure
DAV can provide infrastructure for: Collaboration Metadata Namespace management Ordered collections Versioning Access control Searching

8 How WebDAV works? To synchronize concurrent access to a shared document, WebDAV supports a simple locking mechanism There are two types of write locks Exclusive Write Shared Write

9 Exclusive Write An exclusive write lock can be assigned to a single client, and will prevent any other client from modifying the shared document while it is locked

10 Shared Write A shared write lock, which allows multiple clients to simultaneously update the document Shared write locks are convenient when clients modify different parts of the same document The clients, themselves, will need to take care that no write-write conflicts occur

11 WebDAV Assigning a lock is done by passing a lock token to the requesting client. The server registers which client currently has the lock token Whenever the client wants to modify the document, it sends an HTTP post request to the server, along with the lock token The token shows that the client has write-access to the document, for which reason the server will carry out the request

12 WebDAV Special Feature
There is no need to maintain a connection between the client and the server while holding the lock The client can simply disconnect from the server after acquiring the lock and reconnect to the server when sending an HTTP request

13 How to synchronize the execution of multiple threads of same process ?
Spin Locks Semaphores

14 Spin Locks Busy waits waste CPU cycles.
Can use in interrupt context, as does not sleep. Cannot use when code sleeps while holding lock. Use for locks held a short time.

15 Semaphores Context switch on sleep is expensive.
Sleeps, so cannot use in interrupt context. Can use when code sleeps while holding lock. Use for locks that held a long time.

16 Future Work When a client holding a lock token crashes, the server will one way or the other have to reclaim the lock It does not specify how servers should handle these and similar situations, but leaves that open to specific implementations The reasoning is that the best solution will depend on the type of documents that WebDAV is being used for

17 References https://en.wikipedia.org/wiki/WebDAV
Dridi, F.; Neumann, G., "How to implement Web-based groupware systems based on WebDAV," in Enabling Technologies: Infrastructure for Collaborative Enterprises, (WET ICE '99) Proceedings. IEEE 8th International Workshops on , vol., no., pp , 1999 based_systems.pdf df

18 Questions?

19 Thank You


Download ppt "Viney Sindhu Dr. Yanqing Zhang"

Similar presentations


Ads by Google