Re: Order of Delivery

"John W. F. Mcclain" <[email protected]>
Newsgroups gmane.comp.java.sun.javaspaces
Organization Sun Microsystems, Inc.
Message-ID <[email protected]>
Stephen Holly wrote:

> Also, do you think it would be a good enhancement if the Entry class held
> the lease time available in a data member?? I have a system where on error
> the client writes back the entry to the space. It would be good if on
> writing it back, you could leve it as if the client had not touched it
> (with the same lease time). I know I could easily implement it myself but
> I think it is probibly a common situation, and therefore warrants being
> there as standard. However maybe I have missed some functionality as I am
> new to Jini.

The mechanism I have been kicking around for this sort of problem
is template based leasing. With template based leases clients could
create and register sets of templates with the space. Each set would
have a lease. Any entry in the space that matched one or more templates
in one or more active sets would stay in the space even if that entry's
individual lease had expired (modulo takes of course).

This has the effect of decoupling the `ownership' of an entry from
the client who wrote it, allows multiple clients to be responsible for the
same entry, and keeps leasing from imposing a (really poor) notion
identity on entries.

Take the classical space based compute server model. A worker takes a Task
out and writes back a Result, the worker is responsible for picking the
initial lease time on the Result and maintaining that lease, but the worker has
no real stake in the Result. With template based leases the entity submitting
the tasks would create a template set with two templates, one that would
match all of the Tasks it submitted, the other would match all the results. Now
when the worker wrote the results it could actually use 0 for the lease time
and ignore the Lease object it got back but as long as the submitter renewed
its lease all of its results would stay in the space.

Do you think template based leasing address your issue?

--
BTW, if you want to reply to this message, please direct your reply
to the list, thanks

John McClain                                    [email protected]
Sun Microsystems, Inc.
Burlington, MA

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man. - George Bernard Shaw

===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff JAVASPACES-USERS".  For general help, send email to
[email protected] and include in the body of the message "help".

To view past JAVASPACES-USERS postings, please see:
http://archives.java.sun.com/archives/javaspaces-users.html

JDC members can download the JavaSpaces(tm) Technology from:
http://developer.java.sun.com/developer/products/jini/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.