Re: Architecting a large multi-threaded process

2009-09-24 Thread Jimmy
From Mark Volkmann tutorial - http://java.ociweb.com/mark/clojure/article.html The send function uses a fixed thread pool (see the newFixedThreadPool method in java.util.concurrent.Executors) where the number of threads is the number of processors plus two. If all of those threads are busy, the

Architecting a large multi-threaded process

2009-09-23 Thread Brian Hurt
So, I'm working on a medium-largish server application in Clojure (medium amounts of code- currently 10KLOC and growing quickly, two people working on it now and hopefully more in the future. This isn't brag-worthy size, but it's large enough to start causing problems). Specifically, there will

Re: Architecting a large multi-threaded process

2009-09-23 Thread pmf
You might want to look into the stuff from JSR166 (scheduled for Java 7, but already available as a library for Java 6), which has advanced, built-in workload-balancing which is vastly easier than trying to do this with the raw, naive j.u.c.Executors-package (and Clojure's agents, which are

Re: Architecting a large multi-threaded process

2009-09-23 Thread Roger Gilliar
What I want is some way to schedule tasks to be executed by some set of worker threads, and then be able to control the number of worker threads on a server. What I'm interested in is other people's opinions on how I should architect this app. This