Re: Depending on policy [was Re: Implementation of take (multiple) in Jini starter kit]
Gregg Wonderly <[email protected]>
| Newsgroups | gmane.comp.java.sun.javaspaces |
|---|---|
| Message-ID | <[email protected]> |
Chee Mun Foong wrote: > John, > Previously, we misunderstood the semantic of take(templates, > transaction,0,maxEntries) as > > "take maxEntries matching entries in space" > > instead of > > "take maxEntries matching entries in space, except when your > javaspace instance configuration dictates a smaller bounding number" > > Now that we realized such stipulation with the function, writing a > loop to ensure thorough "takes" will be sensible. The only possible > danger of the semantic is that if another remote process is writing > matching entries at a similar or higher rate of the taking, the loop > can be infinite. To help put bounds on this kinds of situations, as with most distributed systems, there needs to be some kind of natural latency injection that serves as a balancing force between all producers and consumers. Typically, some sort of end to end handshake is useful. Another way is to use bounded queues at each juncture in processing so that some parallelization and independence of load is possible, but a practicle limit is maintained on total compute or networking obligation that can be placed on any one componenent. The new java.util.concurrent stuff in JDK1.5 can make it a lot easier to incorporate bounded queuing. Gregg Wonderly =========================================================================== 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