Re: Implementation of take (multiple) in Jini starter kit
"John McClain - Sun Microsystems, Inc." <[email protected]>
| Newsgroups | gmane.comp.java.sun.javaspaces |
|---|---|
| Message-ID | <[email protected]> |
John McClain - Sun Microsystems, Inc. wrote: > Gregg Wonderly wrote: >> John McClain - Sun Microsystems, Inc. wrote: >>> Having said all that, for me the main motivation for the phrase "an >>> implementation may chose to take fewer entries from the space than the >>> maximum available or the maximum allowed by maxEntries" was so the space >>> could protect itself from have to load all the entries into memory so it >>> could ship them back to the client... >> >> John, given the use of a smart proxy, and a streaming connection from >> the server to the client, it would be possible for the server to load >> a small number at a time, and then write those batches through the >> stream to the client, where the client iterator could make these >> small groups look like one batch could it not? > > Yes (though I am guessing you have to be careful about how you mark the > entries as removed...), One other wrinkle, I think if take multiple was doing multiple rpc calls (or streaming) under the covers and it got a few entries, but then one of the call failed (or the connection was broken) before the take completed you would have to either throw away the entries you got and fail the whole top level call with a RemoteException, or do some sort of fix up work with a new call (or connection) (which would be potentially tricky and if it failed you would have to fail two whole top level call anyway). -- 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 And it is that way today. We are tricked by hope into starting companies, beginning books, immigrating to this country and investing in telecom networks. The challenges turn out to be tougher than we imagined. Our excessive optimism is exposed. New skills are demanded. But nothing important was ever begun in a prudential frame of mind. - David Brooks =========================================================================== 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