What are the uses for Node.js vs Twisted?

Assuming the development team is equally comfortable writing server-side Javascript since they are with Python and Twisted, when will Node.js be more suitable than Twisted (and vice versa)?

+63
javascript python twisted
Aug 11 '10 at 18:21
source share
2 answers

Twisted is more mature - it has been around for a long time and has so many bells and whistles that it makes your head spin (implementing the most bizarre protocols, integrating a reactor with a wide variety of other loop events, etc.).

Node. I have never measured relative performance).

So, I would absolutely use Twisted if I needed any additional features or wanted to feel on more solid ground, using a more mature package. If these considerations do not apply, but the main performance is the key goal of the project, I would write a simple test (but still representing at least one or two key performance situations for my actual project) in Twisted, Node.js and Tornado , and take many careful measurements before I decide which direction to go in general. The "extra features" (third-party extensions and the standard library) for Python and Javascript on the server side are also much more numerous, and this may be a key factor if such projects are needed for the project.

Finally, if none of these issues is specific to the application scenario, ask the development team to vote on the relative simplicity of the three candidates (Twisted, Node.js, Tornado) in terms of simplicity and familiarity - any of them will probably be ok perhaps choose the one that is most convenient!

+77
Aug 11 '10 at 18:32
source share

As of 2012, Node.js has proven to be a fast, scalable, mature and widely used platform. Ryan Dahl, creator of Node.js

Nowadays, Node is used by a large number of startups and established companies around the world, from Voxer and Uber to Walmart and Microsoft. It's safe to say that billions of requests go through Node every day. As more and more people come to the project, the available third-party modules and extensions in quality expand and expand. Although I was once reserved to recommend it for mission-critical applications, I wholeheartedly recommend Node for even the most demanding server system.

More formally, the benefits of Node can be classified as:

  • Great community: We can say that no other platform has received such community in such a short period of time, it has hundreds of participants and thousands of observers on GitHub. used by giants such as Yahoo! (Manhattan Project), e-bay, LinkedIn, Microsoft, and Voxer.

  • NPM: Despite having a relatively small kernel, Node has many packages available to extend its functionality in everything you can consider! All this is automated and actively developing and expanding, think about PyPI (pip).

  • Scalability and speed: Node architecture and single-threaded nature provide high scalability and speed. Especially after the release of 0.8, its speed has become really faster ( tests ), which can be confirmed by many large companies using Node. The V8 core is also constantly improving thanks to the current browser war.

  • JavaScript: The core Node (JS) language is better suited for server-side use, especially lambda functions, dynamic objects, and simple JSON serialization are JS highlights that really work well when speed and scalability are considered. (Python has all of them, but they are really better and more powerful in JS).

  • Deployment . Due to their widespread use, many really good sites provide tools for simple and powerful deployment of Node, including: Heroku, Joyent, Cloud9 and much more.

Therefore, Node seems more powerful and with a brighter future, therefore, if there are no restrictions for its use (for example, existing code, servers, team capabilities), it is recommended for any new collaboration project, speed and scalability.

+8
Jul 27 '12 at 11:14
source share



All Articles