SlideShare une entreprise Scribd logo
HYPERLOOP
EVENTLOOP
C10K PROBLEM
2
3
FONCTIONNEMENT SERVEUR WEB
1. ACCEPTER LA CONNEXION ENTRANTE DU CLIENT ET CRÉER
LA SOCKET ASSOCIÉE ;
2. LIRE LA REQUÊTE ET L'ENTÊTE HTTP ;
3. RECHERCHER LE FICHIER DEMANDÉ DANS LE SYSTÈME DE
FICHIERS AVEC CONTRÔLE DES DROITS DE LECTURE ;
4. TRANSMETTRE L'ENTÊTE DE RÉPONSE SUR LA SOCKET CLIENT ;
5. LIRE LE FICHIER ;
6. ET TRANSMETTRE SON CONTENU SUR LA SOCKET OUVERTE.
4
FONCTIONNEMENT SERVEUR WEB
1. ACCEPTER LA CONNEXION ENTRANTE DU CLIENT ET CRÉER
LA SOCKET ASSOCIÉE ;
2. LIRE LA REQUÊTE ET L'ENTÊTE HTTP ;
3. RECHERCHER LE FICHIER DEMANDÉ DANS LE SYSTÈME DE
FICHIERS AVEC CONTRÔLE DES DROITS DE LECTURE ;
4. TRANSMETTRE L'ENTÊTE DE RÉPONSE SUR LA SOCKET CLIENT ;
5. LIRE LE FICHIER ;
6. ET TRANSMETTRE SON CONTENU SUR LA SOCKET OUVERTE.
PROBLÈME : CHAQUE ÉTAPE PEUT ÊTRE BLOQUANTE
5
POURQUOI EST-CE UN PROBLÈME ?
FONCTIONNEMENT CLASSIQUE
1 REQUÊTE = 1 THREAD
6
POURQUOI EST-CE UN PROBLÈME ?
LES I/O BLOQUENT
LES THREADS !
LES THREADS NE SONT
PAS ILLIMITÉS !
(OU SI, MAIS C’EST PIRE…)
7
EXEMPLE
SOLUTION ?
+ DE CPU
+ DE RAM
8
9
ANALOGIE
SOLUTION :
EVENT DRIVEN
ARCHITECTURE
10
11
1. 1 SEUL THREAD (EVENTLOOP) !
2. DES I/O NON BLOQUANTES
C’EST QUOI ?
12
C’EST QUOI ?
13
C’EST QUOI ?
SOLUTIONS
TECHNIQUES
14
15
SOLUTIONS TECHNIQUES
PHP ?
Java, JavaScript, Groovy, Ruby, Ceylon, Scala, Kotlin
ET PHP ?

16
17
C’EST… FAISABLE….
Il paraît même qu’il existe des connecteurs Symfony… voir Drupal… (est-ce bien raisonnable)
18
PERFORMANCE ?
DOMMAGE COLLATÉRAL :
LES MICRO-SERVICES
19
20
MICRO-SERVICES
QU’EST-CE QU’UNE ARCHITECTURE MICRO-SERVICE ?
D’APRÈS MARTIN FOWLER :
“ […] L’APPROCHE MICRO-SERVICE EST UN STYLE D’ARCHITECTURE
DANS LEQUEL UNE APPLICATION EST DÉVELOPPÉE SOUS LA FORME DE
MULTIPLES SERVICES DE PETITE TAILLE, CHACUN TOURNANT DANS SON
PROPRE PROCESSUS ET COMMUNIQUANT SELON DES PROTOCOLES
LÉGERS […] ”
21
EVOLUTION DES ARCHIS WEB
22
OBJECTIFS
• AUGMENTER LA SCALABILITÉ
• AUGMENTER LA RÉUTILISABILITÉ
• FACILITER LES TESTS
• RÉDUIRE L’EFFET BOITE NOIRE
• RÉDUIRE LA DETTE TECHNIQUE
• CRÉER DES FEATURE TEAMS
• ETC…
Q&A
23

Contenu connexe

Similaire à Event loop

Intellicore Tech Talk 10 - Apache Web Server Internals
Intellicore Tech Talk 10 - Apache Web Server InternalsIntellicore Tech Talk 10 - Apache Web Server Internals
Intellicore Tech Talk 10 - Apache Web Server InternalsNeil Armstrong
 
La sécurité sur le web
La sécurité sur le webLa sécurité sur le web
La sécurité sur le webSofteam agency
 
