Re: Pattern for One-Entry-Multiple-Workers Problem

"John McClain - Sun Microsystems, Inc." <[email protected]>
Newsgroups gmane.comp.java.sun.javaspaces
Message-ID <[email protected]>
Stefan Schulz wrote:
> John McClain - Sun Microsystems, Inc. wrote:
>
>> Stefan Schulz wrote:
>>
>>> In the end, there is still the alternative to (externally) trigger a
>>> contents()/iterator-base operation, as mentioned by Gregg. Although, not
>>> very elegant, maybe the easiest and most complete way to do it. Hm.
>>
>>
>> Just so I can understand, can you write about why you consider
>> a contents based solution "inelegant"?
>
>
> It's non-elegant in my scenario, as each worker would have to touch all
> matching entries instead of only the one(s) yet unprocessed by him.
>
> In a scenario, where only one result is expected, a worker could react
> upon receiving a notification, (try to) take the entry and either
> "replace" the entry with the result entry or "mark" the entry to be
> processed. Hence, each requesting entry only is read once by a worker.
>
> In my scenario, however, multiple independent results of an undetermined
> number are expected as response to one requesting entry. Using
> contents(), each worker has to read such entries multiple times, as they
> do not get "consumed", until the requesting manager decides to.
>
> I think, the Call for Papers-Example makes it easier to understand:
> you can either ask your students to read all the CfPs kept as unordered
> stack on the secretaries desk regularily, triggered by an email stating
> that "a new CfP has arrived", or you send a new CfP (as a copy and
> notification in once) to each of them.
>
> I learned that the latter obviously is possible by using availability
> notifications in JavaSpace05. To guarantee a worker seeing all
> requesting entries, however, the contents() method would still have to
> be applied. Hence, the contents() approach seems more complete.

Just so I can nail this down in my head, do you view the "contents +
availability event" approach inelegant too? Or is your elegants issue
only with using contents w/o the availability event?

What rate are the your "CfPs" being generated at? Are they being
generated by one entity or many? How much time does it take respond to a
CfP? How many responses do you expect to get from a single CfP?

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

A business that makes nothing but money, is a poor business.
    - Henry Ford

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