# Rails or Tomcat - which one to be used for background task?

**URL:** <https://www.ruby-forum.com/t/rails-or-tomcat-which-one-to-be-used-for-background-task/196763>\
**Category:** Ruby\
**Created:** [July 29, 2008, 1:33am UTC](https://www.ruby-forum.com/t/rails-or-tomcat-which-one-to-be-used-for-background-task/196763 "2008-07-29T01:33:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rmehta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ea666f/32.png) [@rmehta](https://www.ruby-forum.com/u/rmehta)\
**Post date:** [July 29, 2008, 1:33am UTC](https://www.ruby-forum.com/t/rails-or-tomcat-which-one-to-be-used-for-background-task/196763/1 "2008-07-29T01:33:49Z")

</div>

Hi,

I need advice on a decision that I have to make to decide whether I  
should do background task in Rails or in Tomcat.

What I need to do is that a user of web app will create nnumber of text  
messages which need to be sent to around 10,000+ users. Sms msg is  
passed by the Ruby application to a http server running under Tomcat to  
a java application that further passes the msg to sms gateway to be  
deliverd to user.  
I am planning to put msgs to be sent in a table in mysql by the ruby  
application. Now I am not sure which is the reliable and better way to  
send the msgs in the background - a background task in ruby or a  
backgorund task in java. Also which is the best way to schedule and  
start a background job in ruby/rails to handle such a large number of  
records to be handled?

Thanks for the help in advance.
