3 ms·
> Twisted and EventMachine are hampered by the existence of a large number of blocking libraries for their respective languages. Part of the difficulty in learn
by davidw 17y ago
> Twisted and EventMachine are hampered by the existence of a large number of blocking libraries for their respective languages. Part of the difficulty in learning those technologies is understanding which Python or Ruby libraries you can use and which ones you have to avoid.
This is what's interesting, I think. The reason Erlang does so well at this is that stuff written in Erlang basically just doesn't block because a scheduler sits under the whole thing.
> Node creator Ryan Dahl has a stated aim for Node to never provide a blocking API—even filesystem access and DNS lookups are catered for with non-blocking callback based APIs.
So that's the tricky bit, I suppose, especially as your language/environment grow, and people start doing random stuff with it.
BTW, it's also worth mentioning that Tcl has had a nice event system since well before Twisted came out, built into the language. However, like Python, you can't count on random commands not to block, so you have to be careful.
- tdavis 17y agoI don't find that particularly true with Twisted because for every common blocking library there is a Twisted equivalent. Whether you need http, ssh, db, or a multitude of other protocols and interfaces, Twisted has them. Sure, you have to be a little careful, but chances are if you're using an event-based networking engine you have a good reason for doing so and a pretty specific purpose.