Demystification de Spring Une histoire de Pattern.pptx
Demystification de Spring Une histoire de Pattern.pptxDemystification de Spring Une histoire de Pattern.pptx
Demystification de Spring Une histoire de Pattern.pptxletourneur2
 
Démo Gatling au Performance User Group de Casablanca - 25 sept 2014
Démo Gatling au Performance User Group de Casablanca - 25 sept 2014Démo Gatling au Performance User Group de Casablanca - 25 sept 2014
Démo Gatling au Performance User Group de Casablanca - 25 sept 2014Benoît de CHATEAUVIEUX
 
Typescript + Graphql = <3
Typescript + Graphql = <3Typescript + Graphql = <3
Typescript + Graphql = <3felixbillon
 
Industrialiser le contrat dans un projet PHP
Industrialiser le contrat dans un projet PHPIndustrialiser le contrat dans un projet PHP
Industrialiser le contrat dans un projet PHPhalleck45
 
Présentation de WAMP.ws, le protocole pour faire du PUB/SUB et RPC over Webso...
Présentation de WAMP.ws, le protocole pour faire du PUB/SUB et RPC over Webso...Présentation de WAMP.ws, le protocole pour faire du PUB/SUB et RPC over Webso...
Présentation de WAMP.ws, le protocole pour faire du PUB/SUB et RPC over Webso...sametmax
 
Ou sont mes beans, contrats et workflows ? WOA et REST: Un changement de ment...
Ou sont mes beans, contrats et workflows ? WOA et REST: Un changement de ment...Ou sont mes beans, contrats et workflows ? WOA et REST: Un changement de ment...
Ou sont mes beans, contrats et workflows ? WOA et REST: Un changement de ment...Jean-Laurent de Morlhon
 
[Afterwork Colibee] Supply Chain & Blockchain : comment anticiper la montée e...
[Afterwork Colibee] Supply Chain & Blockchain : comment anticiper la montée e...[Afterwork Colibee] Supply Chain & Blockchain : comment anticiper la montée e...
[Afterwork Colibee] Supply Chain & Blockchain : comment anticiper la montée e...Colibee
 
Cours 2/3 - Architecture Web
Cours 2/3 - Architecture WebCours 2/3 - Architecture Web
Cours 2/3 - Architecture WebAdyax
 
Webcast : Exchange et la répartition de charge
Webcast : Exchange et la répartition de chargeWebcast : Exchange et la répartition de charge
Webcast : Exchange et la répartition de chargeiTProFR
 
Cours services web_fabrice_mourlin
Cours services web_fabrice_mourlinCours services web_fabrice_mourlin
Cours services web_fabrice_mourlinangeeLee
 
Guide du manager kvoip callshop billing
Guide du manager kvoip callshop billingGuide du manager kvoip callshop billing
Guide du manager kvoip callshop billingorock
 
Petit-Déjeuner : L'API ne fait pas le moine : Confessions d'experts sur les m...
Petit-Déjeuner : L'API ne fait pas le moine : Confessions d'experts sur les m...Petit-Déjeuner : L'API ne fait pas le moine : Confessions d'experts sur les m...
Petit-Déjeuner : L'API ne fait pas le moine : Confessions d'experts sur les m...OCTO Technology
 
Slides: SSTIC08 - Advanced CSRF for fun and profit
Slides: SSTIC08 - Advanced CSRF for fun and profitSlides: SSTIC08 - Advanced CSRF for fun and profit
Slides: SSTIC08 - Advanced CSRF for fun and profitManfred Touron
 
XebiCon'16 : WeScale - DNS as a Service, the OpenStack way. Par Pascal Edoua...
XebiCon'16 : WeScale - DNS as a Service, the OpenStack way.  Par Pascal Edoua...XebiCon'16 : WeScale - DNS as a Service, the OpenStack way.  Par Pascal Edoua...
XebiCon'16 : WeScale - DNS as a Service, the OpenStack way. Par Pascal Edoua...Publicis Sapient Engineering
 

Similaire à Event loop (20)

Intellicore Tech Talk 10 - Apache Web Server Internals
Intellicore Tech Talk 10 - Apache Web Server InternalsIntellicore Tech Talk 10 - Apache Web Server Internals
Intellicore Tech Talk 10 - Apache Web Server Internals
 
La sécurité sur le web
La sécurité sur le webLa sécurité sur le web
La sécurité sur le web
 
