Re: Pattern for One-Entry-Multiple-Workers Problem
Mark Brouwer <[email protected]>
| Newsgroups | gmane.comp.java.sun.javaspaces |
|---|---|
| Organization | Virgil BV |
| Message-ID | <[email protected]> |
Stefan Schulz wrote: > Hi, > > from the response I understand, that my problem description was not > clear enough. > > I shouldn't have used Xij but Yj(Xi), i.e. a Worker Wj produces exactly > one new entry Yj based on the input Xi. This is done by all of the > Workers concurrently, without them knowing about each other, and for: > j != k > follows that > Yj(Xi) != Yk(Xi). > > The Xi and Yj(Xi) stay in the space until the manager decides the > process to be finished, than he will take the Xi and all accordingly > produced Yj(Xi) from the space. > > The ordered distributed data structure would not help, as it assumes the > Xi to be consumed and only one output is expected from any of the > Workers, which is not the case. Must admit I haven't read the followup mails and not sure whether I grasped all the details, but the above could be accomplished by a distributed linked list in which the tasks will be submitted and for each task the manager should create a channel. The channel can be used by the workers to submit their result too. In case the manager decides the process is finished it could remove the entry from the linked list and reads the entries in the channel and removes the channel too. Haven't given it much thought, but could work if you don't want to rely on events. -- Mark =========================================================================== 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/