Hi, maybe you can put finished work packages into a Queue and have a (different) thread reading them from the queue and writing them to the database linearly. So the workers don't have to know about the database and the DB writer doesn't have to care for the computation. Since you can't write to the database in parallel anyway, you don't loose anything, no? See java.util.concurrent for different Queue implementations, as well as CLojure PersistentQueue combined with an atom and watchers or so. (Although I think j.u.c.ArrayBlockingQueue looks interesting for this approach)
Disclaimer: I'm not a specialist with this stuff. So take an appropriate amount of salt for evaluation. Sincerely Meikel -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en To unsubscribe from this group, send email to clojure+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
