开发者

Build internal service, no http support needed

开发者 https://www.devze.com 2022-12-17 08:37 出处:网络
I need to build an internal service that queues the DB for changes (in one table) every one second, and processed data after this event.

I need to build an internal service that queues the DB for changes (in one table) every one second, and processed data after this event.

I do not need all the Rails stack since this service does not need the Controller/View functionality. Basically, from the 开发者_JS百科rails stack, i only need AR (or an ORM).

The found solutions/approaches for this are:

  • Use a classic rails background processing plugin (like starling/workling, delayed_job, etc)
  • Use a daemon solution like RAA Daemons (and maybe as ORM, use DataMapper, since it can be used stand-alone)
  • Redesign things and use an MQ sollution

What would you suggest it would be the best approach?


How about a solution like RabbitMQ ?


Instead of using Rails, you can simply download ActiveRecord here and include it as a library. That way you have the ORM you like, without the overhead of the Rails stack.

As far as the Ruby "Controller" portion of it goes, you can use whatever daemon solution you like.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号