集成 Thrift ruby 服务器和 Ruby on Rails Web 应用程序
在空闲时间,我目前正在开发一个用 Rails 编写的 Web 应用程序,并计划为桌面和各种移动平台编写“厚”客户端(谁不这样做呢?)。
我喜欢 Thrift 的多语言支持概念,以及让一个 IDL 文件为客户端生成适当代码的概念(干!)
我想知道集成 Thrift 服务器和 Rails 的最佳方式/架构是什么。
想到的唯一选项似乎是次优的:
- 从 Thrift 服务器调用 wepapp API 将数据返回到胖客户端,
- 将 thrift 服务器插入 Rails 应用程序的数据库并执行其操作。
出于显而易见的原因,这似乎有点矫枉过正、多余且不灵活。
有什么建议吗?
谢谢 !
In my free time, I'm currently working on a web app written with Rails, and planning on writing "thick" clients for the desktop and various mobile platforms (who doesn't ?).
I like the concept of Thrift for its multi-language support, and the concept of having one IDL file generating appropriate code for clients (DRY !)
I was wondering what would be the best way / architecture to integrate the Thrift server and Rails.
The only options that come to mind seems sup-optimal :
- call the wepapp APIs from the Thrift server to return data to the thick clients
- plug the thrift server to the DB of the Rails app and do its thing.
For obvious reasons, this seems overkill, redundant and not flexible.
Any suggestion ?
thanks !
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定它是否太过分了:)但我建议如果您想更多地探索这个主题,您还可以研究此线程。
I'm not sure if its overkill :) But I suggest if you want to explore this topic even more that you also look into this thread.