Demystification de Spring Une histoire de Pattern.pptx
Demystification de Spring Une histoire de Pattern.pptxDemystification de Spring Une histoire de Pattern.pptx
Demystification de Spring Une histoire de Pattern.pptx
 
Démo Gatling au Performance User Group de Casablanca - 25 sept 2014
Démo Gatling au Performance User Group de Casablanca - 25 sept 2014Démo Gatling au Performance User Group de Casablanca - 25 sept 2014
Démo Gatling au Performance User Group de Casablanca - 25 sept 2014
 
Typescript + Graphql = <3
Typescript + Graphql = <3Typescript + Graphql = <3
Typescript + Graphql = <3
 
Industrialiser le contrat dans un projet PHP
Industrialiser le contrat dans un projet PHPIndustrialiser le contrat dans un projet PHP
Industrialiser le contrat dans un projet PHP
 
Présentation de WAMP.ws, le protocole pour faire du PUB/SUB et RPC over Webso...
Présentation de WAMP.ws, le protocole pour faire du PUB/SUB et RPC over Webso...Présentation de WAMP.ws, le protocole pour faire du PUB/SUB et RPC over Webso...
Présentation de WAMP.ws, le protocole pour faire du PUB/SUB et RPC over Webso...
 
Ou sont mes beans, contrats et workflows ? WOA et REST: Un changement de ment...
Ou sont mes beans, contrats et workflows ? WOA et REST: Un changement de ment...Ou sont mes beans, contrats et workflows ? WOA et REST: Un changement de ment...
Ou sont mes beans, contrats et workflows ? WOA et REST: Un changement de ment...
 
[Afterwork Colibee] Supply Chain & Blockchain : comment anticiper la montée e...
[Afterwork Colibee] Supply Chain & Blockchain : comment anticiper la montée e...[Afterwork Colibee] Supply Chain & Blockchain : comment anticiper la montée e...
[Afterwork Colibee] Supply Chain & Blockchain : comment anticiper la montée e...
 
Cours 2/3 - Architecture Web
Cours 2/3 - Architecture WebCours 2/3 - Architecture Web
Cours 2/3 - Architecture Web
 
La Sécurité Sur Le Web
La Sécurité Sur Le WebLa Sécurité Sur Le Web
La Sécurité Sur Le Web
 
XebiConFr 15 - Le challenge des microservices
XebiConFr 15 - Le challenge des microservicesXebiConFr 15 - Le challenge des microservices
XebiConFr 15 - Le challenge des microservices
 
Webcast : Exchange et la répartition de charge
Webcast : Exchange et la répartition de chargeWebcast : Exchange et la répartition de charge
Webcast : Exchange et la répartition de charge
 
Démystifions l'API-culture!
Démystifions l'API-culture!Démystifions l'API-culture!
Démystifions l'API-culture!
 
Cours services web_fabrice_mourlin
Cours services web_fabrice_mourlinCours services web_fabrice_mourlin
Cours services web_fabrice_mourlin
 
Guide du manager kvoip callshop billing
Guide du manager kvoip callshop billingGuide du manager kvoip callshop billing
Guide du manager kvoip callshop billing
 
Réseau MiNET
Réseau MiNETRéseau MiNET
Réseau MiNET
 
Petit-Déjeuner : L'API ne fait pas le moine : Confessions d'experts sur les m...
Petit-Déjeuner : L'API ne fait pas le moine : Confessions d'experts sur les m...Petit-Déjeuner : L'API ne fait pas le moine : Confessions d'experts sur les m...
Petit-Déjeuner : L'API ne fait pas le moine : Confessions d'experts sur les m...
 
Slides: SSTIC08 - Advanced CSRF for fun and profit
Slides: SSTIC08 - Advanced CSRF for fun and profitSlides: SSTIC08 - Advanced CSRF for fun and profit
Slides: SSTIC08 - Advanced CSRF for fun and profit
 
XebiCon'16 : WeScale - DNS as a Service, the OpenStack way. Par Pascal Edoua...
XebiCon'16 : WeScale - DNS as a Service, the OpenStack way.  Par Pascal Edoua...XebiCon'16 : WeScale - DNS as a Service, the OpenStack way.  Par Pascal Edoua...
XebiCon'16 : WeScale - DNS as a Service, the OpenStack way. Par Pascal Edoua...
 

Event loop

Notes de l'éditeur

  1. Découpage en briques métier de plus en plus fines