Ask HN : Suggestions for Writing Background jobs
I need to implement a few background jobs, that run continuously in the background and do a lot of http calls to some API's to gather some data and store it in mysql. I would like your suggestions and comments on what will be the best way, architecture, language to use so that the system is scalable.
I will need it to be threaded so that i can pull data simultaneously.
What language should I use.
1) Ruby 2) Scala 3) Java 5) PHP
I know Ruby PHP and Java well.
Thanks
9 comments
[ 4.0 ms ] story [ 31.6 ms ] threadhttp://www.playframework.org/documentation/1.2.3/jobs
Alternatively you could simply use Quartz alone.
http://www.quartz-scheduler.org
You can use play's WS class to make asynchronous HTTP calls from your server, and it integrates nicely with MySQL or your database of choice too. I think it uses Hibernate under the hoods, but leverages all its power while simplifying configuration and usage.
You can use Play with Scala, and if you do so, there is a nice database layer called Anorm.
As I said, you can always use just Quartz for the jobs (that's what Play uses anyway), and create your own Data Access Layer or use an ORM, or what you like.
http://www.playframework.org/documentation/api/1.2.3/play%2F...
However, RabbitMQ might be too much overhead for what you want to do. With Ruby, specifically, I've had a good deal of experience with Resque, which uses Redis (key-value store) as a queueing system, much like RabbitMQ. It's easy to set up, and gets the job done just as well.