Forum: Ruby Four Rinda Questions

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
8a250740e9b34b66f0a09d3a1eb250d3?d=identicon&s=25 a.griesser (Guest)
on 2005-11-20 22:40
(Received via mailing list)
Rinda looks very interesting, but appears to differ in puzzling ways
from the Linda model descriptions of Carriero and Gelernter.  Perhaps
someone has read the source and can answer these questions:

* Does Rinda support 'live'  tuples, in the Gelernter sense of
containing running processes, rather than the Rinda::TupleEntry
.alive? sense of 'not cancelled and not expired'?

* Can somebody explain Tuple expiration?  I mean Rinda::SimpleRenewer,
Rinda::TupleSpace.new(period), etc.  Based on the docs, it sounds like
my Tuples should have vanished, but they don't seem to in practice.
Frankly I don't want part of my computational state disappearing! Why
would anybody? Can this feature be turned off/on?

* What do the 'sec' arguments in Rinda::TupleSpace .read and .take do?
 They don't seem to time out requests that go to sleep waiting for an
existing Tuple.

* What do the blocks for Rinda::TupleSpace .read and .take do?

Thanks!
58479f76374a3ba3c69b9804163f39f4?d=identicon&s=25 drbrain (Guest)
on 2005-11-21 19:33
(Received via mailing list)
On Nov 20, 2005, at 1:38 PM, entropic_rune wrote:

> Rinda looks very interesting, but appears to differ in puzzling ways
> from the Linda model descriptions of Carriero and Gelernter.  Perhaps
> someone has read the source and can answer these questions:
>
> * Does Rinda support 'live'  tuples, in the Gelernter sense of
> containing running processes, rather than the Rinda::TupleEntry
> .alive? sense of 'not cancelled and not expired'?

No.  You could make something similar by using references to a Thread.

> * Can somebody explain Tuple expiration?  I mean Rinda::SimpleRenewer,
> Rinda::TupleSpace.new(period), etc.  Based on the docs, it sounds like
> my Tuples should have vanished, but they don't seem to in practice.
> Frankly I don't want part of my computational state disappearing! Why
> would anybody? Can this feature be turned off/on?

nil says "This tuple never expires".

false says "This tuple is always expired".

A Numeric is treated as a TTL in seconds.

A SimpleRenewer sets a recheck interval, so the liveness will be
checked every so-many seconds.

> * What do the 'sec' arguments in Rinda::TupleSpace .read and .take do?
>  They don't seem to time out requests that go to sleep waiting for an
> existing Tuple.

They should cause read/take to raise a RequestExpiredError when the
tuple expires.  I'm not sure why it wouldn't, I haven't used it yet.

> * What do the blocks for Rinda::TupleSpace .read and .take do?

They yield the WaitTemplateEntry created for reading/taking from the
TupleSpace.  You could use it to cancel the action.
This topic is locked and can not be replied to.