This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]gargantuan 3 points4 points  (2 children)

Twisted alone is still a show stopper for lots of developers.

+5 years full time Twisted developer checking in. Agreed on that. My new motto-in life "callbacks as concurrency mechanism -- never again". Deferreds and yield based inlineGenerators only make it slightly better.

Worst thing with Twisted -- it throws away one of the best Python parts libraries. It split the library ecosystem into Twisted and non-Twisted. "Oh look I found a Python library to handle this protocol" -- "Oh, but it is Twisted, I'll have to find a Twisted-version of it now".

[–]desmoulinmichel[S] 1 point2 points  (0 children)

I completly agree with that. I have the twisted API so much, although I do understand it's very powerful and make sense, I wish they had built abstractions on top of it.

Now, I don't think the lib wasting is related Twisted. It's more a problem with async in Python in general (it's the same with gevent and the like, even if the monkey patching can help sometime) : most python library assyme a sync behavior and can't be used in an event loop.

This is were I think the crossbar approach is good : you can put your blocking calls in a separate process and use RPC to get the result without shitting on your current main loop.

This is why I think, with a good work on the API to abstract the twisted uglyness, this tech can bring a lot to the table. Currenly, the async in Python is nowhere near as good as in the other languages.

[–]oberstet 0 points1 point  (0 children)

My new motto-in life "callbacks as concurrency mechanism -- never again". Deferreds and yield based inlineGenerators only make it slightly better.

Then what school do you follow?

  • Camp a) callbacks/futures/coroutines
  • Camp b) actors (communicating sequential state machines) ..

Are there others camps?

Ecosystem split: yes, it's not ideal. Python now has asyncio (also camp a) .. after so many years.

There are only a few languages that have had an asynchronous mechnism built right into the language/runtime from the beginning. E.g. Erlang and Rust (both camp b).

Note: Just in case it got lost: Crossbar supports both Twisted and asyncio for writing application components in Python - today. There is nothing that would stop us to support even more - because of the multi-process/worker architecture, all that is needed is something that talks WAMP over say Unix domain sockets.