Merken

Asynchronous network requests in a web application

Zitierlink des Filmsegments
Embed Code

Automatisierte Medienanalyse

Beta
Erkannte Entitäten
Sprachtranskript
Isabella come loose union reverses the back and something engineer guilt
in Hamburg and represent us to talk about his inference network is requested by the applications did walmart companies alright
thanks a lot for all of you being
here um sickness this request and will altercation with 1st I work for young an awesome some company where connecting people was great local businesses the laws you to find what is interesting around you restaurants all tails cinema everything we have a
90 million monthly active users just formal mobile of 102 millions review In total 70 % of all traffic such come from mobile so we're very mobile oriented company and launch inserted to countries including Spain what is this
talk about the 1st on going to introduce a bit why would you why did I do this for what's the problematic and what's actually not so easy about wanting to do a synchronous network in replication will do a quick reminder about that
was the point of view is the what's report model and wielding into wants and needs and of this talk some coding examples some way different ways to do this I'm might skim over many details and the goal is to have an overview of different ideas on how you can use this before progressed in replications what's so use answer is on the up that's what I'm working on and we
have a service which is the the available and from very high level people request on your services but that's a very very high level view and that's not really what it looks like you know and so on and so what many people do
is they have an insulator 1st it's fine equally efficient service you call your business so as you call your use the service and its or reduced slow and it gets smaller and smaller as much as yet services and the user are just waiting for the phone which you don't really want to them answers so you what you might
want to do if you can do is just call all of the services at the same time and that's where
they are not as your total time spending for your public service endpoint is not the sum of all the all the services you have to call but
just page what the soloists and that's going to be a timing we are all doing Python Standard Library contains
most of the 2 we need for everything and there is a very nice thing which is the central executive i've taking copy-pasted since from the documentation example is exactly evolved during a synchronous network requests it's very nice it's what you should be doing using processes but case threads are very nice as I'm reading from the conditions for it was is often used a lot higher which is exactly what we we want to do and there is also another mention which is will the folds and number of processing dimensions defined fight and that's kind of where
things going to watch some problems solarise which is we don't run just 1 Python program were running away replication and of all this whole web application to run and as much was possible in as much politics of atoms in your request as it possibly
can and right now the ThreadPoolExecutor is going to be concurrent with this and also it means that there is only a sentence limits and which it can serve request right now it's going to be the local emission terbinafine this means if you want to do 1 more request it's not going to be executed between power also is not aimed to break I'm going to do small
little things about justifying what people about if you're running time needed students this kind of invented out or even something is directly plugged into G event that's not exactly is the position I'm going to take your maintenance lots of single the room but since I'm going to focus on the reason have
because what's what Django pyramid fast that all are fundamentally it's fairly
unlikely that you'll deploying you all with the out with we use a symbol server all they should be simple so so we also need to choose a deployment options
just for the sake of talking about things that work across today uh other reusing URIs day because it's you very used in production there is a lot of
options you can do almost everything and it's using the pre-fault model which is what's most efficient to run whatsoever so if you don't know what to the that didn't stop that
please call so you have the master processor work process which is going to build your app then going to to creates the workers and then create going to run your application in several rights threats that's really really nice because the fork as a property of being copy on right which means that you will save all the memory for this process is just going because they are all the same will come back to that and when you want to serve request later you have something rest proxy initiative worker using you is the and you must process is reporting requests to workers into the threat call no 1 looks too badly injured right now that's the
simple as simple solution to do what we wanted it's completely synchronous are not even more using the thread pool is going to be all of phase of affection for everything that's happening you application which takes the environment and not response which is the basic of the was the standards we are using request forms network calls because it's way easier that way I avant my machine a small set of and running that is going to be just you give it a time waits for that time and respond and that's a very
nice simplification of long network calls that's from this
great is the that's the basic version which is going to run wants nothing too complicated but staged a stop to it and let's go forward so so is this loss this is supposed to last 1 . 5 25 seconds it left to be more because of the head and that's long very very long right now if I have a little script is allows me to a server and you'll see that it only serves 1 request at a time all this request are arriving in Paolo to who has 403 3 request is going to wait for 4 and a half seconds is going to be the exact some of the thing which is what we don't know what I'll just show quickly is running server In another version sorry so I prepare many but as I'm talking with much already which is going to run what's called the mixed with threads and processes uh palatization these against it a natural process that should not have too much memory but it still goes and using more more calls and threads uh you had a bit more memory because that's all I had that was gills and everything runs on the same process of course so is there is a limit to how much stress can run right now I'm using
Vienna for controlling this and actually 2 processes to spread is the maximum I can run because I made a very
very small sorry the various very small warm and that's Francis all the 1 with the next and you will see we can and yeah let's through for request that it and let's change the faults and yeah we waited a bit more than expected of ahead but still it's goods and the free throws with 1 then we're going to wait an awful lot longer because 1 of the request is waiting until the also are available it was created in minutes and something
right you can see that basically
whether you are processes or threads power lies in a very similar manner the notes on continued for forgetting it's so obvious all the current I'm going to present its points and 2 . 5 everything is made here with Python 2 . in mind I might tell you things are available for all the points and version but that's using in Python
it's nice it's good uh the right
through that's very simple let's try to do something a bit nicer still is going to be looking into the standard library when it when is available a a a single ionized again a very simple solution i'm going to use always you all my example was to processes there is a very good reason for that is as I was telling beginning there is a fork abusing service so many things can be a bit different when you have if you just run 1 you can not see everything from have here some strange thing happens because the whole process happens and something that would be so just just to be really clear that all words 2 processes that's going to be the rule here falls occurred is taken directly from um is there a university library for doing network calls if you do not know if this works it was a bunch of talk and this conference to know
how to do so and there is more again today go and see let's
run it I want you to go that
using student so that's that's attach a stop to it and we see homes threats what's happening there sorry from muttering French and let's scale it's just to prove that I actually did my job and prepare my silence occurred is actually working as I advised yes it's only lasted half a 2nd before the head and that's the length of the longest call in the pilot who wanted to do
victory and we can see something of a different as well which is like all the cost of that at the same time and at all in the same time that did happen in parallel we are so thrilled that uh in
the free trying to hammer again and this time I will remember to change the fault and let's wrote to request that it yeah everything's find whose report we waiting palatization on the with the server level is completely transparent there is really difference with what were doing before so this is nice you might have noticed looking at
H told that that all for new number of threads appear which we did not really expect or become foreign anyway and let's look at what they're doing look at a time
Bellini's under ingest resolution it's a little trick it little problem with is a experiences ThreadPoolExecutor to actually end-user DNS resolution and its you need to be aware of its because it could create a lot more threats you just looking at the current again there is 1 part which it's a bit more important than it seems it's as a that if you get event it's not as transparent and it seems that what we did is we kind of change will program run and so was very nice the and
schematics interest in network programming essential so on just to get so single stranded what we used to do in the single our system and what we're trying to do now is that the event-driven column so we're not waiting anymore we're just piling up piling up and everything is happening inside the loop which change the way of program run but schematic is but actually there is still a lot of holds
into this so results show my performance didn't crash so I don't this from little
points um if you tried to use the training model you will encounter problems because getting event you just change the name price spread you can go around this was a little trick we just sets the eventually you get and fails if you felt to gives the event of interest we create 1 and that's where you can run this thread which we can just prove right now and let me so this tiny sequel to which means there is we're back in the situation in which we couldn't initially to processes to spread the process and the assign prices will fall quest that it was the right holds yeah it works will also we
see that so are I suspect from within its resolution this is actually going to be a solved problem fairly soon as I I would is coming in and it's going to have resonance but political using the event
place the rest but right now it's still not available unstable version to use master version
of which DPI you built using the idea is to depend on to do that so called we need a lot of things and as Exxon mentioning we did change where are have run that maybe we could go a bit further than that and this
change also goes away the whole set of around and have everything because it seems to be really really nice and will will continue my bingo of using a synchronous firing price and we is G that and
so on uh which should made actually being was tornado twisted and I think I have in the gene out 2 main things
to notice we make it that's the standard library so it does not come out degree of of the box is the commitment we are changing further and further and further the same and New
yes and we pass the
option to use the G. events my cross-trading same gene and is not exactly and even tho it's a process is based on the nightmare of sorry Greenspan implementation
but for all purposes it's really behaves in the same way as us and how would and you might also notice that
the I didn't change anything of the network or it's exactly the same as the 1 in the synchronous application which is nice so we did catch the standard library for its again to process let's run it because great used in tells you what running lips components yeah it works and and I
forgot to attach myself
to the work you will see what I do that in a 2nd when you see the number of threads began yet again urge events from
stressed by default to the genus genus resolution no it's it happens uh if we try to hammer and again this is time this so let's put a lot more so I
had written 50 even call so this should be like the maximum number of we would expect forcing 50 g threads onto processes 100 OK but that's actually a bit more that's not 1 . 5 that's a bit smaller but that's due left this young girl know that's less and yeah OK let's do something in between as the gene that's the scaling happens in
a bit of a difference manner which is you don't get perfect performance than jump than a job you have a slew raised in the number of concurrent requests that you can except for an extra little cost and if we go like a ball what
specified then it jumps again you have a job but there is not like a flat theoretical Pacific arithmetic progressed I I did was the case with physical presence at the
request request there's some sort of ramp up an extra cost to running it so in that case we gain a lot of concurrency between lost the gain in timing so that we wanted and we completely off occasionally made everything
revolves around you events and Hey we we have all
the various so actually if you astray 1 of the process you can i can prove use that phase during the solution you can the locals getting result here and so yeah depend on how will you always reading Strings
and you you are changing everything and you might not want to do that what you want might want to do is keep your good all
application you don't want to deal with us Cairo because you believe you're going to mess it up you want the simplest solution possible and maybe just the network calls and all the rest because unlike you really want the minimal n there is a
last technique to use that and not ideas that I will present and that's offloading uh in the event of in separate thread and then interacting with the stress that we have resin having reverted back to the set political to in the beginning but rather than having
many many spreads just have 1 which does everything synchronously and then you interface current visits using the future extraction which comes and Andean is exactly made this this is a crude is a bit more
involving here I'm using tornado for because it makes in my school for presentation I will mention also the option just it's just wait hold your forces it's coming um real function that we create and extensions the eventual we make its and current reinforcement is constant spread false responders in separate thread we start of Argentina premature room Miner was the exits don't do that just makes the could nice and also makes presentation graph but there are better ways to do this so long network called becomes a bit more complicated because we need to pass the
results in the future and then you might be noting I'm using concurrent future and not answer
tornado future to family was NATO it's because we are not running things in the same spread and so we need the start a version of it great um the application is very very nice and we get an extra sings from being able to do this and other we can do something else right now Knowles example I've presented you were preparing all of your network calls and throwing them and
distance and then waiting for results by doing this kind of is what you can do is like OK I want this saying than in this 1 and then you block the result you want at the time you want and if you have seen which our some calls which are dependent on 1 another we need to call the business so as to get the idea of a business and income 2nd 1 that's might be really interesting for you that's what we're using account all of these reasons and right now I'm just sleeping 1
2nd that's run it miracle little saying you might notice an extra option here which is cool lazy apps and on forced to do because I'm cheating a bit if you do remember this application is loaded loaded and then fault and the problem was that is the i a loop is created right away when the current is important and that wouldn't work was a for mobile perfectly the
amusingly apps to avoid this behavior when that just supplies and stack is loaded then the fall happens and then the application is loaded everywhere equal 0 my mind
and was pools that's clearly yes 1 2nd is not so . 5 like usual because we wait 1 2nd but we just have 1 2nd everything up and in Palo
behind we are happy you only if we trying to hammer it we have the same kind of performance and was like called into from
yeah and property 3 which would 3 seconds which were given time to make initial fonts and we see only 2 spreads which is what we expected tornado
it's right there is no frustrates victory as in again also the scales in the exact same way
as the original with so that and that's very nice because the extra cost we have just extra stress but it's not really very
working thread what indoors is very mostly waiting so it does not impact performance much does not invite memory much and it's very very practical especially if you don't want to get too involved into a synchronous things you just want to try to find tutoring synchronously I should you
could you should really not be using in production but fortunately user on the few libraries it could be using if you run really interesting and offloading eventually crochet is a very very nice library its user twisted event loop and you can basically run anything in the reactor was
reactor offloaded it's very very nice and if you are just 1 thing a networking
parts of the although the library which is called the the might of heard all of if you want if different yesterday and use it is called final notes so it was very very short of I
violence I skimmed over many many things but what's the takeaway is here's what future needs if you have like a very if you need to handle many many a synchronous connections and you want something do events and have good for didn't go for do something that help you out but if you do not want to do it don't say what constants like I need to do this no there are many many solution to keep your app in the ladies and still get the performance remember the trading tradeoffs between speed of points and concurrency and the where of DNS resolution it's can really a problem and the pain from time to time we are
available everywhere I would really like to recommend engineering what it's really nice we publish
lots of articles interesting ones and we have a booth at which I will be later if you have more questions that I cannot answer right now we thank Yuri
marginally some for the storm that taking a couple questions about human it's lessons his for his her hands on Monday have question
why do you need to avoid
these threats witness you don't need to but it's the next best thing
that you don't you means like if you were you could also avoid enhanced-resolution altogether if I had written 1 . 7 and the local directly I would not be that obviously it's necessary it's more whole threats that are taking execute that could be just integrated more seamlessly into the rest related all that above and not only the library to read in the it was more surprised more surprising in a way that really completely bad and contributor of this we can avoid it Jim any more questions
that of hi not very tall and you what you were doing offloading to another inside of you with the but 1 of the things that you is that of mentation talk about is that when you activated threads it actually has to great deal and it doesn't if it doesn't allow trends which is strange but that's how it works have you thought about
running all the network calls being another processing and then get the results back so you don't have that I don't know if the trade is going to be a good or a terrible meeting we about it but actually you don't so actually a civil action you could also 20 itself closer to you is the end right announcement is the finale but you could also ask you risky to sponsor spread for you and that's where it would really be shared across whole of how the instances it's an optimization ties you is you is the which is that years he was before deployment and it's it's and you can do it if you want to but if you won't want to switch huge unicorn you want to switch to something else that means that you need to rewrite part of your application could and adults fall putting in a process you don't need to because it's all red actually doesn't do much what to do those most of the time is waiting and waiting and mice and that we don't all the fields of much so the goal is not a problem with the that also few things because it's been defined waiting list of things if that were to change to offer a lot more things in it maybe it would be worth it but as your firebombs most of the time stress is more efficient just on 1 year them think you any other
questions OK hi things for the stock and migration so GMM and and basically the main he meant adventures the standard library so that means that messes with internal and how we feel will it through survive to the next item releases um I'm
not going to be perfectly honest I I'm always a bit wary when you have to present library especially because that means that when you enter soaring speaking which of course and when you integrate with this uh also party libraries you have problems in event it's like need to use everything G vented and all that there is a standard in Python which is absent pyro I think as people are migrating to Python 3 things like events will disappear but people using Python 2 g then to sit and a dissolve really really good options some I would think it's going to go away but yeah my personal
opinion is it's not going to survive this entire the unless
like some huge improvement into the scandalous relies on a vector running the same way it's Greenspan and others in your improvement in that regard seems like you for this scenario should be more performance and the more someone in the back thank
you for that will move and thank you for the great to just a commentary on the questions that students and present principles is being worked on so that they have plans to you right maybe they in the room when erasing can only be when you have wonderfully vibrant to be consistent differences approaches thanks and more
questions thank you were mentioning this
W3C-Standard
Besprechung/Interview
Vorlesung/Konferenz
Kartesische Koordinaten
Gesetz <Physik>
Steuerwerk
Baum <Mathematik>
Bayes-Netz
Portscanner
Orientierung <Mathematik>
Server
Bit
Datennetz
Code
Datenreplikation
Mobiles Internet
Stichprobe
Aggregatzustand
Ideal <Mathematik>
Synchronisierung
Computeranimation
Metropolitan area network
Dienst <Informatik>
Informationsmodellierung
Subtraktion
Sichtenkonzept
Punkt
Datenreplikation
Codierung
Dienst <Informatik>
Zeiger <Informatik>
Computeranimation
Übergang
Dienst <Informatik>
Dienst <Informatik>
Computeranimation
Offene Menge
Total <Mathematik>
Gewichtete Summe
Prozess <Physik>
Datennetz
Hausdorff-Dimension
Multiplizierer
Mathematisierung
Zahlenbereich
Dienst <Informatik>
Synchronisierung
Computeranimation
Homepage
Dienst <Informatik>
Chatten <Kommunikation>
Konditionszahl
Vorlesung/Konferenz
Thread
Faltung <Mathematik>
Zentraleinheit
Lesen <Datenverarbeitung>
Metropolitan area network
Chatten <Kommunikation>
Multiplizierer
Web-Applikation
Stellenring
Inverser Limes
Ordinalzahl
Optimierung
Zentraleinheit
Computeranimation
Leistung <Physik>
Softwarewartung
Task
Ortsoperator
sinc-Funktion
t-Test
Rechenzeit
Ereignishorizont
Computeranimation
Informationsmodellierung
Task
Datenmodell
Server
Vorlesung/Konferenz
Symboltabelle
Biprodukt
Ereignishorizont
Computeranimation
Konfiguration <Informatik>
App <Programm>
Proxy Server
Server
Prozess <Physik>
Datennetz
Kategorie <Mathematik>
Inverse
Gateway
Datenmodell
Systemaufruf
Kartesische Koordinaten
Systemaufruf
Computeranimation
Virtuelle Maschine
Bildschirmmaske
Rechter Winkel
Festspeicher
Endogene Variable
Ablöseblase
Thread
Coprozessor
Programmierumgebung
Phasenumwandlung
Standardabweichung
Bitmap-Graphik
Einfügungsdämpfung
Bit
Elektronische Publikation
Prozess <Physik>
Gruppe <Mathematik>
Datennetz
Zwei
Versionsverwaltung
Systemaufruf
Interpretierer
Extrempunkt
Computeranimation
Sinusfunktion
Metropolitan area network
Festspeicher
Server
Inverser Limes
Skript <Programm>
Thread
Normalspannung
Informationssystem
Schreib-Lese-Kopf
Bit
Server
Prozess <Physik>
Extrempunkt
Güte der Anpassung
Oval
Extrempunkt
Computeranimation
Metropolitan area network
Uniforme Struktur
Total <Mathematik>
Vorlesung/Konferenz
Versionsverwaltung
Normalvektor
Gammafunktion
Prozess <Physik>
Punkt
Rechter Winkel
Versionsverwaltung
Vorlesung/Konferenz
Thread
Systemaufruf
Computeranimation
Leistung <Physik>
Dienst <Informatik>
Bit
Prozess <Physik>
Datennetz
Programmbibliothek
Systemaufruf
Vorlesung/Konferenz
Wort <Informatik>
Schlussregel
Grundraum
Computeranimation
Binärdaten
Metropolitan area network
Zentrische Streckung
Server
Dicke
Gruppe <Mathematik>
Vererbungshierarchie
t-Test
Systemaufruf
Computeranimation
Gammafunktion
Schreib-Lese-Kopf
Subtraktion
Dualitätstheorie
Gruppe <Mathematik>
Vorzeichen <Mathematik>
Interpretierer
Extrempunkt
Computeranimation
Übergang
Metropolitan area network
Zellularer Automat
Server
Parallele Schnittstelle
Verkehrsinformation
Gammafunktion
Software Engineering
Binärdaten
Bit
Euler-Winkel
Mathematisierung
Zahlenbereich
Extrempunkt
Systemaufruf
Ereignishorizont
Computeranimation
Sinusfunktion
Metropolitan area network
Last
Zellularer Automat
Direkte numerische Simulation
Mereologie
Vorlesung/Konferenz
Thread
Software Engineering
Bildauflösung
Gammafunktion
Resultante
Metropolitan area network
Loop
Loop
Programmschema
Systemzusammenbruch
Physikalisches System
Optimierung
Ereignishorizont
Systemaufruf
Computeranimation
Inklusion <Mathematik>
Prozess <Physik>
Punkt
Wellenpaket
Konfiguration <Informatik>
Bildauflösung
Vorzeichen <Mathematik>
Fortsetzung <Mathematik>
Extrempunkt
Ereignishorizont
Computeranimation
Metropolitan area network
Informationsmodellierung
Thread
Informationssystem
Normalvektor
Bildauflösung
Meta-Tag
Metropolitan area network
Menge
Mathematisierung
Versionsverwaltung
Bildauflösung
Vorlesung/Konferenz
Synchronisierung
Computeranimation
Metropolitan area network
Quader
Programmbibliothek
Partielle Differentiation
Vorlesung/Konferenz
Patch <Software>
Hinterlegungsverfahren <Kryptologie>
Computeranimation
Inklusion <Mathematik>
Binärcode
Prozess <Physik>
Datennetz
Implementierung
Partielle Differentiation
Kartesische Koordinaten
Patch <Software>
Ereignishorizont
Computeranimation
Konfiguration <Informatik>
Metropolitan area network
Programmbibliothek
Zusammenhängender Graph
Lipschitz-Bedingung
Gerichteter Graph
Zahlenbereich
Extrempunkt
Computeranimation
RFID
Metropolitan area network
Diskrete-Elemente-Methode
Uniforme Struktur
Vorlesung/Konferenz
Thread
Bildschirmsymbol
Default
Personal Area Network
Bildauflösung
Binärdaten
Server
Bit
Subtraktion
Prozess <Physik>
Datenparallelität
Zahlenbereich
Computeranimation
BEEP
Metropolitan area network
Wechselsprung
Diskrete-Elemente-Methode
Perfekte Gruppe
Prozess <Informatik>
Surjektivität
Total <Mathematik>
Vorlesung/Konferenz
Thread
Software Engineering
Gammafunktion
Inklusion <Mathematik>
Krümmung
Datenparallelität
Physikalismus
Hausdorff-Raum
Extrempunkt
Physikalische Theorie
Quick-Sort
Systemaufruf
Computeranimation
BEEP
Metropolitan area network
Mailing-Liste
Prozess <Informatik>
Datenerfassung
Vorlesung/Konferenz
Bildschirmsymbol
Resultante
Prozess <Physik>
Stellenring
Bildauflösung
Ereignishorizont
Computeranimation
Portscanner
Metropolitan area network
Beweistheorie
Vorlesung/Konferenz
Direkte numerische Simulation
Phasenumwandlung
Zeichenkette
Trennungsaxiom
Metropolitan area network
Datennetz
Vorlesung/Konferenz
Thread
Kartesische Koordinaten
Bildschirmsymbol
Normalspannung
Ereignishorizont
Computeranimation
Trennungsaxiom
Lineares Funktional
Bit
Graph
Datennetz
Kombinatorische Gruppentheorie
Computeranimation
Konfiguration <Informatik>
Konstante
Metropolitan area network
System F
Forcing
Loop
Endogene Variable
Vorlesung/Konferenz
Thread
Maßerweiterung
Resultante
Metropolitan area network
Datentyp
Gruppe <Mathematik>
Datennetz
Versionsverwaltung
Familie <Mathematik>
Kartesische Koordinaten
Systemaufruf
Computeranimation
Sinusfunktion
Resultante
Loop
Bit
Datentyp
Systemaufruf
Strömungsrichtung
Kartesische Koordinaten
Abstand
Systemaufruf
Computeranimation
Konfiguration <Informatik>
Managementinformationssystem
Gruppe <Mathematik>
Kartesische Koordinaten
Interpretierer
Extrempunkt
Computeranimation
BEEP
Arithmetisch-logische Einheit
Metropolitan area network
OISC
Datenerfassung
Vorlesung/Konferenz
Datenfluss
Gammafunktion
Inklusion <Mathematik>
Portscanner
Metropolitan area network
Font
Kategorie <Mathematik>
Zwei
Zoom
Extrempunkt
Zeiger <Informatik>
Computeranimation
Metropolitan area network
Zentrische Streckung
Dualitätstheorie
Last
Geometrische Frustration
Festspeicher
Vorlesung/Konferenz
Thread
Normalspannung
Computeranimation
Gammafunktion
Loop
Datennetz
Loop
Datennetz
Programmbibliothek
Vorlesung/Konferenz
Biprodukt
Ereignishorizont
Ereignishorizont
Computeranimation
Einfach zusammenhängender Raum
App <Programm>
Punkt
Datenparallelität
Bildauflösung
Ausgleichsrechnung
Ereignishorizont
Computeranimation
Konstante
Code
Mereologie
Direkte numerische Simulation
Programmbibliothek
Direkte numerische Simulation
Bildauflösung
Softwaretest
Vorlesung/Konferenz
Computeranimation
Eins
Besprechung/Interview
Programmbibliothek
Computeranimation
Resultante
Prozess <Physik>
Datennetz
Minimierung
Gruppenoperation
Mailing-Liste
Kartesische Koordinaten
Twitter <Softwareplattform>
Verbandstheorie
Rechter Winkel
Mereologie
Vorlesung/Konferenz
Thread
Normalspannung
Instantiierung
Bit
Migration <Informatik>
Programmbibliothek
Ereignishorizont
Standardabweichung
Konfiguration <Informatik>
Subtraktion
t-Test
Automatische Handlungsplanung
Vorlesung/Konferenz
Vektorraum
Kombinatorische Gruppentheorie
Metropolitan area network
Vorlesung/Konferenz
Computeranimation

