使用 redis / sinatra / Thin 开发实时投注引擎
我目前正在使用 redis / Thin / sinatra 构建实时投注引擎。可以在 http://www.thematchfixer.com 进行预注册
我正在使用一些关于如何投注的逻辑赔率是如何产生的以及它们如何实时变化。这一切似乎都运行良好(无论如何,这只是一个游戏,不涉及真钱……所以这里和那里的一些错误赔率并没有多大区别)。我所困扰的是使用当前技术堆栈(redis / nginx / Thin / sinatra)进行发布/订阅实现的想法。人们建议我应该使用 Nodejs 或 erlang,但由于学习曲线和缺乏时间,我现在不想尝试它们。有什么方法可以通过我当前的技术堆栈实现 Comet(并使用开箱即用的 redis pub/sub)?
任何帮助将不胜感激。
I'm currently building a real-time betting engine using redis / thin / sinatra. A pre-signup is available here at http://www.thematchfixer.com
I am using some logic on how betting odds are generated and how they change in real-time. That all seems to work fine (in any case this is just a game and no real-money is involved..so a few wrong odds here and there don't make much of a difference). What I'm getting stuck with is the idea of having a pub/sub implementation using the current technology stack (redis / nginx / thin / sinatra). People suggested that I should be using nodejs or erlang, but because of the learning curve and lack of time, I don't want to try them out right now. Is there any way how I can achieve Comet over my current technology stack (and use the redis pub/sub out of the box) ?
Any help would be highly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我还没有尝试过,但是有 Faye(Node 和 Ruby 兼容):
http://faye.jcoglan .com/ruby.html
I haven't tried it yet, but there's Faye (Node and Ruby compatible):
http://faye.jcoglan.com/ruby.html
好吧,我想你正在寻找的是 Cramp,它最近发布了,它是一个基于异步请求的 ruby 框架。您在这里有一个很好的解释和第一步:
Cramp 简介
Well I think what you are looking for is Cramp, its been recently released, it is a ruby framework based on asynch requests. You have a great explanation and first steps here:
Introducing Cramp