Merken

Gevent: asynchronous I/O made easy

Zitierlink des Filmsegments
Embed Code

Automatisierte Medienanalyse

Beta
Erkannte Entitäten
Sprachtranskript
I'm looking like a square started
things can you ring planning is then you can find a web developer and to adults enthusiastic and for the past few years have been John contract-steering that's the development and network systems consistent pattern so and this typology events students framework for asynchronous I with the fully synchronous programming model so you may be familiar with it things like tornado and twisted and the new asynchrony in Python 3 . 3 and frequent full and Japan is laser direct questions that and I hope to demonstrate that it's easier to use and more flexible than any of those things and so where this talk is going so well 1st who will meet G events come and see some examples and then I'm going to discuss the theory behind G events and the idea other 1 so tornado interested and how they compare and the programming models involved some and then my talk briefly about my experiences that you haven't so asynchronous what advantage all non-blocking is any form especially for writing network programs where instead of blocking and your your program spending and waiting for a response for the I O operation requested the program goes it does something else and resumes to the point that to the resumes executing your codes after the I O operations completed I'm sorry going into event
this is very simple student programs and so but rather to talk through the code to the
energy of an using here is 1 of the of output policy in connection and and then further any connection that is received on that whole the connection however is called but makes follows a feature of socket and obviously so we just echoing back lines that you make turns into folic object in a trait that lines and send them back and the saying so that's very similar to the code that you might write with with plane plane Python about the full 3 . 3 if you're picking up a single and accept that some magic happens so that is highly scalable and so we'll talk about magic later so this is so this is a client that uses G events from and what we using here is your only to read 100 euros on a pool of 20 threadlike objects Greenland's so those things are happening more or less in parallel so that when the somewhere in the middle of you here little we how access to your own it does so some blocking to read data from the euro about what's happening and what data is being received other things scheduled and run so that the the clever thing here apart from that so this pool object is that we are able to use your allude to unmodified because of the 1st 2 lines where we do some that the monkey catching them and people keep saying monkey catching that the nose the eye and I'd on explain a bit later why I think it's is actually rather elegant Robin brother ugly so this is another example I actually had to execute these examples but we were we don't have time in the network might be working so this is mechanism that is not particularly fascinating to look at the chance of more so but yet he would put even gives effect machine so I am what's happening here we got reader and writer welcome green likely so what we're going to do is run each of those but we don't want objects in a single agreement so they will be effectively concurrently of a and B the reader is just reading lines were and rebroadcasting them we got a system that used so that a broadcast pagoda or that's ascribed users and the 2nd part of this is the code that puts it together so after receiving a connection again this is sort of host with the streams of the of the resulting connection so that we tend to final read name as function of that included in this where we just read 1 line that is your username and loop until it's about like and then I'll try to keep the user ends without to agreements to actually just do 1 direction of the communication time and the the joint a woman and the try finally and ensure that the but agreements that's when they because really phrase exception if the connections lost just remove the user when the Texans lost and so moving on to some very and so talk about a single like that of the 1st
suppressing side so this is a diagram of call stack them and obviously concepts can be arbitrarily deep so example of simple calls back where we want to get some get some data and that data is so high that we're going to process that data in the Green function and we want to do 1 of operated by operation which is read 1 line from something socket probably maybe a pipe and sigh in synchronous I we we actually but the current is following areas get to the point where we block online and nothing happens that process for map would be process just stops that of and the kernel then waits right and users when the time was right it's a fact that may block more than once and about the everything stays completely intact and the execution continues when the order is complete and obviously then the the line can be returned to the caller which reduced processing and and that the data is called and so problems with with this kind of
model in place and the the performance is is not good and the memory usage is not good so there is an excellent source of who which tries to 13 to Europe click handling them up so you want to on but pretend that the French in Python and the Gill is not at the kernel level object exactly so friends fight for the CPU CPU tensions is actually much much worse than friends in other languages so so it was is also the stack memory so a thread them the kernel knows about threats and it prepares a bunch of stuff but that you will you you control of limit was assessed but it prepares the slack ready to to do stuff and see basically so not particularly useful for Python you can turn that limit quite down quite low but you won't be able to get high scalability and that's similar processes you immediately lost the shared memory space which is useful about friends and you don't know that the but the threat is is basically a lightweight process that operates in level objects of yes so I already mentioned this kind model the the what we're trying to do in all of these I O Systems asynchronous I O Systems is when we are doing some we want to jump out of what we're doing to let other things from so that usually means but there is a central place where they always means there is a central place that is waiting on line doing all of the waiting for all of the all of the things that are processing on that moment and presuming the right 1 when something happens but so the idea is this is what it might look like so some people were saying I lost like going but you selected doesn't scale but perfectly with the alternatives to select but as to the API improvements but but the fundamental component of it like this so something registers to to want to wait on a file descriptor for reasonable wait for right and then and then it will be started which resumes some definition of functional resume when that telescope has the capability to do today do that operation with registro weights have to wait for the data being able to read selects will return the list of from the scriptures of that was the that on which you would then be able to went so it's like what sorry so like lot when it returns it returns lists read write error and each of the guidance analysis of all descriptor and that's life every item in the every file descriptor in the list read is guaranteed that you'll be able to read some number of points which I think is like 512 or something so there is at least 512 bytes of offered to to be red at that point I'm and error handling obviously currently is is actually very important in our gut operations so I missed that so nothing thing applies and then this is the same thing but so that's slightly modified to to show the time that have a tiny part that leads to interesting that so you may be wanting to do by looking online but you also want be just looking for an arbitrary amount of time and so you could say wait for time out and then the last argument to select is time that we want to use that and if you know if nothing is returned on rewrites narrow for the duration of that time out then select return anyway and we can do some process will the things that are waiting time all right so you can get into the of different models of what you might mean um and so you you who backs all but the simplest approach that they used in their job description a tornado I'm streams twisted deferred and basically all have this idea of callbacks from the event and so this is the kind of what this does the stack so whereas before we had a nice has a simple definition of what get data like that data was was 1 thing that break into you'd have to break the the the real line function into 2 to the the the sets of getting the line in the but the received the line and all weights for a whole line and so on this is a lot more messy and so on notice that I drew the return values as sort of the of the returned parts as as light errors because you can't do anything useful with the satellites collects and not going to be a useful place phenomena contain useful data so there is actually no way to have a break the slightly cool collects just turn into my space where we can return values which is a really convenient way of programming and so of included some number of collective sedimentary HTTP library making a request through to the end points and passing in the function and I want to be cold and bicycle ability to let Jason so because the competent got to do something I got a call back a back with the response and then if I wanted to link the request doing to a particular state of work apart then this will momentarily 1 ways to use closures so have a response is found to be the the was closed about their IT so knows what we're ideas well which not used of these collections that's come but to more practical things this is this is
something I encountered a couple of years ago this is he you was thinking the library and here which of 4 levels of callbacks and that this is a simple example so what about this just a classic you but you might want to declare exchange of Beinecke to exchange so you also 6 layers of callbacks before you actually received the message so I don't like that all that's really up so somebody
once said I don't know you about have but not fusion described collects and you go to come and we discussed how it's the semantic because structure where each let everything into tiny component parts and you know you're not able to use bodies and also error handling notice that the previous example as signal error handling in there and if I wanted to handling for all of these operations on my want to register an error handler here it's the error once and then adjust all the trees some happened somewhere in the area but error-handling with callbacks doubles the network and things and so people don't and the examples the Internet people got examples and error handling is just left on the floor um so a simple simple approach to dealing with Complexity of collects is pointing them out into a class so that you have survived and having the the closure as a demonstration earlier you have a class that has the method has 3 members in learning methods of things and the methods for such methods pre-registered as callbacks certain operations so this is something I really wants it truncated perhaps but I this is a twisted applications of wrapping some process and out received and receives get called whenever there is a chunk of data from some for some reason the process protocol doesn't let you turn it easily into line so I have to write and then how break out the the this this handler that's getting events called the variance that's really methods are being called on the object had we turn that into useful things in another part of program had to use something called a deferred Q remember the semantics of the but again that's that's you you register collapse into a thing so you you just this is just this is a simplification of some of the difficulties of callbacks but it doesn't really there was a problem and you end up using collects anyway and you still have little processing into multiple choice so if I want to see so you say sounding self talk you don't put here but if I was to decode the line so that point and try and do not asynchronous operation how would I link back asynchronous operation to another class to this class but I've got a lot using collect and here is an example from a single cell is exactly the same kind of thing but that was underlying assistant pullbacks but in a single you have protocols and principles Pentagon so your transport tracking that's type of thing like a like I was surprised network connections and an SSL connection and the protocol is the processing for that but so is still callback based but you can be you or your wrapping it in a class and in this lecture last week I think it's a slightly nicer API where I had to use as a process protocol and that would be different to a critical there's a from the this a the what I think that the brought of from of from the TBM the sum of the again sorry where was I yes I think we these slightly nicer than the 1 that interested because the protocols in the transports are that of kept separate whereas interested they have been combined and the same problems apply so do so then we
get into of more modern techniques of generated based so this is this is present in tornado this tornado intelligent module and this is the 1st way is the key feature in the new kind treatment for and so what we're doing is um we using the generators which so generator would wind-generated introduced it was noted they provide care reading like features can occur reading and is really what what G event is built In this case we we are using so we're we're trying to suspend operations the between the the place that in that the other example blocking I we would have let the operating system callers back we are using yields and yield from 2 break onto the stack while preserving the stack frames and given label and because the event is the parent of antibodies that we're waiting for something to happen and it will return us back to the point it will reassemble a stack of when that operation is complete so the so this is literally a division in the middle where the stack is torn down and preserves as generator objects from and and resumed using send them and there is 1 of the advantages of this method is that you can actually send data so I in in Python 3 . for this year yield from 3 by 3 so before Python 3 . 4 you can actually talk about you've you've used generators generators In earlier point and you could not have a yield and return the value and so that was a feature that have to be added to make this work on and also you've used the the yield so the semantics of fields on now coupled to breaking at stack rather than being able to actually use generators as a useful so looping to yeah so this is an example of a single and using those curry chains that so this is very similar example to the to the fact that that I showed the but for some reason stinks schools may would highlight something would yield from and that so so the asynchronic don't sleep is a special type of generator that that returns an object that when when it's that's yields an object that when is yielded always print some back to the event to event will resume that generated by going back to the the prince some of sending print some sending from uh the the yield from line into the yield from a single place sleep line and so and resuming the for letting the same kind of sleep return to it and and this is where looks like tornadoes To enable has 2 major works on the identity of some so there is yield from there is there's a value that some the question that it is usable in Python 2 as well we noticed that we had to put yields into the country where really it doesn't it doesn't really make sense that so was an actual co reading so the generators have been described as all the approach of generous has been described as Senator retains full carotene um can you not just to the cooling frame but anyway so that any other encouraging and it doesn't require any collaboration from the other stack frames to do that's the the top level staffing just say hold on part me I'm going to pull back to given this so this is a bit would correlates like so without
having to suspend the stack frame modifying the calling conventions to Uziel from we get to the point at which we block and we just say yield to this event and eventually when its rate is set to resume yields back to the point at which the this agreement with suspended solids so it's like blocking In the blocking example except instead of looking at the kernel level we just suspend Green let's yield to the event loop and the than does for the that on which is white for height and receivers so going back to the asynchronous example this is this is how this saying the same piece of code to be written with J. events and rather than having
to use yield this again and again the difference in terms of what you're calling is calling given don't sleep some utilities yield from right because it exactly as you know and somewhere and you haven't don't sleep the magic happens when it yields the density and here anointing kicking off from an event labels so the fact that I'm using event of sleep um Jim endlessly will create the event because it doesn't exist so the this no and after the spawned by so much simpler yes I because actually things in yes I in J. events the event that is called a hobby so so we get back from catching on so it's possible to just use J. event on to modify the existing function the time the function which means so you have to do that for your important thing but in case you keep references to the old versions but it means that any existing code can run without modification so you probably have heard somewhere that uses time obsolete sleep you can make it run using event just by starting your program with G event of monkey input factual actual how you want to express that or maybe have a launcher that Lotus your program with the event which is an approach that is often used for something like and so is available in energy unicorns you just say using GeoNetwork and it will do all of that stuff before the program starts the site tackle B uh the nauseous of monkey catching I don't think it is that tree in this case because we're not arbitrary monkey patching bits of the standard library at random times we just starting J. that we start
Python with a different distribution of standard library that happens to be proctored most asking with with G event it's half it is modeled as a library is rather than having at python hyphen event program is bundled as a library so you you can choose to use it or not i in different ways according OK so for example you might have a batch job that runs so the bachelor runs without asynchronous code because it doesn't need at the time and if you want to to use some I see so it yet simplify for your code by not doing a sport test that test recognize that you only asynchronous networking stuff in test so you might call your business logic as as normal codes and have it runs synchronously and then just when your research and production you using um G. eventually asynchronous and asynchronous networking so you obviously do integration testing actually running future events and that kind of thing but but it's it's OK to use this use the full power given that thing it just means that you can't use existing pure Python library site I think it's a massive advantage you you as a say that you can't use it if you're if you're writing a GMM library you should not rely on catching being present because you don't need don't know the the core of your library is going to want to go like matching so so the model matching also works with a encoded using select so that immediately means that you can use that existing libraries that are doing their own kind of networking so that that will have relevantly like peak that you could use to get you really want to do little to collect um but you need to ensure that is using the select uh the slack function rather than the probable case you will when you the more platform-specific alternatives that are that are usually better and so just to quickly run through the kind of of features in given you
obviously need to go to school agreement to allow concurrent operations that don't block each other so that the fundamental unit of of processing alliance with Japan is having spring that's useful and bring the side of like a reading or writing side you can kill green by passing an exception so that when the previous resumed it's or signal that bring to be immediately reasonable but whenever seems like section will be raised so that section advantages France because copies leading from 1 and then there's a there's a green pool equivalent to processing local I other types of tools so if you wanted to paralyze network operations that's easy which to them and then this synchronization primitives to ensure concurrency between 0 to 2 to ensure synchronization between your new agreements and it's worth noting the greenest never run at the same actually assigned times unlike threats so these things are slightly less important your because you you know that you're never going to give up control of the CPU and 2 you get a evoking operation um and message passing facing result is is pretty neat so you block on a single operation as a useful way of turning collapse back into synchronous programming so you want to have a synchronous programming model because it makes easier so facing result you could just say when this collects raised set value in time a because non-negative something that you can block on as a so that just gets into a single result look at and it will return result or if there's an exception here that's the exception and the thing waiting on it will actually receive the exceptions um synchronous areas are and this is an example of using the the French killing that green killing mechanisms so you can just use the context manager like that and you automatically go a time out on the the contains sections any time is like trying to sleep for all blocking operations can be limited by the same time the and and we've already met things like streams of that but there are with the servers and that kind thing so so the I think I can't cover this in way labor you can have business logic completely unaware of Japan and unaware of the agree even without much matching you can have business logic was unaware of asynchronous and you policy in CFR like object which has been made green and it will the business logic who will hit and stopped without having to change what you call stack to collaborate in doing this this yield from shenanigans to get back to to be resumed eventually so I think that's that's a huge advantage and I don't really want my business logic to be have to have the idea of asynchronous backends potentially being being part of it and also has to do with the synchronous back and from
and yes so I bring have the advantage have all the advantages of the kind of generator approach the yeah to to sort out some these things are very light the stack stack frames in Python on although he so yeah major characters and stuff yeah like you were so it works and there's like mention disadvantage is that well it doesn't work on Python 3 times so I and that's the down some people and there is a quite tree branch by all of the others but this free fall I don't I'm not trying to find it is obviously to the usable for some things but some that's the orphanage but then we talk about networking operations so if you want to write a network 7 point interventions points wrapped around and use Python 3 for your user-facing stuff and do a single use a single or use a synchronous just like component that's something that might work I'm and where we have blocks so we have to build the the possibility of deadlock but that may exist another asynchronous I so 1 get the biggest people is doing something that actually actually blocks instead of doing this phase locking where we yield to the event and so if you using any C libraries they probably do this and you have to modify the library or use any a successful in the library and wrapped up and the genetic programming model to avoid blocking on and likewise if you keep the CPU busy you'll never yield to any other agreement so this is isn't a tool for CPU-bound activities but you can you can obviously use the ability of the of the networking features of G events to delegate to asynchronous back ends they're doing heavy lifting and return it through your your what sort of network coming applications written in general and so I mentioned using 1 green color direction so but you don't want to try and merge these 2 into wondering what you want to do writing wandering and reading in the Mondrian because you only want to block in 1 place times the right you're actually looking waiting for messages and blocking out sending that message but your you're not blocked on anything important and it took the time you can also use this with multiprocessing um and that's the kind of approach that's used in job and go going Ross so you these these systems do have green interesting in and read that's but they use multiple threads underneath them in Python have to these processes and make them but but I can still get more scalability at a multiprocessor systems by using this approach multiple processes the sum and then also the company is going to when I was doing this really heavily on our roads omega framework which I think we have a lightning talk a couple years saying never write a micro framework is really stupid idea but but there is 1 so if you want to the kid and with the rest of Japan and the green post restaurant at that time can do so the your database operations also do this fake blocking kind of thing then that's built into the 2 nuclear and in in so far as revulsion at peak and that callback stuff I wrote an NQP library that was actually from another 1 computer but so far there is a whereas most of the aid and keep drivers tried to be asynchronous optical back so this gives you a complete synchronous programming model so remote cues can be exposed as local cues and you just iterate through the messages of the Q all yeah loop over getting messages from acute rather than having a callback tool every time a message is available them and and all of the other MTP operations so 1st of b and and this is what was
here you know in the you New Europe via the other half of the of don't and and so this here while this is more common than a question but you risk skipping over the part reversed but given only uses the selected system call on all operating systems which give sub-optimal performance of all other platforms like Windows 1st of all I I don't actually seltzer somewhere in the hostage event it will use the most appropriate thing for any 2 properties but not enough Windows from Windows so you know this is a horrible choice for cross-platform readers scalability but might be good if you know your target I think it probably is possible to learn to adapt the events to be more windows that's because the the readings approach is is so that completely abstract and you could use it absolutely is hazardous now it's use is suboptimal system call on some level and so it might be worth knowing if you're going double the event in Venice and never used on Windows by here what's known as needed but that it was not is there and the optimal number of you can use the process you there've optimal number of relays you should use own protease for example or or a majority of commenters should you start from the workers just the let's start as many this you want to it's like just green it's a very very cheap so crazy as many as you need do to start a war like like 1 1010 10 thousand residents from the 100 thousand there is no memory the I have a question regarding the generators and proteins and if you use it to generate a few here if you have an as infamous passive and you 2nd that it seems you then resume is the global state of shared state may change and and event you you don't see obviously that for example at times he made may suspend your degree in that and the states may be different even you wake up again so um like yeah well so that's going to be the careful all of the basic framework so that you can't really rely on global states something that is useful about G event is that has its own thread local object and so that when the the monkey patch approach will apply that fit like logic as the the friending don't local and so that means that you can have your local state in the thread-local objects and I think to ask users thread-local something that's we've monkey catching the flask label stuff should work about don't think I've ever tried that so I get that obviously is going to be careful about using global state when you or you're using anything concurrent thanks so if if you event was supported Python 3 couldn't be compatible with the basic idea of for example could we use some library in that scenario that's written using kind of style some might suspect you probably can't get so basing cuyos completely within a Python it's it doesn't have any special Python tricks whereas this is 1 of the trick in events and and similar systems will recur readings where you could jump to a different stack and so that anything within completely within Python could potentially run on event but I I think the becomes full facing kind is that the event that they think will come to be the standard and then for every including something like Japan so you can run on a single event and I have given you that that leaves me meaning all the frameworks like twisted and tornadoes and J. event and I think I could all be using you know running on exact isn't as it is the moment you could probably use because set of selected is is 1 of the things that patched you could probably use tornado and twisted from their own developments within G event but actually bringing everything together is that is another problem events all do you have any idea and when energy event will be ported to point them because you know I think it's a very important not dependency for a lot of projects like hundreds of thousands of projects and their which we sort I think it's 1 of the those dependencies which needs to be ported right right now we know all you have any ideas estimator on event has only just reached version 1 that is in November last year that it reached version 1 . 0 1 and I don't know how much effort is going into to writing a Python 3 possible didn't so yes no answer for that but if you're interested in game of moving up things thank you it was a very insightful presentation I would like to ask you all where I work we used to needle production and this is kind of sad and then here that's what it knows a where I work we use tornado of resistance by and you were to legislative and the mass of fusion events in the past the problem is that the we found the really hard but and that is the database because the database we couldn't find on the on asynchronous on gamma right it's huge problem for don't like to use human curious so do you have any idea of ontologies from a source of more than 1 that's been developed on the so there are ways around it if you want to do synchronous operations you can use an actual friends who or something like that so wrap up the synchronous coated with wool or multiprocessing so that your passing the requests using given and received responses using but you only have to say for blocking workers the monitoring data schools and that's that's 1 way around random I think I so in nuclear my found way of was that some rewritten example code for how to do you have to make the post stressed up so I could be due to driver i currently incompatible by having the library itself tell you when they want to block and then you are responsible for doing that kind of blocking so it is possible for some drivers but there are and and there are work-arounds for others to to for the grammatical thank you
Maschinencode
Punkt
Automatische Handlungsplanung
t-Test
Framework <Informatik>
Physikalische Theorie
Synchronisierung
Computeranimation
Richtung
Bildschirmmaske
Endogene Variable
Mustersprache
Maschinencode
Programmierparadigma
Vorlesung/Konferenz
Optimierung
Softwareentwickler
Widerspruchsfreiheit
Nichtlinearer Operator
Datennetz
Physikalisches System
Ereignishorizont
Quadratzahl
Verbandstheorie
ATM
Programmschema
Web-Designer
Ebene
Telekommunikation
Server
Bit
Familie <Mathematik>
t-Test
Patch <Software>
Maschinensprache
E-Mail
Broadcastingverfahren
Computeranimation
Richtung
Metropolitan area network
Streaming <Kommunikationstechnik>
Virtuelle Maschine
Loop
Client
Socket
Broadcastingverfahren
Optimierung
Gerade
Funktion <Mathematik>
Einfach zusammenhängender Raum
Soundverarbeitung
Lineares Funktional
Kraftfahrzeugmechatroniker
Elektronische Publikation
Datennetz
Green-Funktion
Einfach zusammenhängender Raum
Ausnahmebehandlung
Physikalisches System
Quick-Sort
Ereignishorizont
Warteschlange
Objekt <Kategorie>
Energiedichte
Chatten <Kommunikation>
Mereologie
Client
Socket
Reelle Zahl
Lesen <Datenverarbeitung>
Kernel <Informatik>
Satellitensystem
Prozess <Physik>
Punkt
Momentenproblem
Gemeinsamer Speicher
Formale Sprache
HIP <Kommunikationsprotokoll>
Raum-Zeit
Computeranimation
Übergang
Kernel <Informatik>
Metropolitan area network
Streaming <Kommunikationstechnik>
Deskriptive Statistik
Last
Skalierbarkeit
Prozess <Informatik>
Verweildauer
Kontrollstruktur
Gerade
Zentrische Streckung
Nichtlinearer Operator
Lineares Funktional
Parametersystem
Schlüsselverwaltung
Systemaufruf
Ausnahmebehandlung
Ähnlichkeitsgeometrie
Quellcode
Ereignishorizont
Menge
Rechter Winkel
Festspeicher
Socket
p-Block
Ordnung <Mathematik>
Aggregatzustand
Lesen <Datenverarbeitung>
Fehlermeldung
Algebraisch abgeschlossener Körper
Dualitätstheorie
Gewicht <Mathematik>
Große Vereinheitlichung
Zahlenbereich
Zentraleinheit
ROM <Informatik>
Informationsmodellierung
Reelle Zahl
Endogene Variable
Programmbibliothek
Äußere Algebra eines Moduls
Inverser Limes
Zusammenhängender Graph
Thread
Optimierung
Automorphismus
Ereignishorizont
Analysis
Videospiel
Green-Funktion
Mailing-Liste
Physikalisches System
Elektronische Publikation
Quick-Sort
Vorhersagbarkeit
Endogene Variable
Objekt <Kategorie>
Mapping <Computergraphik>
Bildschirmmaske
Diagramm
Flächeninhalt
Mereologie
Gamecontroller
Hill-Differentialgleichung
Offene Menge
Prozess <Physik>
Gewichtete Summe
Mereologie
Kartesische Koordinaten
Extrempunkt
Komplex <Algebra>
Computeranimation
Übergang
Formale Semantik
Internetworking
Netzwerktopologie
Metropolitan area network
Softwaretest
Maschinencode
Kontrollstruktur
Auswahlaxiom
Gerade
Nichtlinearer Operator
Datennetz
Ausnahmebehandlung
Ereignishorizont
Deklarative Programmiersprache
Client
Message-Passing
Fehlermeldung
Algebraisch abgeschlossener Körper
Server
Klasse <Mathematik>
Zellularer Automat
E-Mail
Transportproblem
RFID
Multiplikation
Datentyp
Programmbibliothek
Zusammenhängender Graph
Optimierung
Datenstruktur
Ereignishorizont
Varianz
Disjunktion <Logik>
Einfach zusammenhängender Raum
Protokoll <Datenverarbeitungssystem>
Einfach zusammenhängender Raum
Objekt <Kategorie>
Warteschlange
Flächeninhalt
Meter
Mereologie
Parametersystem
Term
Stereometrie
Bit
Punkt
Rahmenproblem
Hochdruck
Green-Funktion
Maschinensprache
Division
Computeranimation
Kernel <Informatik>
Formale Semantik
Übergang
Metropolitan area network
Loop
Netzbetriebssystem
Datentyp
Nichtunterscheidbarkeit
Vererbungshierarchie
Kontrollstruktur
Generator <Informatik>
Ereignishorizont
Gerade
Korrelationsfunktion
Implementierung
Nichtlinearer Operator
Green-Funktion
Einfache Genauigkeit
Bitrate
Modul
Ereignishorizont
Endogene Variable
Portscanner
Objekt <Kategorie>
Rahmenproblem
Generator <Informatik>
Kollaboration <Informatik>
Verkettung <Informatik>
Datenfeld
Loop
Mereologie
PRINCE2
Lesen <Datenverarbeitung>
Distributionstheorie
Bit
Subtraktion
Web Site
Maschinencode
Zustandsmaschine
Versionsverwaltung
Green-Funktion
Computer
Patch <Software>
Maschinensprache
Extrempunkt
Bildschirmfenster
Mathematische Logik
Term
Computeranimation
Netzwerktopologie
Informationsmodellierung
Maschinencode
Randomisierung
Programmbibliothek
Äußere Algebra eines Moduls
Optimierung
Leistung <Physik>
Softwaretest
Distributionstheorie
Lineares Funktional
Datennetz
Softwarewerkzeug
Matching
Ein-Ausgabe
Biprodukt
Menge
Ereignishorizont
Dichte <Physik>
Integral
Portscanner
Energiedichte
Speicherabzug
p-Block
Stapelverarbeitung
Normalvektor
Standardabweichung
Resultante
Quelle <Physik>
Verklemmung
Punkt
Prozess <Physik>
Gewichtete Summe
Datenparallelität
Kartesische Koordinaten
Computer
Extrempunkt
Synchronisierung
Computeranimation
Richtung
Gewöhnliche Differentialgleichung
Netzwerktopologie
Metropolitan area network
Streaming <Kommunikationstechnik>
Arbeit <Physik>
Datenmanagement
Skalierbarkeit
Eigentliche Abbildung
Maschinencode
Programmierparadigma
Ordnung <Mathematik>
Phasenumwandlung
Verklemmung
Kraftfahrzeugmechatroniker
Nichtlinearer Operator
Softwareentwickler
Vervollständigung <Mathematik>
Synchronisierung
Datennetz
Datenhaltung
Applet
Übergang
Ausnahmebehandlung
p-Block
Kontextbezogenes System
Matching
Systemaufruf
Ereignishorizont
Invariante
Ebene
Server
Garbentheorie
p-Block
Zentraleinheit
Message-Passing
Lesen <Datenverarbeitung>
Server
Rahmenproblem
Green-Funktion
Keller <Informatik>
Dienst <Informatik>
Zentraleinheit
Äquivalenzklasse
ROM <Informatik>
Mathematische Logik
Framework <Informatik>
RFID
Systemprogrammierung
Loop
Evolutionsstrategie
Message-Passing
Multiplikation
Informationsmodellierung
Socket
Front-End <Software>
Datentyp
Programmbibliothek
Zusammenhängender Graph
Thread
Semaphor
Primitive <Informatik>
Optimierung
Ereignishorizont
Green-Funktion
Datenmodell
Verzweigendes Programm
Mathematisierung
Einfache Genauigkeit
Physikalisches System
Grundeinheit <Mathematik>
Quick-Sort
Einfache Genauigkeit
Portscanner
Warteschlange
Objekt <Kategorie>
Druckertreiber
Flächeninhalt
Mereologie
Gamecontroller
Kantenfärbung
Prozess <Physik>
Momentenproblem
Datenparallelität
Minimierung
Versionsverwaltung
Maschinensprache
Skalierbarkeit
Maschinencode
Bildschirmfenster
Vorlesung/Konferenz
Auswahlaxiom
Nichtlinearer Operator
Kategorie <Mathematik>
Datenhaltung
Stellenring
Ruhmasse
Systemaufruf
Ähnlichkeitsgeometrie
Quellcode
Biprodukt
Green-IT
Ereignishorizont
Generator <Informatik>
Menge
Rechter Winkel
Festspeicher
Projektive Ebene
Gammafunktion
Standardabweichung
Fitnessfunktion
Aggregatzustand
Lesen <Datenverarbeitung>
Zahlenbereich
Kombinatorische Gruppentheorie
Mathematische Logik
Systemplattform
Framework <Informatik>
Spieltheorie
Endogene Variable
Programmbibliothek
Thread
Softwareentwickler
Schätzwert
Ontologie <Wissensverarbeitung>
Anwendungsspezifischer Prozessor
Physikalisches System
Portabilität
Objekt <Kategorie>
Patch <Software>
Energiedichte
Uniforme Struktur
Minimalgrad
Druckertreiber
Mereologie

