Time Synchronization in a Collaboration Environment By Ahmet Uyar.

Slides:



Advertisements
Similar presentations
COS 461 Fall 1997 Time and Clocks u uses of time in distributed systems: –time-based algorithms (e.g. in security) –distributed make –gathering event traces.
Advertisements

Logical Clocks.
Brewer’s Conjecture and the Feasibility of Consistent, Available, Partition-Tolerant Web Services Authored by: Seth Gilbert and Nancy Lynch Presented by:
Wireless Sensor Networks Clock Synchronization Professor Jack Stankovic University of Virginia.
Notes: 11.2 Speed & Velocity.
Synchronization Chapter clock synchronization * 5.2 logical clocks * 5.3 global state * 5.4 election algorithm * 5.5 mutual exclusion * 5.6 distributed.
Time and Clock Primary standard = rotation of earth De facto primary standard = atomic clock (1 atomic second = 9,192,631,770 orbital transitions of Cesium.
From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Exercises for Chapter 14: TIME.
CS 582 / CMPE 481 Distributed Systems
Time Synchronization (RBS, Elson et al.) Presenter: Peter Sibley.
Slides for Chapter 10: Time and Global State
Teaching material based on Distributed Systems: Concepts and Design, Edition 3, Addison-Wesley Copyright © George Coulouris, Jean Dollimore, Tim.
Centralized Architectures
Distributed Systems CS Synchronization – Part II Lecture 8, Sep 28, 2011 Majd F. Sakr, Vinay Kolar, Mohammad Hammoud.
SynchronizationCS-4513, D-Term Synchronization in Distributed Systems CS-4513 D-Term 2007 (Slides include materials from Operating System Concepts,
Lecture 13 Synchronization (cont). EECE 411: Design of Distributed Software Applications Logistics Last quiz Max: 69 / Median: 52 / Min: 24 In a box outside.
Synchronization in Distributed Systems CS-4513 D-term Synchronization in Distributed Systems CS-4513 Distributed Computing Systems (Slides include.
Time, Clocks and the Ordering of Events in a Distributed System - by Leslie Lamport.
EEC-681/781 Distributed Computing Systems Lecture 10 Wenbing Zhao Cleveland State University.
Lecture 12 Synchronization. EECE 411: Design of Distributed Software Applications Summary so far … A distributed system is: a collection of independent.
Global Predicate Detection and Event Ordering. Our Problem To compute predicates over the state of a distributed application.
TIME, CLOCKS AND THE ORDERING OF EVENTS IN A DISTRIBUTED SYSTEM L. Lamport Computer Science Laboratory SRI International.
Lecture 2-1 CS 425/ECE 428 Distributed Systems Lecture 2 Time & Synchronization Reading: Klara Nahrstedt.
1 Physical Clocks need for time in distributed systems physical clocks and their problems synchronizing physical clocks u coordinated universal time (UTC)
A Security Analysis of the Network Time Protocol (NTP) Presentation by Tianen Liu.
Orbited Scaling Bi-directional web applications A presentation by Michael Carter
Computer Science Lecture 10, page 1 CS677: Distributed OS Last Class: Naming Name distribution: use hierarchies DNS X.500 and LDAP.
Synchronization. Why we need synchronization? It is important that multiple processes do not access shared resources simultaneously. Synchronization in.
Lamport’s Logical Clocks & Totally Ordered Multicasting.
Communication & Synchronization Why do processes communicate in DS? –To exchange messages –To synchronize processes Why do processes synchronize in DS?
Ch4a- 2 EE/CS/CPE Computer Organization  Seattle Pacific University Performance What differences do we see in performance? Almost all computers.
Time, Clocks, and the Ordering of Events in a Distributed System Leslie Lamport Massachusetts Computer Associates,Inc. Presented by Xiaofeng Xiao.
Time This powerpoint presentation has been adapted from: 1) sApr20.ppt.
Distributed Coordination. Turing Award r The Turing Award is recognized as the Nobel Prize of computing r Earlier this term the 2013 Turing Award went.
SWE 622- Distributed Systems Project Phase I Eric Barnes, David Chang, David Nelson Fisayo Oluwadiya, Xiang Shen.
CIS825 Lecture 2. Model Processors Communication medium.
Physical clock synchronization Question 1. Why is physical clock synchronization important? Question 2. With the price of atomic clocks or GPS coming down,
CS603 Clock Synchronization February 4, What is Clock Synchronization? All nodes agree on time What do we mean by time? –Monotonic –Any observation.
CS 3471 CS 347: Parallel and Distributed Data Management Notes13: Time and Clocks.
CS 347Notes 121 CS 347: Parallel and Distributed Data Management Notes12: Time and Clocks Hector Garcia-Molina.
Feb 15, 2001CSCI {4,6}900: Ubiquitous Computing1 Announcements.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Logical Clocks. Topics r Logical clocks r Totally-Ordered Multicasting.
Hwajung Lee. Primary standard = rotation of earth De facto primary standard = atomic clock (1 atomic second = 9,192,631,770 orbital transitions of Cesium.
Distributed Server Scheduler Eyal Serero Alex Fishgate Supervisor : Vitaly Suchin.
11-Jun-16CSE 542: Operating Systems1 Distributed systems Time, clocks, and the ordering of events in a distributed system Leslie Lamport. Communications.
Distributed Systems Lecture 5 Time and synchronization 1.
Game Loops + Part II Reference:
Distributed Computing
Time and Clock Primary standard = rotation of earth
CSE 486/586 Distributed Systems Time and Synchronization
Objectives Average Rate of Change
Time and Clock.
Logical time (Lamport)
Presentation by Wyatt Zacharias
Distributed Systems CS
Time and Clock.
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Chapter 5 (through section 5.4)
Exercises for Chapter 11: TIME AND GLOBAL STATES
Physical clock synchronization
CDK: Sections 11.1 – 11.4 TVS: Sections 6.1 – 6.2
Slides for Chapter 11: Time and Global State
Logical time (Lamport)
Chapter 1 Motion.
Logical time (Lamport)
Jenhui Chen Office number:
Slides for Chapter 14: Time and Global States
Logical time (Lamport)
CSE 542: Operating Systems
Presentation transcript:

Time Synchronization in a Collaboration Environment By Ahmet Uyar

Synchronization of Client times We would like to put a timestamp on every event fired during a collaboration meeting. So that we could replay the recorded events in the order they occurred. There may be some other usage of timestamps but replaying is the primary goal. So we need to synchronize the times of clients, since the computer clocks can vary by minutes or even by hours. At the beginning of each collaboration meeting, each client synchronizes its own time with the server time while exchanging some number of messages with the server.

Definitions We define these terms: delta: time difference between a client and the server delta = t_server – t_client t_server: server clock time. t_client: client clock time session_time: is equal to server time in theory and it will be the same for all clients, and will be put on each message as a timestamp. session_time = t_client + delta = t_server So our goal is to calculate delta for each client, since then we can calculate the session_time easily.

How we calculate the time difference (delta)-1 Client exchanges one message with the server like following: Client sends a message to the server requesting server’s current time and saves its own time (t_depart) Server receives the request message from the client and sends its current time (t_server) Client receives the reply message from the server and saves its current time (t_arrival) Assuming that travel times from client-to-server and from server-to- client are equals, we can determine the one way travel time t_travel = (t_arrival – t_depart)/2 Then delta is: delta = t_server + t_travel – t_arrival

How we calculate the time difference (delta)-2 We need to repeat this process many times. Some message exchanges take much longer than others. So we need to ignore those ones which take longer. We sort the message exchanges in increasing order according to their travel times and take into account only those which take less time. Then we take the average of their delta values. Currently we do 100 message exchanges and take 75 of them into account.

Problems – Solutions There are a few problems with time synchronization: I have implemented both the server and the client in Java and java increments the time by 10 or 11ms not by 1ms on PC. It increments by 1ms on Unix. Also computer clocks do not go at the same speed. For example In every hour, my PC's clock goes 118ms faster than dirac's clock. In every hour, my PC's clock goes 136ms faster than aspen's clock. In every hour, my PC's clock goes 142ms faster than wkkxt13’s clock (PC). In every hour, my PC's clock goes 212ms faster than wkkxt15's clock (PC). Solution to second problem: Since the difference between the clock speeds is linear, we can run the synchronization program in every 10 minutes for 3 times at the beginning and then we can adjust the delta in every 10 minutes accordingly.

Test Runs Server runs on dirac and client runs on apollo.ecs.syr.edu Travel time is around 33-34ms round trip and it can determine the time difference with an accuracy of 1-2ms. Server runs on apollo.ecs.syr.edu and client runs on wkkxt12.csit.fsu.edu Travel time is 30-40ms Accuracy of time difference is 1-2ms Server runs on dirac and client runs on a PC at Anabas in CA. Travel time is ms Accuracy is 2-3ms

Timeline Almost done, I need to add threading to the client to run this program in every 10 minutes.