Django + MongoDB与Node.js + MongoDB [英] Django+MongoDB vs Node.js+MongoDB

查看:101
本文介绍了Django + MongoDB与Node.js + MongoDB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经运行了一个使用Python(Django)+ MySQL构建的同步服务的网站。很久以前,我正在寻找Node.js和MongoDB端。我很接近决定迁移到MongoDB系统的一部分,该系统承载用户桌面客户端的数据,并被同步服务用于在客户端之间同步数据。



我想保持系统的其余部分在Django + MySQL上运行。



我的问题是我应该在Node.js上重写同步服务还是继续在Django上运行? Node.js与Django的MongoDB有什么好处吗?

解决方案

如果您正在寻找性能,Node.js应该对Django有更好的表现。但是Node.js运行异步,你应该准备代码,如果你需要所有的同步和更新,也许Django是最好的选择,因为你已经运行了。



但是如果你选择Node.js,做一些让beeing异步的事情对你而言和你的数据一致性就像消息队列一样。



检查这个出来,它有每个人的利弊



切换python到node.js



龙卷风,django和node.js基准测试


I have up and running a website with sync services that built using Python(Django)+MySQL. For a long time I'm looking to the Node.js and MongoDB side. I'm close to make a decision to move to MongoDB part of the system that hosts data from user's desktop clients and used by sync service to sync data between clients.

I'd like to keep the rest of the system running on Django+MySQL.

My question is should I rewrite sync service on Node.js or keep it running on Django? Is there any advantages for Node.js with MongoDB against Django?

解决方案

If you're looking for performance, Node.js should have a better performance against Django. But Node.js runs async, you should prepare the code for that, if you need everything sync and up, maybe Django is the best choice, because you already have it running.

But if you choose Node.js, make something that make the fact of beeing async is no problem for you and your data consistency, like message queues.

Check this out, it has the pros and cons of each one

switch python to node.js

tornado, django and node.js benchmark

这篇关于Django + MongoDB与Node.js + MongoDB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