The Artima Developer Community
Sponsored Link

Java Answers Forum
Simulation of Lamport logical clock in java[RMI]

10 replies on 1 page. Most recent reply: Apr 15, 2004 5:39 AM by Harpreet

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 10 replies on 1 page
Viswanatha Basavalingappa

Posts: 84
Nickname: viswagb
Registered: Nov, 2003

Simulation of Lamport logical clock in java[RMI] Posted: Mar 19, 2004 6:16 AM
Reply to this message Reply
Advertisement
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


Viswanatha Basavalingappa

Posts: 84
Nickname: viswagb
Registered: Nov, 2003

Re: Simulation of Lamport logical clock in java[RMI] Posted: Mar 23, 2004 1:18 AM
Reply to this message Reply
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.

If you guys know more then this let me know...

Viswa
----------

Viswanatha Basavalingappa

Posts: 84
Nickname: viswagb
Registered: Nov, 2003

Re: Simulation of Lamport logical clock in java[RMI] Posted: Mar 23, 2004 3:45 AM
Reply to this message Reply
Hi all,

After I did investigation on Logical clock. I was able to find some info.
I'm sharing with you all..

please go thro the following URL. it has implementaiton of Logical Clock.

read and understand the follwing java file.
It has lot of dependancy...

DistributedMutualExclusion.java.
MyObject.java
dimu.java

get more on...
Concurrent Programming Using Java
http://www.mcs.drexel.edu/~shartley/ConcProgJava/
Program and Library Class Source Code
http://www.mcs.drexel.edu/~shartley/ConcProgJava/bookJavaExamples.html


I hope this helps you...
Viswa

Myname

Posts: 1
Nickname: myacc
Registered: Mar, 2004

Re: Simulation of Lamport logical clock in java[RMI] Posted: Mar 23, 2004 8:05 PM
Reply to this message Reply
Hi!
Were you able to implement the question........ Lamport's Clock...
If so just help me out...............

MS-guy

Posts: 1
Nickname: ca
Registered: Mar, 2004

Re: Simulation of Lamport logical clock in java[RMI] Posted: Mar 25, 2004 12:26 AM
Reply to this message Reply
Hi there,

Even I need this info. Please Please do let me know if you were able to implement this.

Thanks !!!

Suba

Posts: 1
Nickname: suba
Registered: Mar, 2004

Re: Simulation of Lamport logical clock in java[RMI] Posted: Mar 27, 2004 1:17 AM
Reply to this message Reply
hi ,

i couldn't able to get the source code that u mentioned in the URL.
If u have that code plz send to me.

ctmraj@yahoo.com


thank u

AnandG

Posts: 1
Nickname: andyms2004
Registered: Mar, 2004

Re: Simulation of Lamport logical clock in java[RMI] Posted: Mar 28, 2004 12:08 PM
Reply to this message Reply
Am unable to access the link mentioned.Can you please send me the source code?

Harpreet

Posts: 3
Nickname: harrycoer
Registered: Apr, 2004

Re: Simulation of Lamport logical clock in java[RMI] Posted: Apr 11, 2004 5:36 AM
Reply to this message Reply
hi sir ,
i m doing work on this topic ..
unable to get the source code of this..
plz post it if u can on
ID: harpreet_roorkee@rediffmail.com

Viswanatha Basavalingappa

Posts: 84
Nickname: viswagb
Registered: Nov, 2003

Re: Simulation of Lamport logical clock in java[RMI] Posted: Apr 12, 2004 3:09 AM
Reply to this message Reply
I think now it is accessable..
guys..try now...

viswa

Harpreet

Posts: 3
Nickname: harrycoer
Registered: Apr, 2004

Re: Simulation of Lamport logical clock in java[RMI] Posted: Apr 12, 2004 7:49 AM
Reply to this message Reply
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.

Harpreet

Posts: 3
Nickname: harrycoer
Registered: Apr, 2004

Re: Simulation of Lamport logical clock in java[RMI] Posted: Apr 15, 2004 5:39 AM
Reply to this message Reply
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

Flat View: This topic has 10 replies on 1 page
Topic: Passing a parameter to Constructor error Previous Topic   Next Topic Topic: WebWork -  text tag

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use