R
Roedy Green
The application is I have a list of 1200 books and a list of 21 online
bookstores. I want to find out which bookstores carry the book. I
have code now that given a book and bookstore will find out if it
carries it and records the result. It probes the appropriate page and
scans for clues, positive and negative.
The process is very slow because it mostly spends its time waiting for
the bookstore to respond. I figured I could fairly easily make one
book-x-store probe into a Runnable. Happily there is only very simple
interactions between Runnables.
You could imagine setting all the Runnables loose at once.
I need two features:
1. some sort of throttle on releasing them that I don't swamp the JVM.
2. some way of knowing when the last one completed.
I could do this by having my Runnables increment and decrement global
counts, however I suspect there is something built in to handle this
flawlessly.
There are so many tools. I wonder if anyone would like to point me to
the most appropriate one for this task.
If I get this working, I would like to add similar logic to the
BrokenLinks link checker.
--
Roedy Green Canadian Mind Products
http://mindprod.com
For me, the appeal of computer programming is that
even though I am quite a klutz,
I can still produce something, in a sense
perfect, because the computer gives me as many
chances as I please to get it right.
bookstores. I want to find out which bookstores carry the book. I
have code now that given a book and bookstore will find out if it
carries it and records the result. It probes the appropriate page and
scans for clues, positive and negative.
The process is very slow because it mostly spends its time waiting for
the bookstore to respond. I figured I could fairly easily make one
book-x-store probe into a Runnable. Happily there is only very simple
interactions between Runnables.
You could imagine setting all the Runnables loose at once.
I need two features:
1. some sort of throttle on releasing them that I don't swamp the JVM.
2. some way of knowing when the last one completed.
I could do this by having my Runnables increment and decrement global
counts, however I suspect there is something built in to handle this
flawlessly.
There are so many tools. I wonder if anyone would like to point me to
the most appropriate one for this task.
If I get this working, I would like to add similar logic to the
BrokenLinks link checker.
--
Roedy Green Canadian Mind Products
http://mindprod.com
For me, the appeal of computer programming is that
even though I am quite a klutz,
I can still produce something, in a sense
perfect, because the computer gives me as many
chances as I please to get it right.