Metadaten

Formale Metadaten

Titel Asynchronous network requests in a web application
Serientitel EuroPython 2016
Teil 78
Anzahl der Teile 169
Autor Jullien, Lauris
Lizenz CC-Namensnennung - keine kommerzielle Nutzung - Weitergabe unter gleichen Bedingungen 3.0 Unported:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen und nicht-kommerziellen 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 und das Werk bzw. diesen Inhalt auch in veränderter Form nur unter den Bedingungen dieser Lizenz weitergeben
DOI 10.5446/21174
Herausgeber EuroPython
Erscheinungsjahr 2016
Sprache Englisch

Inhaltliche Metadaten

Fachgebiet Informatik
Abstract Lauris Jullien - Asynchronous network requests in a web application Introducing asynchronous calls from within an endpoint in a web app can be desirable but hard to achieve. This talk will explore different solutions for this (running Twisted event loop, Co-Routines, Asyncio, …) and how well they play with the different parallelization models of common WSGI web servers. ----- In the more and more popular SOA paradigm, it’s common for services to have to compose responses with resources from many different services. Everyone’s first idea will probably be to call each service synchronously with your favorite python HTTP library. This unfortunately doesn’t scale well and tens of successive network calls will make your endpoints painfully slow. One solution is to parallelize these network calls. If you are already using an asynchronous web app (such as Tornado or Twisted), more asynchronous in your asynchronous shouldn’t be much of a challenge. But if you chose not to dive into the madness of chained Deferred calls, and used a standard prefork/threaded WSGI web server (such as Gunicorn or uWSGI) to run your Django/Flask/Pyramid application, you might find yourself wondering how to manage these asynchronous calls. This talk will explore different solutions (running Twisted event loop, Co-Routines, Asyncio, …) and how well they play with the different parallelization models of WSGI web servers.

Ähnliche Filme

Loading...