SlideShare une entreprise Scribd logo
1  sur  224
Télécharger pour lire hors ligne
EVENT DRIVEN
NODEJS
Donnerstag, 27. Juni 13
ÜBER MICH
‣ JavaScript Nerd
‣ C/C++/C# Entwickler
‣ Berliner
‣ Tech Startups
@mikebild / Software Engineer
Donnerstag, 27. Juni 13
init()
setup()
run()
cleanup()
end()
sync
Donnerstag, 27. Juni 13
init()
setup()
run()
cleanup()
end()
sync
0
1
2
3
4
Donnerstag, 27. Juni 13
async
init()0
setup()1
run()2
cleanup()3
end()4
Donnerstag, 27. Juni 13
async
init()0 setup()1
run()2
cleanup()3
end()4
Donnerstag, 27. Juni 13
async
init()0 setup()1 run()2
cleanup()3
end()4
Donnerstag, 27. Juni 13
async
init()0 setup()1 run()2 cleanup()3
end()4
Donnerstag, 27. Juni 13
async
init()0 setup()1 run()2 cleanup()3 end()4
Donnerstag, 27. Juni 13
ASYNC !== POSITION
Donnerstag, 27. Juni 13
ASYNC === ZEIT
Donnerstag, 27. Juni 13
KONTROLLFLUSS === undefined
???
Donnerstag, 27. Juni 13
init(
setup(
run(
cleanup(
end()
)
)
)
)
Donnerstag, 27. Juni 13
???
Donnerstag, 27. Juni 13
CONTINUATION
???
Donnerstag, 27. Juni 13
CALLBACKS
CONTINUATION
???
Donnerstag, 27. Juni 13
FIRST-CLASS
FUNCTIONS
Donnerstag, 27. Juni 13
FIRST-CLASS
FUNCTIONS
‣ Funktionen sind Objekte
Donnerstag, 27. Juni 13
FIRST-CLASS
FUNCTIONS
‣ Funktionen sind Objekte
‣ Variablenzuweisung
Donnerstag, 27. Juni 13
FIRST-CLASS
FUNCTIONS
‣ Funktionen sind Objekte
‣ Variablenzuweisung
‣ Parameter
Donnerstag, 27. Juni 13
FIRST-CLASS
FUNCTIONS
‣ Funktionen sind Objekte
‣ Variablenzuweisung
‣ Parameter
‣ Rückgabewert
Donnerstag, 27. Juni 13
FIRST-CLASS
FUNCTIONS
‣ Funktionen sind Objekte
‣ Variablenzuweisung
‣ Parameter
‣ Rückgabewert
‣ Funktionen haben
Eigenschaften und Methoden
Donnerstag, 27. Juni 13
FIRST-CLASS
FUNCTIONS
Donnerstag, 27. Juni 13
non-blocking
Donnerstag, 27. Juni 13
non-blocking
???
Donnerstag, 27. Juni 13
non-blocking
???
Donnerstag, 27. Juni 13
SCOPE
non-blocking
???
Donnerstag, 27. Juni 13
SCOPE
non-blocking
IMMEDIATE FUNCTIONS
???
Donnerstag, 27. Juni 13
SCOPE
non-blocking
IMMEDIATE FUNCTIONS
CLOSURES
???
Donnerstag, 27. Juni 13
<3 KONZEPTE
Donnerstag, 27. Juni 13
SCOPE
‣ Gültigkeitsbereich vonVariablen
‣ privat innerhalb von Funktionen
‣ das this innerhalb der Funktion
Donnerstag, 27. Juni 13
IMMEDIATE
FUNCTIONS
Donnerstag, 27. Juni 13
IMMEDIATE
FUNCTIONS
Deklaration und unmittelbare Ausführung
Donnerstag, 27. Juni 13
CLOSURES
Donnerstag, 27. Juni 13
CLOSURES
‣ umschließen Gültigkeitsbereich für
Variablen
Donnerstag, 27. Juni 13
CLOSURES
‣ umschließen Gültigkeitsbereich für
Variablen
‣ „einfrieren“ von Werten inVariablen
Donnerstag, 27. Juni 13
CLOSURES
‣ umschließen Gültigkeitsbereich für
Variablen
‣ „einfrieren“ von Werten inVariablen
‣ privateVariablen
Donnerstag, 27. Juni 13
CLOSURES
‣ umschließen Gültigkeitsbereich für
Variablen
‣ „einfrieren“ von Werten inVariablen
‣ privateVariablen
‣ „konfigurierbare“ Funktionen
Donnerstag, 27. Juni 13
CLOSURES
SCOPE - privateVariablen
Donnerstag, 27. Juni 13
CLOSURES
„konfigurierbare“ Funktionen
Donnerstag, 27. Juni 13
SCOPE CLOSURE
???
Donnerstag, 27. Juni 13
SCOPE CLOSURE
YEAH!???
Donnerstag, 27. Juni 13
(RE)BIND SCOPE
Donnerstag, 27. Juni 13
(RE)BIND SCOPE
OUTER
Donnerstag, 27. Juni 13
(RE)BIND SCOPE
OUTER INNER
Donnerstag, 27. Juni 13
(RE)BIND SCOPE
OUTER INNER
Donnerstag, 27. Juni 13
BLOCKING
VS.
NON-BLOCKING
Donnerstag, 27. Juni 13
Donnerstag, 27. Juni 13
Donnerstag, 27. Juni 13
ARBEIT
Donnerstag, 27. Juni 13
WARTEN
ARBEIT
Donnerstag, 27. Juni 13
WARTEN
ARBEIT
Donnerstag, 27. Juni 13
WARTEN
Donnerstag, 27. Juni 13
Donnerstag, 27. Juni 13
FERTIG
Donnerstag, 27. Juni 13
Donnerstag, 27. Juni 13
Donnerstag, 27. Juni 13
Donnerstag, 27. Juni 13
BLOCKING
Donnerstag, 27. Juni 13
???
GESCHWINDIGKEIT
Donnerstag, 27. Juni 13
THREADS
Donnerstag, 27. Juni 13
THREADS
Donnerstag, 27. Juni 13
THREADS
Donnerstag, 27. Juni 13
THREADS
Donnerstag, 27. Juni 13
THREADS
Donnerstag, 27. Juni 13
THREADS
Donnerstag, 27. Juni 13
THREADS
Donnerstag, 27. Juni 13
THREADS
Donnerstag, 27. Juni 13
THREADS
Donnerstag, 27. Juni 13
THREADS
Donnerstag, 27. Juni 13
THREADS
Donnerstag, 27. Juni 13
THREADS
Donnerstag, 27. Juni 13
THREADS
Donnerstag, 27. Juni 13
THREADS
Donnerstag, 27. Juni 13
THREADS
Donnerstag, 27. Juni 13
THREADS
Donnerstag, 27. Juni 13
THREADS
Donnerstag, 27. Juni 13
THREADS
Donnerstag, 27. Juni 13
THREADS
Donnerstag, 27. Juni 13
THREADS
Donnerstag, 27. Juni 13
THREADS
Donnerstag, 27. Juni 13
‣ Reaktionsfähig
THREADS
Donnerstag, 27. Juni 13
‣ Reaktionsfähig
‣ Skalierbar
THREADS
Donnerstag, 27. Juni 13
‣ Reaktionsfähig
‣ Skalierbar
‣ ABER
THREADS
Donnerstag, 27. Juni 13
‣ Reaktionsfähig
‣ Skalierbar
‣ ABER
‣ hoher Aufwand
THREADS
Donnerstag, 27. Juni 13
‣ Reaktionsfähig
‣ Skalierbar
‣ ABER
‣ hoher Aufwand
‣ viel Koordination
THREADS
Donnerstag, 27. Juni 13
TEUER
Donnerstag, 27. Juni 13
IDEEN?
Donnerstag, 27. Juni 13
NEUER ABLAUF
Donnerstag, 27. Juni 13
NON-BLOCKING
Donnerstag, 27. Juni 13
Donnerstag, 27. Juni 13
Donnerstag, 27. Juni 13
Donnerstag, 27. Juni 13
Donnerstag, 27. Juni 13
Benachrichtigen Sie mich,
sobald Sie fertig sind.
Donnerstag, 27. Juni 13
Benachrichtigen Sie mich,
sobald Sie fertig sind.
Donnerstag, 27. Juni 13
Benachrichtigen Sie mich,
sobald Sie fertig sind.
Donnerstag, 27. Juni 13
Benachrichtigen Sie mich,
sobald Sie fertig sind.
Donnerstag, 27. Juni 13
Benachrichtigen Sie mich,
sobald Sie fertig sind.
Donnerstag, 27. Juni 13
Benachrichtigen Sie mich,
sobald Sie fertig sind.
Donnerstag, 27. Juni 13
Benachrichtigen Sie mich,
sobald Sie fertig sind.
Donnerstag, 27. Juni 13
Benachrichtigen Sie mich,
sobald Sie fertig sind.
Donnerstag, 27. Juni 13
Benachrichtigen Sie mich,
sobald Sie fertig sind.
Donnerstag, 27. Juni 13
Benachrichtigen Sie mich,
sobald Sie fertig sind.
Donnerstag, 27. Juni 13
Benachrichtigen Sie mich,
sobald Sie fertig sind.
Donnerstag, 27. Juni 13
Benachrichtigen Sie mich,
sobald Sie fertig sind.
Donnerstag, 27. Juni 13
Benachrichtigen Sie mich,
sobald Sie fertig sind.
Donnerstag, 27. Juni 13
Benachrichtigen Sie mich,
sobald Sie fertig sind.
Donnerstag, 27. Juni 13
Benachrichtigen Sie mich,
sobald Sie fertig sind.
Donnerstag, 27. Juni 13
Benachrichtigen Sie mich,
sobald Sie fertig sind.
Donnerstag, 27. Juni 13
Benachrichtigen Sie mich,
sobald Sie fertig sind.
Donnerstag, 27. Juni 13
Benachrichtigen Sie mich,
sobald Sie fertig sind.
Donnerstag, 27. Juni 13
Benachrichtigen Sie mich,
sobald Sie fertig sind.
Donnerstag, 27. Juni 13
Benachrichtigen Sie mich,
sobald Sie fertig sind.
Donnerstag, 27. Juni 13
Benachrichtigen Sie mich,
sobald Sie fertig sind.
Donnerstag, 27. Juni 13
Benachrichtigen Sie mich,
sobald Sie fertig sind.
Donnerstag, 27. Juni 13
Benachrichtigen Sie mich,
sobald Sie fertig sind.
Donnerstag, 27. Juni 13
Benachrichtigen Sie mich,
sobald Sie fertig sind.
Donnerstag, 27. Juni 13
Benachrichtigen Sie mich,
sobald Sie fertig sind.
Donnerstag, 27. Juni 13
Benachrichtigen Sie mich,
sobald Sie fertig sind.
Donnerstag, 27. Juni 13
Benachrichtigen Sie mich,
sobald Sie fertig sind.
Donnerstag, 27. Juni 13
Benachrichtigen Sie mich,
sobald Sie fertig sind.
Donnerstag, 27. Juni 13
EVENT DRIVEN
Donnerstag, 27. Juni 13
‣ Reaktionsfähig
EVENT DRIVEN
Donnerstag, 27. Juni 13
‣ Reaktionsfähig
‣ Skalierbar
EVENT DRIVEN
Donnerstag, 27. Juni 13
‣ Reaktionsfähig
‣ Skalierbar
‣ UND
EVENT DRIVEN
Donnerstag, 27. Juni 13
‣ Reaktionsfähig
‣ Skalierbar
‣ UND
‣ EINFACH
EVENT DRIVEN
Donnerstag, 27. Juni 13
‣ Reaktionsfähig
‣ Skalierbar
‣ UND
‣ EINFACH
‣ GÜNSTIG
EVENT DRIVEN
Donnerstag, 27. Juni 13
GESCHWINDIGKEIT?
Donnerstag, 27. Juni 13
I/O GESCHWINDIGKEIT
http://duartes.org/gustavo/blog/post/what-your-computer-does-while-you-wait
5ns 50ns 5ms 50ms
CPU-Register
0.33ns
L1-Cache
1ns L2-Cache
4.7ns
RAM
83ns
HDD-Seek
13.7ms
NETWORK
80ms
Donnerstag, 27. Juni 13
WARTEN
Donnerstag, 27. Juni 13
NODE.JS
Donnerstag, 27. Juni 13
I/O MODULE
file, http, net ...
BLOCKING NON-BLOCKING
Donnerstag, 27. Juni 13
I/O MODULE
file, http, net ...
BLOCKING NON-BLOCKING
UNTERSCHIEDE
Donnerstag, 27. Juni 13
BLOCKING
Donnerstag, 27. Juni 13
BLOCKING
‣ Prozess blockiert während des Aufrufes
Donnerstag, 27. Juni 13
BLOCKING
‣ Prozess blockiert während des Aufrufes
‣ wird erst fortgesetzt, wenn Ergebnis verfügbar ist
Donnerstag, 27. Juni 13
NON-BLOCKING
Donnerstag, 27. Juni 13
NON-BLOCKING
‣ Prozess kann weiter arbeiten
Donnerstag, 27. Juni 13
NON-BLOCKING
‣ Prozess kann weiter arbeiten
‣ während die Daten im Hintergrund geladen
werden
Donnerstag, 27. Juni 13
NON-BLOCKING I/O
Donnerstag, 27. Juni 13
NON-BLOCKING I/O
‣ Funktionen ohne „direkte“ Rückgabewerte
Donnerstag, 27. Juni 13
NON-BLOCKING I/O
‣ Funktionen ohne „direkte“ Rückgabewerte
‣ „callbacks“ sind „continuations“ zur Fortsetzung
des Programmablaufs
Donnerstag, 27. Juni 13
NON-BLOCKING I/O
‣ Funktionen ohne „direkte“ Rückgabewerte
‣ „callbacks“ sind „continuations“ zur Fortsetzung
des Programmablaufs
‣ Background-Tasks machen die Arbeit
Donnerstag, 27. Juni 13
NON-BLOCKING I/O
‣ Funktionen ohne „direkte“ Rückgabewerte
‣ „callbacks“ sind „continuations“ zur Fortsetzung
des Programmablaufs
‣ Background-Tasks machen die Arbeit
‣ keine Wartezeit im Programmablauf
Donnerstag, 27. Juni 13
EVENTS
Donnerstag, 27. Juni 13
Donnerstag, 27. Juni 13
‣ Frontend
‣ user interaction-events: mouse*, key*
‣ timer events: setTimeout
Donnerstag, 27. Juni 13
‣ Frontend
‣ user interaction-events: mouse*, key*
‣ timer events: setTimeout
Donnerstag, 27. Juni 13
‣ Frontend
‣ user interaction-events: mouse*, key*
‣ timer events: setTimeout
‣ Backend
‣ I/O-events: networking, filesystem
‣ custom-events
Donnerstag, 27. Juni 13
EVENTS
Donnerstag, 27. Juni 13
‣ Ereignisse auf die reagiert werden
EVENTS
Donnerstag, 27. Juni 13
‣ Ereignisse auf die reagiert werden
‣ viele Sender (üblicherweise nur einer)
EVENTS
Donnerstag, 27. Juni 13
‣ Ereignisse auf die reagiert werden
‣ viele Sender (üblicherweise nur einer)
‣ viele Empfänger
EVENTS
Donnerstag, 27. Juni 13
EVENT HANDLING
Donnerstag, 27. Juni 13
callback(DATA)
Donnerstag, 27. Juni 13
‣ vereinfachte Form der Event-Verarbeitung
‣ wird anstelle eines return-Wertes aufgerufen
‣ NODE.JS Konvention:
function callback(err, data) {}
callback(DATA)
Donnerstag, 27. Juni 13
EVENT EMITTER
Donnerstag, 27. Juni 13
‣ Event-Quelle und Dispatcher
‣ Empfänger werden mit on('NAME', callback)
angemeldet
‣ Events werden mit emit() ausgelöst
‣ Events werden nur an die angemeldeten Empfänger
im Event-Emitter gesendet
EVENT EMITTER
Donnerstag, 27. Juni 13
EVENT EMITTER
Donnerstag, 27. Juni 13
EVENT-LOOP
ARCHITEKTUR
Donnerstag, 27. Juni 13
‣Event-Handler registrieren
‣Anwendung starten
1
Bearbeitet
„lang laufenden“ Aufgaben
2
WORKER
THREADS
WORKER
THREADS
WORKER
THREADS
MAIN
PROCESS
C++Thread-Pool
Donnerstag, 27. Juni 13
‣Event-Loop startet
‣wartet auf Events
3
EVENT-LOOP
MAIN
PROCESS
WORKER
THREADS
WORKER
THREADS
WORKER
THREADS
Donnerstag, 27. Juni 13
Meldet „Daten“-
Rückgaben als Events
4
EVENT-LOOP
MAIN
PROCESS
WORKER
THREADSWORKER
THREADSWORKER
THREADS
➡ fs.data
➡ fs.end
➡http.request
➡ ...
➡ ...
EVENT
QUEUE
Donnerstag, 27. Juni 13
Dispatcher führt
für jeden EVENT
den registrierten
CALLBACK im
MAIN PROZESS aus
5
EVENT-LOOP
MAIN
PROCESS
WORKER
THREADSWORKER
THREADSWORKER
THREADS
➡ fs.data
➡ fs.end
➡http.request
EVENT
QUEUE
DISPATCH
Donnerstag, 27. Juni 13
✓in nur einem Prozess
✓Single-Thread innerhalb von NODE.JS
✓keine Parallelisierung, sondern Non-Blocking
✓Event-Verarbeitung in Reihenfolge der Erzeugung
✓einfaches Modell
✓Skalierung über separate Prozesse (CPU-Intensive Tasks)
✓zwingt zum asynchronem Denken und Code
EVENT LOOP
Donnerstag, 27. Juni 13
BEISPIEL
WEB SERVER
Donnerstag, 27. Juni 13
Donnerstag, 27. Juni 13
NEVER BLOCK
Donnerstag, 27. Juni 13
Donnerstag, 27. Juni 13
YEAH
Donnerstag, 27. Juni 13
EVENT EMITTER
Donnerstag, 27. Juni 13
Donnerstag, 27. Juni 13
STREAMS
Donnerstag, 27. Juni 13
CHILD-PROZESS
Donnerstag, 27. Juni 13
WENNS MAL LÄNGER
DAUERT
Donnerstag, 27. Juni 13
WENNS MAL LÄNGER
DAUERT
✓„split and defer“ - setTimeout(continuation, 0);
Donnerstag, 27. Juni 13
WENNS MAL LÄNGER
DAUERT
✓„split and defer“ - setTimeout(continuation, 0);
✓EventEmitter
Donnerstag, 27. Juni 13
WENNS MAL LÄNGER
DAUERT
✓„split and defer“ - setTimeout(continuation, 0);
✓EventEmitter
✓child-process
Donnerstag, 27. Juni 13
WENNS MAL LÄNGER
DAUERT
✓„split and defer“ - setTimeout(continuation, 0);
✓EventEmitter
✓child-process
✓STREAMS
Donnerstag, 27. Juni 13
BEISPIEL
Donnerstag, 27. Juni 13
Donnerstag, 27. Juni 13
‣ Ein Gast betritt den Empfang eines Hotels
Donnerstag, 27. Juni 13
‣ Ein Gast betritt den Empfang eines Hotels
‣ Rezeptionist begrüßt den Gast
Donnerstag, 27. Juni 13
‣ Ein Gast betritt den Empfang eines Hotels
‣ Rezeptionist begrüßt den Gast
‣ Rezeptionist übergibt ein Anmeldeformular
Donnerstag, 27. Juni 13
‣ Ein Gast betritt den Empfang eines Hotels
‣ Rezeptionist begrüßt den Gast
‣ Rezeptionist übergibt ein Anmeldeformular
‣ Rezeptionist übergibt ein Zahlungsformular
Donnerstag, 27. Juni 13
‣ Ein Gast betritt den Empfang eines Hotels
‣ Rezeptionist begrüßt den Gast
‣ Rezeptionist übergibt ein Anmeldeformular
‣ Rezeptionist übergibt ein Zahlungsformular
‣ Rezeptionist kann weitere Gäste empfangen
Donnerstag, 27. Juni 13
‣ Ein Gast betritt den Empfang eines Hotels
‣ Rezeptionist begrüßt den Gast
‣ Rezeptionist übergibt ein Anmeldeformular
‣ Rezeptionist übergibt ein Zahlungsformular
‣ Rezeptionist kann weitere Gäste empfangen
Donnerstag, 27. Juni 13
‣ Ein Gast betritt den Empfang eines Hotels
‣ Rezeptionist begrüßt den Gast
‣ Rezeptionist übergibt ein Anmeldeformular
‣ Rezeptionist übergibt ein Zahlungsformular
‣ Rezeptionist kann weitere Gäste empfangen
‣ Der Gast füllt die Formulare aus
Donnerstag, 27. Juni 13
‣ Ein Gast betritt den Empfang eines Hotels
‣ Rezeptionist begrüßt den Gast
‣ Rezeptionist übergibt ein Anmeldeformular
‣ Rezeptionist übergibt ein Zahlungsformular
‣ Rezeptionist kann weitere Gäste empfangen
‣ Der Gast füllt die Formulare aus
‣ Der Gast übergibt die ausgefüllten Formulare an den Rezeptionist
Donnerstag, 27. Juni 13
‣ Ein Gast betritt den Empfang eines Hotels
‣ Rezeptionist begrüßt den Gast
‣ Rezeptionist übergibt ein Anmeldeformular
‣ Rezeptionist übergibt ein Zahlungsformular
‣ Rezeptionist kann weitere Gäste empfangen
‣ Der Gast füllt die Formulare aus
‣ Der Gast übergibt die ausgefüllten Formulare an den Rezeptionist
Donnerstag, 27. Juni 13
‣ Ein Gast betritt den Empfang eines Hotels
‣ Rezeptionist begrüßt den Gast
‣ Rezeptionist übergibt ein Anmeldeformular
‣ Rezeptionist übergibt ein Zahlungsformular
‣ Rezeptionist kann weitere Gäste empfangen
‣ Der Gast füllt die Formulare aus
‣ Der Gast übergibt die ausgefüllten Formulare an den Rezeptionist
‣ Rezeptionist überprüft die erhaltenen Formulare
Donnerstag, 27. Juni 13
‣ Ein Gast betritt den Empfang eines Hotels
‣ Rezeptionist begrüßt den Gast
‣ Rezeptionist übergibt ein Anmeldeformular
‣ Rezeptionist übergibt ein Zahlungsformular
‣ Rezeptionist kann weitere Gäste empfangen
‣ Der Gast füllt die Formulare aus
‣ Der Gast übergibt die ausgefüllten Formulare an den Rezeptionist
‣ Rezeptionist überprüft die erhaltenen Formulare
‣ Gast bekommt seinen Zimmerschlüssel, oder muss das/die Formulare
nochmals ausfüllen
Donnerstag, 27. Juni 13
SYNC
Donnerstag, 27. Juni 13
SYNC
Donnerstag, 27. Juni 13
‣ nur 1 Gast je Rezeptionisten
SYNC
Donnerstag, 27. Juni 13
‣ nur 1 Gast je Rezeptionisten
‣ X gleichzeitige Gäste brauchen X Rezeptionisten
(= Threads)
SYNC
Donnerstag, 27. Juni 13
‣ nur 1 Gast je Rezeptionisten
‣ X gleichzeitige Gäste brauchen X Rezeptionisten
(= Threads)
‣ Rezeptionisten und Gast warten (= Locking)
SYNC
Donnerstag, 27. Juni 13
‣ nur 1 Gast je Rezeptionisten
‣ X gleichzeitige Gäste brauchen X Rezeptionisten
(= Threads)
‣ Rezeptionisten und Gast warten (= Locking)
‣ wenn mehr Gäste als Rezeptionisten:
Warteschlange am Eingang
SYNC
Donnerstag, 27. Juni 13
‣ nur 1 Gast je Rezeptionisten
‣ X gleichzeitige Gäste brauchen X Rezeptionisten
(= Threads)
‣ Rezeptionisten und Gast warten (= Locking)
‣ wenn mehr Gäste als Rezeptionisten:
Warteschlange am Eingang
‣ oder ständig "schlafende" Rezeptionisten
SYNC
Donnerstag, 27. Juni 13
ASYNC
Donnerstag, 27. Juni 13
ASYNC
Donnerstag, 27. Juni 13
‣ nur 1 Rezeptionist für X Gäste
ASYNC
Donnerstag, 27. Juni 13
‣ nur 1 Rezeptionist für X Gäste
‣ zu viele Gäste führen nur zur langsameren
Ausführung nicht zur Blocking
ASYNC
Donnerstag, 27. Juni 13
‣ nur 1 Rezeptionist für X Gäste
‣ zu viele Gäste führen nur zur langsameren
Ausführung nicht zur Blocking
‣ Lange Aktionen werden von Background-Services
erledigt
ASYNC
Donnerstag, 27. Juni 13
‣ nur 1 Rezeptionist für X Gäste
‣ zu viele Gäste führen nur zur langsameren
Ausführung nicht zur Blocking
‣ Lange Aktionen werden von Background-Services
erledigt
‣ jegliche Aktion wird über Events ausgelöst
ASYNC
Donnerstag, 27. Juni 13
‣ nur 1 Rezeptionist für X Gäste
‣ zu viele Gäste führen nur zur langsameren
Ausführung nicht zur Blocking
‣ Lange Aktionen werden von Background-Services
erledigt
‣ jegliche Aktion wird über Events ausgelöst
‣ Rezeptionisten sind nicht untätig
ASYNC
Donnerstag, 27. Juni 13
ABER
Donnerstag, 27. Juni 13
KOMPLIZIERT
Donnerstag, 27. Juni 13
CALLBACK HELL
Donnerstag, 27. Juni 13
https://npmjs.org/package/cflow
FLOW
Donnerstag, 27. Juni 13
https://github.com/creationix/step
STEP
Donnerstag, 27. Juni 13
https://github.com/creationix/step
STEP
Donnerstag, 27. Juni 13
COMPLEX
EVENT
PROCESSING
Donnerstag, 27. Juni 13
REACTIVE EXTENSIONS
IN
OUT
LOGIK
Donnerstag, 27. Juni 13
ZUSTAND
‣ Array von Events
‣ Event Store
...
{ msg: „bar“ }
{ msg: „foo“ }
{ msg: „driven“ }
{ msg: „event“ }
{ msg: „start“ }0
1
2
3
4
Donnerstag, 27. Juni 13
EVENTS SPEICHERN
Donnerstag, 27. Juni 13
ABFRAGE
Donnerstag, 27. Juni 13
ABFRAGE
pattern matching
Donnerstag, 27. Juni 13
MATCH & FOLD
Donnerstag, 27. Juni 13
MORGEN
Donnerstag, 27. Juni 13
EVENT STORE
Donnerstag, 27. Juni 13
SEDA
Staged Event Driven Architecture
Donnerstag, 27. Juni 13
DANKE
Donnerstag, 27. Juni 13

Contenu connexe

En vedette

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

En vedette (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Event Driven - Node.JS