Re: Order of Delivery

Nati Shalom <[email protected]>
Newsgroups gmane.comp.java.sun.javaspaces
Message-ID <[email protected]>
Stephen

I think that Dan answered your question quite well (as he usually do:))
I just wanted to clear up the remarks regarding GigaSpaces behavior on that
respect which as Dan rightly said are currently a proprietary extension to
the spec. In my view the fact that two out of the three implementation of
the JavaSpaces  supports such extension, indicate a real need for it which
justify a change of the current spec.
The standard API that we provide for such feature is based on JMS i.e. we
provide a full (Virtual) JMS implementation of the on-top of our clustered
space implementation.

>"Dan Creswell wrote:
Maybe - again, depends on the implementation.  Outrigger is roughly FIFO
whilst Blitz (my implementation) will favour what's currently in cache
(typically recently touched Entry's which just have been written or recently
considered for matching etc).  I don't know about GigaSpaces."

As mentioned earlier GigaSpaces provides FIFO support in both the take/read
operations as well as with notify. The level of granularity of the FIFO
behavior can be on a per space/entry-class/entry-instance depending on your
specific need. The design behind that feature was geared toward maintaining
scalability and performance while maintaining FIFO support, requirements
which are often conceived as contradicting requirements.

You can find more information on that feature on our online documentation:
http://www.gigaspaces.com/docs/doc/FIFO.htm


Nati S.
CTO GigaSpaces
www.gigaspaces.com











-----Original Message-----
From: Dan Creswell [mailto:[email protected]]
Sent: Thursday, March 24, 2005 1:32 PM
To: [email protected]
Subject: Re: Order of Delivery

Stephen Holly wrote:
> All,
>
> Does anyone know the order to which the JavaSpace serves up its entry's??
>

It's implementation dependent.

I'd recommend you read the JavaSpaces specification as it goes quite a
long way in making this clear.  In particular you should read the
sections on operation ordering and matching behaviour (under the
discussion of the read method).  There are further statements made in
the transactions section.


> For example, if the javaspace finds multiple matches for a clients 'take'
> request, which does it deliver?? After doing some testing I think it might
> be Last In First Out, or may be the one with the longest lease time
> available.
>

Maybe - again, depends on the implementation.  Outrigger is roughly FIFO
whilst Blitz (my implementation) will favour what's currently in cache
(typically recently touched Entry's which just have been written or
recently considered for matching etc).  I don't know about GigaSpaces.

Blitz provides options for enforcing FIFO ordering of Entry's (I think
GigaSpaces does too) but this is not required by the spec and is a
non-standard feature - i.e. you're playing with lock-in.

The non lock-in solution is to use one of the many queue'ing patterns
which just uses standard JavaSpaces operations to achieve the
appropriate form of ordering required by an application.

> 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.
>

I don't think this is a necessary enhancement because:

You could achieve this by having the client do it's take under a
transaction.  On error, you'd abort the transaction, on success you'd
commit.

Guess I'm saying you missed something but I may have mis-interpreted
your requirement (which may prevent you using transactions for some reason).

Hope that helps,

Dan.

===========================================================================
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/

===========================================================================
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.