I need to implement the Lamport logical clock in java. does any one has idea how we can do this in java. basicaly simulation of this algorithm
If you don't know about it, here it is about the logical clock.
Distributed systems
· A collection of computers that do not share a common clock and a common memory · Processes in a distributed system exchange information over the communication channel, the message delay is unpredictable. Inherent limitations of a distributed system Absence of a global clock Distributed processes cannot rely on having an accurate view of global state, due to transmission delays. Effectively, we cannot talk meaningfully about global state. The traditional notions of "time" and "state" do not work in distributed systems. We need to develop some concepts that are corresponding to "time" and "state" in a uniprocessor system.
Lamport's logical clocks
· the "time" concept in distributed systems -- used to order events in a distributed system. · assumption: o the execution of a process is characterized by a sequence of events. An event can be the execution of one instruction or of one procedure. o sending a message is one event, receiving a message is one event. · The events in a distributed system are not total chaos. Under some conditions, it is possible to ascertain the order of the events. Lamport's logical clocks try to catch this.
[/pre] please let me know your comments and java implementation Design./code
Hi, I'm not yet got the Java Implementation of Logical clock [ Lamport clcok]. but right now I'm trying to implement the following logic using simple java class using Thread.
Implementing Logical Clocks
. Each process maintains its own logical clock, which assigns times to events in that process.
. Each process increments its logical clock between successive events.
. Each message contains a timestamp whose value is the time at which the message was sent.
. Upon receiving a message, a process sets its clock greater than or equal to its present value and greater than the timestamp.
The file LamportClock.pdf is having error while opening ... This algorithm can also be implemented using applets called on single html page i.e. using animator or that sort.. .... Can u make the source code available for that.
your lamport.pdf is not getting opened... please make the source code available my id is harpreet_roorkee@rediffmail.com if the source code can be made for multiple applets running on the same html page