addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscontroller-playcrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1light-bulblinklocation-pinm-swarmSearchmailmessagesminusmoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonprintShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruserwarningyahoo

Tulip and Asynchronous I/O for Python 3

Abstract

In October 2012 I decided that it was time to add modern asynchronous I/O to the Python standard library, to replace the ancient and ever-problematic asyncore module.

A year later this project is my main focus within the Python world. There is PEP 3156, which specifies an interface that I am hoping to add to the standard library (probably with provisional status), and Tulip, which is an implementation of the PEP and also contains a bunch of client libraries that use it (not all of this will make it into the standard library).

Tulip requires Python 3.3 or later, and the code makes extensive use of coroutines, which are specially-marked generators that must be waited for using the new "yield from" syntax introduced by PEP 380.There is a lower-level API based on callbacks, and Future and Task classes that bridge the impedance mismatch between coroutines and callbacks.

The PEP 3156 interface has also been heavily influenced by existing third party libraries for asynchronous I/O, in particular Twisted and Tornado, and interoperability with those systems (as well as others, like gevent and Microsoft's Windows 8 API formerly known as Metro) is an explicit goal, to be accomplished through adapters.


Bio:

Guido van Rossum is Python's creator, and still active as its BDFL. After years at Google he now works at Dropbox. For more information see his personal website at 

http://python.org/~guido/


*This is a Bay Area Python Interest Group (BayPIGgies) organized event. Please also see their web page: http://baypiggies.net/

Join or login to comment.

  • nathaniel t.

    Thanks LinkedIn for hosting, and Guido for giving this excellent talk!

    I was the guy who asked the question about the advantage of being explicit with 'yield from'. Guido mentioned that when using green threads that aren't explicit in this nature, someone might hide logging as a call that yields to the event loop thus causing unforeseen critical sections to appear. However, in this and any other case where there is excessive amounts of event loop yielding, that would cause your entire codebase to have to yield every function call. So literally every line will have a yield from statement in it. At that point, your code would look like garbage, and you will still have the problem of there being no safe code. So if this were the case, having yield from wouldn't really solve you problem.

    So I wonder if any other pythonistas have a response to my claim, or if Guido himself is lurking maybe he can respond to my rebuttal.

    January 23, 2014

    • Gabriel R.

      A very well written blog post. Convincing too.

      February 27, 2014

    • Shannon -jj B.

      I wrote a blog post responding to Glyph's blog post: http://jjinux.blogspo...­

      February 27, 2014

  • Ilker Burak A.

    thanks to Guido for giving this useful talk,and thanks to people who organized this meetup

    2 · January 23, 2014

  • John S.

    Didn't get much from it -- not a useful time investment. Too many words, too many undefined or too-quickly-defined terms. Too theoretical and not that practical, especially at the beginning when context was being explained. I still don't know when I should use Tulip and when I should use gunicorn (which is much simpler). I would gently suggest that a few graphical charts (Venn diagrams or 4-quadrant models with nicely chosen concepts for the axes) would have dramatically improved the utility and understandability of the talk.

    1 · January 23, 2014

  • Mo I.

    I will watch the streaming instead. Someone can take my spot.

    January 23, 2014

  • ahmed a.

    I'm coming tommorow

    1 · January 22, 2014

  • Rachel S.

    The event will be streamed live at: www.ustream.tv/linkedin-events

    I believe it'll also be recorded for later watching, too.

    3 · January 22, 2014

    • Glen J.

      Awesome! Thanks again for all of your help!

      January 23, 2014

  • Greg G.

    Reluctantly giving up my spot as well due to last minute commitment. Hope to see a re-cast, this looked great.

    January 22, 2014

    • Glen J.

      Letting us know has helped us plan better. And, everyone currently has a seat! Awesome! And, this will be streamed and recorded: http://www.ustream.tv...­

      January 23, 2014

  • Pranav P.

    I'm giving up my spot as I would not able to make it unfortunately.

    January 22, 2014

    • Glen J.

      Thank you for letting us know so that we can plan better. It looks like everyone has a seat now. Also, don't forget, this will be streamed and recorded: http://www.ustream.tv...­

      January 23, 2014

  • Abdul N.

    Giving up my spot. Something has come up.

    January 23, 2014

    • Glen J.

      Thanks. We now have enough chairs for everyone. It's awesome you let us know in advance. Don't forget, we are streaming and recording: http://www.ustream.tv...­

      January 23, 2014

  • Ahmer K.

    Unable to make it back on time from work:( Hopefully there will be a recording of the talk.

    January 23, 2014

    • Glen J.

      We're doing our best to record the event. Wish us luck and we'll have a recording :)

      January 23, 2014

  • Matilda B.

    Someone is giving me a ride and since she had sudden changes in plans she can drop me like an hour before. Is there a place I could wait?

    January 23, 2014

  • Gurpreet

    Reluctantly have to give up, I hope you are putting this on your youtube.

    1 · January 23, 2014

    • James N.

      Thanks for freeing up your spot, Gurpreet. We definitely will post to our Youtube channel! Also live broadcasting here: http://nicholsonjf.co...­

      1 · January 23, 2014

  • A former member
    A former member

    Gave up my spot because there is a good chance that I will be late to the meeting. Hoping the next person on the WL enjoys the presentation.

    1 · January 22, 2014

    • Glen J.

      Thank you so much for freeing up your spot if you can't make it. We now have enough room so that everyone on the waiting list can attend. And, we have six more slots open if you do get to come in late for the meeting. Also, this will be streamed (www.ustream.tv/linkedin­-events) so you can attend virtually.

      January 22, 2014

  • Misty R.

    I'm not able to make it tomorrow so I have freed up my spot for someone on the waitlist.

    1 · January 22, 2014

    • Glen J.

      Misty, thank you so much! There are about 30 people who wouldn't be able to make it if we didn't have the spots freed up. I think the next person will be very grateful that you opened the spot up for them.

      January 22, 2014

  • Prakash

    Anything Asych is good and tulip flower for py3. Waitlisted to see you all. in new year. - Cheers

    December 20, 2013

    • Glen J.

      Because of LinkedIn's generosity, you (and everyone else) have been moved from the Wait list to the attendance list. I look forward to seeing you there.

      2 · January 8, 2014

Our Sponsors

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy