Re: General questions about Javaspaces
Gregg Wonderly <[email protected]>
| Newsgroups | gmane.comp.java.sun.javaspaces |
|---|---|
| Message-ID | <[email protected]> |
I don't recall seeing a response to this on the list... Grace wrote: > 1) Is there any way of dynamically scale the number of workers? For > instance, is there a way to have an upper limit of the number of workers per > machine but to spawn new workers when there are more tasks available then > workers? Currently, there's not a toolset that I'm aware of that tracks the work available, and controls works based on that. The easiest thing to do is to use a "taker" on each worker machine, that they uses one of the java.util.concurrent queues to submit the work items. A blocking queue with a reasonable limit on the max number of threads, would cause the "taker" to feed the queue as fast as work was available, but not overload the machine with too many threads. > 2) Could you point me to some instructions of how to set up a system with a > few clients each resides in a different machine putting tasks in the same > space and a few workers locating in different machines getting tasks and > processing it? There are many "worker" model examples around the jini.org web site. What version of Jini are you using, and what JDK? 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