我们需要构建一个小型 Sinatra 应用程序,该应用程序将从外部 API 捕获事件并将它们添加到队列中以供 Rails 应用程序处理。我们每天可能会收到数十万个事件。
鉴于 resque 无法保证工作不会丢失,因此还有其他选择。我们研究了delayed_job,它与Sinatra 配合得不好,那么还有什么其他替代方案可以实现快速、可靠和可扩展的功能。
We have a requirement to build a small Sinatra app which will capture events from an external API and add them to a queue for processing by a Rails application. We could be receiving hundreds of thousands of events per day.
Given that resque rules itself out by not being able to guarantee that jobs won't get lost, what other options are out there. We've looked at delayed_job and that doesn't play well with Sinatra, so what other alternatives are there for something fast, reliable and scalable.
发布评论
评论(1)
你看过豆茎吗?
GitHub 上有一个示例 Sinatra/Beanstalk 应用程序:
或者,您可能想使用 ruby-amqp 查看 RabbitMQ,但我想我首先尝试 Beanstalk 方法(它为我们处理您在帖子中描述的工作负载):
https://github.com/ruby-amqp/amqp
Have you looked at Beanstalk?
There's an example Sinatra/Beanstalk app on GitHub:
Alternatively you might want to check out RabbitMQ with ruby-amqp, but I think I'd first try the Beanstalk approach (it handles the workload you describe in your post for us):
https://github.com/ruby-amqp/amqp