I’ve recently taken an interest in learning Scala (mostly working through Project Euler at the moment), and I’ve decided on a simple program I want to write: A simple concurrent downloader. I’m having some difficulty wrapping my head around a good way to do it.
I know Python well, and I like the way the gevent library works. What I’d like to do is solved with gevent here. Is there a simple way to do something like this in Scala, or am I totally heading down the wrong path? I’ve looked at the Dispatch library, but it seems incomprehensible. Should I be using Actors?
Any help or guidance would be appreciated. Thanks.
Ok, I do agree that Dispatch documentation is a bit rough and small at the moment, but that’ll probably change in the future (and it is the situation with many great Scala libs).
But the result of applying Dispatch for your need is spectacular:
This would get you files for first 100 quotes from
bash.org, in parallel.