Re: Implementation of take (multiple) in Jini starter kit

James Grahn <[email protected]>
Newsgroups gmane.comp.java.sun.javaspaces
Message-ID <[email protected]>
John McClain - Sun Microsystems, Inc. wrote:
> James Grahn wrote:
>> We'll most likely change the setting to Integer.MAX_VALUE since our
>> processes usually have ample memory,
>
> The other considerations besides memory in the client are :
>
>    o if the client can incrementally process the entries
>      then using a smaller batch size (either via takeMultipleLimit
>      or maxEntries) can increase the concurrency of your system.

True.   In those situations, maxEntries should be used to parallelize
the system.

However, in sequential portions of the code which demand all entries
matching a template be removed from space, it is intuitive to perform
that operation as a take multiple.

>    o under some circumstances (as alluded to before) it seems very
>      large batches can be less efficient than smaller batches

Also true.   We'll need to keep this in mind as a possible optimization.
   The maxEntries parameter can be used for that optimization when it
proves necessary, correct?

>> and that will adhere to our expected behavior.
>
> What is the behavior you expect?

That take multiple will take maxEntries entries from the space if
maxEntries exist (allowing for other things like availability, timeouts,
etc).   Integer.MAX_VALUE is a reasonable limit on this, since we should
have far fewer entries in space than that.

We expected that behavior because the maxEntries parameter seemingly
allows for the previously mentioned optimizations without any need to
change the configuration.   We had not anticipated an external
configuration setting would override the maxEntries parameter (despite
the javadoc proviso).

James Grahn

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