4 ms·
The great thing about open source is that people are free to share ideas and code. If the Twisted team likes parts of Tornado, they are free to replicate those
by paul 17y ago
The great thing about open source is that people are free to share ideas and code. If the Twisted team likes parts of Tornado, they are free to replicate those parts back into Twisted while ignoring the parts that they don't like.
Meanwhile, users are free to choose whichever approach suits them better. Twisted is no doubt more complete in terms of protocols and such, but many people also value simplicity. One important point that I think has been overlooked here is that the core of Tornado is only a few hundred lines of code. For me, the fact that I can actually read _all_ of the code in just a few minutes is very valuable. I'm sure many others don't care though, which is why it's great that we live in a world where there doesn't always have to be a single "right" answer.
- dlsspy 17y ago"Twisted is no doubt more complete in terms of protocols and such, but many people also value simplicity. One important point that I think has been overlooked here is that the core of Tornado is only a few hundred lines of code." I think this is a bit misleading. The twisted port involved removing almost 1,400 lines of code and didn't change the tornado API. That is, tornado is not more simple without twisted. I do understand the value of being able to read all of the code quickly, but there are other turtles below these. For me, it's very valuable to know that the part upon which I'm building is a well-tested codebase whose semantics I understand, and for which I can write tests when things begin to violate my understanding. If tornado is used in more applications, it will have to grow in complexity to meet the needs of those applications. I see tornado as having two faces. The web portions can certainly continue to grow, but the network IO handing just means that people will have to port over things that already exist within twisted, and expand it in complexity (such as the kqueue work that is in progress) to handle more low-level stuff. At some point, you can't just easily sit down and read all of it (at least, not any more easily than you can with twisted).
- paul 17y agoTornado relies on a small number of well defined system calls (such as epoll). For me, the difference between reading (and debugging) a few hundred lines of code down to the system call level, and reading (and debugging) a big library like Twisted is rather significant. For you, the difference may not be important, and that's fine. I also don't think that it's necessary for Tornado to replicate all the functionality of Twisted -- if people want Twisted, they should simply use Twisted and ignore Tornado (and hopefully the Twisted team will have borrowed the best bits of Tornado anyway).
- randallsquared 17y agoThat is, tornado is not more simple without twisted. That's not exactly what I'd say. :) Tornado without twisted is simpler than tornado with twisted, because you can't ignore the huge system you'd otherwise be able to avoid. Edit to remove mild flame.
- dlsspy 17y agoI get what you're saying, but twisted does all that stuff with a great deal of testing. It's the same reason smart companies are compelled to contribute changes to open source projects. That's a lot of maintenance you get for free. That's why friendfeed didn't do their own python implementation on top of their own posix operating system to make sure they had a firm grasp on all the parts. A working and well-tested component is almost always better than writing a new one from scratch that you have to deal with yourself.
- paul 17y agoYour point is fair, but I think you may be dramatically overestimating the amount of time that was spent writing and debugging Tornado. Overall, I'd estimate that less than 1% of our time was spent on Tornado and other similar "reinventions", and that in exchange we got simple systems that we understand and that work the way we like, which seems like a pretty good deal to me.
- dlsspy 17y agoOh, I don't mean to be perpetuating the argument. I think you guys did awesome stuff. Most of my twisted work doesn't even have a web interface, some of it does, but it's fine. Some could really use some help. Tornado seems to be a great answer there. I suppose I'm just letting you know how you can better serve my personal needs next time you invent something great. :)
- mbrubeck 17y ago"The twisted port involved removing almost 1,400 lines of code and didn't change the tornado API." Or, looking at it another way, you removed Tornado's simple 1400-line core, and replaced it with a 150,000-line dependency. (Yes, I know that Tornado On Twisted doesn't depend on the entire Twisted framework. But the port does involve a lot more code in total than the original.)