并发信息。 Sinatra 还是 Node.js?

发布于 2024-10-08 13:28:09 字数 308 浏览 0 评论 0原文

我正在构建一个新的 Web 应用程序,希望用于从 MongoDB 数据库提供地理信息。

信息将以 JSON 和 HTML 格式传递。基本上 HTML 用于前端 Web 搜索,JSON 用于 API 请求。

我是 Node.js 的新手,但我真的很喜欢它。我也是一名 Rails 3 夜间开发人员,所以 Sinatra 对我来说很熟悉。

不管怎样,我希望能够满足大量并发请求,我的第一直觉是 Node,但我发现很难与 Mongo 合作。并非不可能,但它不如 Mongoid 好。

任何关于该平台的建议或提示将不胜感激。

谢谢

I'm building a new web application that will hopefully be used to serve geo information from a MongoDB database.

The information will be delivered in JSON and HTML format. Basically HTML for front facing web searches and JSON for API requests.

I'm new to Node.js but I am really liking it. I'm also a Rails 3 developer by night so Sinatra is familiar to me.

Anyway, I hope to serve a lot of concurrent requests and my first instinct is Node but I found it difficult to get working with Mongo. Not impossible but it wasn't as nice as Mongoid.

Any suggestions or tips would be appreciated on which platform to go.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

望喜 2024-10-15 13:28:10

我的建议是选择您更愿意进行开发和部署的任何内容。我个人会选择 Sinatra,但那是因为我个人发现它的开发速度快且优雅。如果速度至关重要,并且比开发时间更重要,那么您需要在两者上制定合理的基准并对其进行测试。

My suggestion is to go with whatever you are more comfortable developing and deploying on. I'd personally go with Sinatra, but that's because I personally find it fast and elegant to develop with. If speed is critical, and more important than development time, you'll need to develop a reasonable benchmark on both and test it on both.

悲喜皆因你 2024-10-15 13:28:10

与 Phrogz 一起来这里,做任何你觉得舒服的事情 - 当你获得足够的流量来感受到差异(如果有的话)时,你将有足够的数据和经验来在必要时进行另一个选择。

请记住,Node.js 始终作为单个进程在单个核心上运行 - 因此请求将被一一处理。

Going with Phrogz here, do what ever you feel comfortable here - by the time you'll get enough traffic to feel the difference (if ever) you'll have enough data and experience to go on another choice if necessary.

just keep in mind that Node.js is running always as a single process and on a single core - so requests will be handled one by one.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文