Metadaten

Formale Metadaten

Titel Gevent: asynchronous I/O made easy
Serientitel EuroPython 2014
Teil 25
Anzahl der Teile 120
Autor Pope, Daniel
Lizenz CC-Namensnennung 3.0 Unported:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen.
DOI 10.5446/19958
Herausgeber EuroPython
Erscheinungsjahr 2014
Sprache Englisch
Produktionsort Berlin

Inhaltliche Metadaten

Fachgebiet Informatik
Abstract Daniel Pope - gevent: asynchronous I/O made easy gevent provides highly scalable asynchronous I/O without becoming a nest of callbacks, or even needing code changes. Daniel will explain how to get started with gevent, discuss patterns for its use and describe the differences with Twisted, Tornado and Tulip/asyncio. ----- It has been claimed "Callbacks are the new GOTO". Most asynchronous IO libraries use callbacks extensively. gevent uses coroutines to provide highly scalable asynchronous I/O with a synchronous programming model that doesn't need code changes and callbacks. By elegantly monkey patching the Python standard library, both your code and all pure Python libraries become asynchronous too, making a separate collection of protocol implementations (in the style of Twisted) unnecessary. Code written like this is easier to understand, particularly for more junior developers. Crucially, IO errors can be raised at the right places. I will be introducing gevent's programming model, why it's easier, walk through simple code samples, and discuss experiences and metaphors for programming with it.
Schlagwörter EuroPython Conference
EP 2014
EuroPython 2014

Zugehöriges Material

Ähnliche Filme

Loading...