SlideShare a Scribd company logo
ReactPHP + Symfony = PROFIT
aneb 1000req/s s minimálními nároky na server
1. sraz přátel Symfony v Praze (29.10.2015)
O mně
• Kouzelná Almara
• Skrz.cz
• @jakubkulhan
• jakub.kulhan@gmail.com
• github.com/jakubkulhan
Slovníček
• klik = najedu myší na nabídku a zmáčknu tlačítko
• imprese = podíval jsem se na nabídku

(alespoň polovina nabídky byla ve viewportu
alespoň jednu sekundu)
• CTR (click-through rate) = kliky / imprese
ReactPHP
(neplést s ReactJS!)
http://reactphp.org/
(https://github.com/jakubkulhan/hit-server-bench)
ReactPHP: req, res → λ
Symfony: req → λ → res
❓
req → λ → promise[res]
❗
github.com/jakubkulhan/
reactphp-symfony
Boot
$kernel = new AppKernel(
$environment = $input->getOption("environment"),
$environment !== "prod"
);
$kernel->boot();
$loop = Factory::create();
/** @var Container $container */
$container = $kernel->getContainer();
$container->set("react.loop", $loop);
$socket = new Socket($loop);
$http = new Server($socket);
$http->on("request", function (
Request $request,
Response $response
) use ($kernel, $loop) {
// ...
});
$socket->listen(
$port = $input->getOption("port"),
$host = $input->getOption("host")
);
echo "Listening to {$host}:{$port}n";
$loop->run();
ReactPHP → Symfony
$headers = $request->getHeaders();
$cookies = [];
if (isset($headers["Cookie"])) {
foreach ((array)$headers["Cookie"] as $cookieHeader) {
foreach (explode(";", $cookieHeader) as $cookie) {
list($name, $value) = explode("=", trim($cookie), 2);
$cookies[$name] = urldecode($value);
}
}
}
$symfonyRequest = new SymfonyRequest(
$request->getQuery(),
[], // TODO: handle post data
[],
$cookies,
[],
[
"REQUEST_URI" => $request->getPath(),
"SERVER_NAME" => explode(":", $headers["Host"])[0],
"REMOTE_ADDR" => $request->remoteAddress,
"QUERY_STRING" => http_build_query($request->getQuery()),
],
null // TODO: handle post data
);
$symfonyRequest->headers->replace($headers);
$symfonyResponse = $kernel->handle($symfonyRequest);
if ($kernel instanceof TerminableInterface) {
$kernel->terminate($symfonyRequest, $symfonyResponse);
}
Symfony → ReactPHP
if ($symfonyResponse instanceof PromiseInterface) {
$symfonyResponse->then(function (SymfonyResponse $symfonyResponse) use ($response) {
$this->send($response, $symfonyResponse);
}, function ($error) use ($loop, $response) {
echo "Exception: ", (string) $error, "n";
$response->writeHead(500, ["Content-Type" => "text/plain"]);
$response->end("500 Internal Server Error");
$loop->stop();
});
} elseif ($symfonyResponse instanceof SymfonyResponse) {
$this->send($response, $symfonyResponse);
} else {
echo "Unsupported response type: ", get_class($symfonyResponse), "n";
$response->writeHead(500, ["Content-Type" => "text/plain"]);
$response->end("500 Internal Server Error");
$loop->stop();
}
Symfony → ReactPHP (2)
private function send(Response $res, SymfonyResponse $symfonyResponse)
{
$headers = $symfonyResponse->headers->allPreserveCase();
$headers["X-Powered-By"] = "Love";
$cookies = $symfonyResponse->headers->getCookies();
if (count($cookies)) {
$headers["Set-Cookie"] = [];
foreach ($symfonyResponse->headers->getCookies() as $cookie) {
$headers["Set-Cookie"][] = (string)$cookie;
}
}
$res->writeHead($symfonyResponse->getStatusCode(), $headers);
$res->end($symfonyResponse->getContent());
}
Controller
/**
* @Controller
*/
class IndexController
{
/**
* @var LoopInterface
*
* @Autowired
*/
public $loop;
public function indexAction(Request $request)
{
return Response::create("Hello, world!n");
}
public function promiseAction(Request $request)
{
$secs = intval($request->attributes->get("secs"));
$deferred = new Deferred();
$this->loop->addTimer($secs, function () use ($secs, $deferred) {
$deferred->resolve(Response::create("{$secs} seconds later...n"));
});
return $deferred->promise();
}
}
Knihovny
• ReactPHP (např. HTTP klient, ZeroMQ)

https://github.com/reactphp
• MySQL

https://github.com/kaja47/async-mysql

https://github.com/KhristenkoYura/react-mysql

https://github.com/bixuehujin/reactphp-mysql
• Redis

https://github.com/nrk/predis-async
• RabbitMQ

https://github.com/jakubkulhan/bunny
Díky!
Otázky?

More Related Content

What's hot

Functional php
Functional phpFunctional php
Functional php
Jean Carlo Machado
 
KubeCon EU 2016: Custom Volume Plugins
KubeCon EU 2016: Custom Volume PluginsKubeCon EU 2016: Custom Volume Plugins
KubeCon EU 2016: Custom Volume Plugins
KubeAcademy
 
Git avançado
Git avançadoGit avançado
Git avançado
Jean Carlo Machado
 
Javascript ES6 generators
Javascript ES6 generatorsJavascript ES6 generators
Javascript ES6 generators
Ramesh Nair
 
node ffi
node ffinode ffi
node ffi
偉格 高
 
Trading with opensource tools, two years later
Trading with opensource tools, two years laterTrading with opensource tools, two years later
Trading with opensource tools, two years laterclkao
 
ZeroMQ Is The Answer: DPC 11 Version
ZeroMQ Is The Answer: DPC 11 VersionZeroMQ Is The Answer: DPC 11 Version
ZeroMQ Is The Answer: DPC 11 Version
Ian Barber
 
用Tornado开发RESTful API运用
用Tornado开发RESTful API运用用Tornado开发RESTful API运用
用Tornado开发RESTful API运用Felinx Lee
 
Python Coroutines, Present and Future
Python Coroutines, Present and FuturePython Coroutines, Present and Future
Python Coroutines, Present and Future
emptysquare
 
Call stack, event loop and async programming
Call stack, event loop and async programmingCall stack, event loop and async programming
Call stack, event loop and async programming
Masters Academy
 
AnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time webAnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time webclkao
 
ZeroMQ: Messaging Made Simple
ZeroMQ: Messaging Made SimpleZeroMQ: Messaging Made Simple
ZeroMQ: Messaging Made Simple
Ian Barber
 
ZeroMQ Is The Answer
ZeroMQ Is The AnswerZeroMQ Is The Answer
ZeroMQ Is The Answer
Ian Barber
 
Go初心者がGoでコマンドラインツールの作成に挑戦した話
Go初心者がGoでコマンドラインツールの作成に挑戦した話Go初心者がGoでコマンドラインツールの作成に挑戦した話
Go初心者がGoでコマンドラインツールの作成に挑戦した話
dcubeio
 
ES6 generators
ES6 generatorsES6 generators
ES6 generators
Steven Foote
 
Txjs
TxjsTxjs
Perl: Coro asynchronous
Perl: Coro asynchronous Perl: Coro asynchronous
Perl: Coro asynchronous
Shmuel Fomberg
 
ES2015 (ES6) Overview
ES2015 (ES6) OverviewES2015 (ES6) Overview
ES2015 (ES6) Overview
hesher
 
Consuming Web Services with Swift and Rx
Consuming Web Services with Swift and RxConsuming Web Services with Swift and Rx
Consuming Web Services with Swift and Rx
Guillermo Gonzalez
 

What's hot (20)

Functional php
Functional phpFunctional php
Functional php
 
KubeCon EU 2016: Custom Volume Plugins
KubeCon EU 2016: Custom Volume PluginsKubeCon EU 2016: Custom Volume Plugins
KubeCon EU 2016: Custom Volume Plugins
 
Git avançado
Git avançadoGit avançado
Git avançado
 
Javascript ES6 generators
Javascript ES6 generatorsJavascript ES6 generators
Javascript ES6 generators
 
node ffi
node ffinode ffi
node ffi
 
Trading with opensource tools, two years later
Trading with opensource tools, two years laterTrading with opensource tools, two years later
Trading with opensource tools, two years later
 
ZeroMQ Is The Answer: DPC 11 Version
ZeroMQ Is The Answer: DPC 11 VersionZeroMQ Is The Answer: DPC 11 Version
ZeroMQ Is The Answer: DPC 11 Version
 
用Tornado开发RESTful API运用
用Tornado开发RESTful API运用用Tornado开发RESTful API运用
用Tornado开发RESTful API运用
 
Python Coroutines, Present and Future
Python Coroutines, Present and FuturePython Coroutines, Present and Future
Python Coroutines, Present and Future
 
dotCloud and go
dotCloud and godotCloud and go
dotCloud and go
 
Call stack, event loop and async programming
Call stack, event loop and async programmingCall stack, event loop and async programming
Call stack, event loop and async programming
 
AnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time webAnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time web
 
ZeroMQ: Messaging Made Simple
ZeroMQ: Messaging Made SimpleZeroMQ: Messaging Made Simple
ZeroMQ: Messaging Made Simple
 
ZeroMQ Is The Answer
ZeroMQ Is The AnswerZeroMQ Is The Answer
ZeroMQ Is The Answer
 
Go初心者がGoでコマンドラインツールの作成に挑戦した話
Go初心者がGoでコマンドラインツールの作成に挑戦した話Go初心者がGoでコマンドラインツールの作成に挑戦した話
Go初心者がGoでコマンドラインツールの作成に挑戦した話
 
ES6 generators
ES6 generatorsES6 generators
ES6 generators
 
Txjs
TxjsTxjs
Txjs
 
Perl: Coro asynchronous
Perl: Coro asynchronous Perl: Coro asynchronous
Perl: Coro asynchronous
 
ES2015 (ES6) Overview
ES2015 (ES6) OverviewES2015 (ES6) Overview
ES2015 (ES6) Overview
 
Consuming Web Services with Swift and Rx
Consuming Web Services with Swift and RxConsuming Web Services with Swift and Rx
Consuming Web Services with Swift and Rx
 

Viewers also liked

Digital studieteknikk Dyrløkkeåsen skole 2016
Digital studieteknikk Dyrløkkeåsen skole 2016Digital studieteknikk Dyrløkkeåsen skole 2016
Digital studieteknikk Dyrløkkeåsen skole 2016
Magnus Nohr
 
Biodiversity Heritage Library - an overview for the Australian Museum
Biodiversity Heritage Library - an overview for the Australian MuseumBiodiversity Heritage Library - an overview for the Australian Museum
Biodiversity Heritage Library - an overview for the Australian Museum
Nicole Kearney
 
Planificador de proyectos plantilla
Planificador de proyectos plantillaPlanificador de proyectos plantilla
Planificador de proyectos plantilla
Oscar Ortiz
 
Lectura 03
Lectura 03Lectura 03
Lectura 03
Rossy Camila
 
Section a media theories
Section a   media theoriesSection a   media theories
Section a media theories
Liamcwhite
 
Martin Zeman - Moje první aplikace v Symfony 3 (4. sraz přátel Symfony v Praze)
Martin Zeman - Moje první aplikace v Symfony 3 (4. sraz přátel Symfony v Praze)Martin Zeman - Moje první aplikace v Symfony 3 (4. sraz přátel Symfony v Praze)
Martin Zeman - Moje první aplikace v Symfony 3 (4. sraz přátel Symfony v Praze)
Péhápkaři
 
The Largest E-Cig Company for Smok Ultra Mod
The Largest E-Cig Company for Smok Ultra ModThe Largest E-Cig Company for Smok Ultra Mod
The Largest E-Cig Company for Smok Ultra Mod
vapingman
 
Tomáš Fejfar - Elk - Víc než jen logy (4. sraz přátel Symfony v Praze)
Tomáš Fejfar - Elk - Víc než jen logy (4. sraz přátel Symfony v Praze)Tomáš Fejfar - Elk - Víc než jen logy (4. sraz přátel Symfony v Praze)
Tomáš Fejfar - Elk - Víc než jen logy (4. sraz přátel Symfony v Praze)
Péhápkaři
 
Conteo
ConteoConteo
2 taller civil[1]
2 taller civil[1]2 taller civil[1]
2 taller civil[1]
Punchilupe36
 
Хитрые таргетинги для коммерческих спецпроектов
Хитрые таргетинги для коммерческих спецпроектовХитрые таргетинги для коммерческих спецпроектов
Хитрые таргетинги для коммерческих спецпроектов
Mediaprojects Mail.Ru Group
 
The dynamics of knowledge creation: academics' changing writing practices – i...
The dynamics of knowledge creation: academics' changing writing practices – i...The dynamics of knowledge creation: academics' changing writing practices – i...
The dynamics of knowledge creation: academics' changing writing practices – i...
Queen's University Belfast
 
c'est FACILE ! se nourrir avec les lois de la diététique chinoise...
c'est FACILE ! se nourrir avec les lois de la diététique chinoise...c'est FACILE ! se nourrir avec les lois de la diététique chinoise...
c'est FACILE ! se nourrir avec les lois de la diététique chinoise...
Davy Vittupier
 
Lectura 2 qué es ser persona para el derecho
Lectura 2 qué es ser persona para el derechoLectura 2 qué es ser persona para el derecho
Lectura 2 qué es ser persona para el derecho
Godofredo Lozano
 
Txns_iPhone_Working_Splits
Txns_iPhone_Working_SplitsTxns_iPhone_Working_Splits
Txns_iPhone_Working_SplitsLuke Eastman
 
Garage storage solutions in fort worth tx
Garage storage solutions in fort worth txGarage storage solutions in fort worth tx
Garage storage solutions in fort worth tx
Garaginization Dfw
 
Tomáš Strejček - Velikost týmu vs. monolith a mikroservicy (11. sraz přátel ...
Tomáš Strejček - Velikost týmu vs. monolith a mikroservicy  (11. sraz přátel ...Tomáš Strejček - Velikost týmu vs. monolith a mikroservicy  (11. sraz přátel ...
Tomáš Strejček - Velikost týmu vs. monolith a mikroservicy (11. sraz přátel ...
Péhápkaři
 

Viewers also liked (20)

Depre.jodo
Depre.jodoDepre.jodo
Depre.jodo
 
Digital studieteknikk Dyrløkkeåsen skole 2016
Digital studieteknikk Dyrløkkeåsen skole 2016Digital studieteknikk Dyrløkkeåsen skole 2016
Digital studieteknikk Dyrløkkeåsen skole 2016
 
Biodiversity Heritage Library - an overview for the Australian Museum
Biodiversity Heritage Library - an overview for the Australian MuseumBiodiversity Heritage Library - an overview for the Australian Museum
Biodiversity Heritage Library - an overview for the Australian Museum
 
Planificador de proyectos plantilla
Planificador de proyectos plantillaPlanificador de proyectos plantilla
Planificador de proyectos plantilla
 
Lectura 03
Lectura 03Lectura 03
Lectura 03
 
Section a media theories
Section a   media theoriesSection a   media theories
Section a media theories
 
Martin Zeman - Moje první aplikace v Symfony 3 (4. sraz přátel Symfony v Praze)
Martin Zeman - Moje první aplikace v Symfony 3 (4. sraz přátel Symfony v Praze)Martin Zeman - Moje první aplikace v Symfony 3 (4. sraz přátel Symfony v Praze)
Martin Zeman - Moje první aplikace v Symfony 3 (4. sraz přátel Symfony v Praze)
 
The Largest E-Cig Company for Smok Ultra Mod
The Largest E-Cig Company for Smok Ultra ModThe Largest E-Cig Company for Smok Ultra Mod
The Largest E-Cig Company for Smok Ultra Mod
 
Tomáš Fejfar - Elk - Víc než jen logy (4. sraz přátel Symfony v Praze)
Tomáš Fejfar - Elk - Víc než jen logy (4. sraz přátel Symfony v Praze)Tomáš Fejfar - Elk - Víc než jen logy (4. sraz přátel Symfony v Praze)
Tomáš Fejfar - Elk - Víc než jen logy (4. sraz přátel Symfony v Praze)
 
Conteo
ConteoConteo
Conteo
 
2 taller civil[1]
2 taller civil[1]2 taller civil[1]
2 taller civil[1]
 
Хитрые таргетинги для коммерческих спецпроектов
Хитрые таргетинги для коммерческих спецпроектовХитрые таргетинги для коммерческих спецпроектов
Хитрые таргетинги для коммерческих спецпроектов
 
Plan de gestión del conocimiento
Plan de gestión del conocimientoPlan de gestión del conocimiento
Plan de gestión del conocimiento
 
The dynamics of knowledge creation: academics' changing writing practices – i...
The dynamics of knowledge creation: academics' changing writing practices – i...The dynamics of knowledge creation: academics' changing writing practices – i...
The dynamics of knowledge creation: academics' changing writing practices – i...
 
c'est FACILE ! se nourrir avec les lois de la diététique chinoise...
c'est FACILE ! se nourrir avec les lois de la diététique chinoise...c'est FACILE ! se nourrir avec les lois de la diététique chinoise...
c'est FACILE ! se nourrir avec les lois de la diététique chinoise...
 
Lectura 2 qué es ser persona para el derecho
Lectura 2 qué es ser persona para el derechoLectura 2 qué es ser persona para el derecho
Lectura 2 qué es ser persona para el derecho
 
Txns_iPhone_Working_Splits
Txns_iPhone_Working_SplitsTxns_iPhone_Working_Splits
Txns_iPhone_Working_Splits
 
Garage storage solutions in fort worth tx
Garage storage solutions in fort worth txGarage storage solutions in fort worth tx
Garage storage solutions in fort worth tx
 
Tomáš Strejček - Velikost týmu vs. monolith a mikroservicy (11. sraz přátel ...
Tomáš Strejček - Velikost týmu vs. monolith a mikroservicy  (11. sraz přátel ...Tomáš Strejček - Velikost týmu vs. monolith a mikroservicy  (11. sraz přátel ...
Tomáš Strejček - Velikost týmu vs. monolith a mikroservicy (11. sraz přátel ...
 
Plan de gestión del conocimiento
Plan de gestión del conocimientoPlan de gestión del conocimiento
Plan de gestión del conocimiento
 

Similar to Jakub Kulhán - ReactPHP + Symfony = PROFIT (1. sraz přátel Symfony v Praze)

Symfony As A Platform (Symfony Camp 2007)
Symfony As A Platform (Symfony Camp 2007)Symfony As A Platform (Symfony Camp 2007)
Symfony As A Platform (Symfony Camp 2007)Fabien Potencier
 
The promise of asynchronous php
The promise of asynchronous phpThe promise of asynchronous php
The promise of asynchronous php
Wim Godden
 
The promise of asynchronous php
The promise of asynchronous phpThe promise of asynchronous php
The promise of asynchronous php
Wim Godden
 
Symfony components in the wild, PHPNW12
Symfony components in the wild, PHPNW12Symfony components in the wild, PHPNW12
Symfony components in the wild, PHPNW12
Jakub Zalas
 
When symfony met promises
When symfony met promises When symfony met promises
When symfony met promises
Marc Morera
 
The symfony platform: Create your very own framework (PHP Quebec 2008)
The symfony platform: Create your very own framework (PHP Quebec 2008)The symfony platform: Create your very own framework (PHP Quebec 2008)
The symfony platform: Create your very own framework (PHP Quebec 2008)Fabien Potencier
 
Forget about index.php and build you applications around HTTP!
Forget about index.php and build you applications around HTTP!Forget about index.php and build you applications around HTTP!
Forget about index.php and build you applications around HTTP!
Kacper Gunia
 
Forget about Index.php and build you applications around HTTP - PHPers Cracow
Forget about Index.php and build you applications around HTTP - PHPers CracowForget about Index.php and build you applications around HTTP - PHPers Cracow
Forget about Index.php and build you applications around HTTP - PHPers Cracow
Kacper Gunia
 
React PHP: the NodeJS challenger
React PHP: the NodeJS challengerReact PHP: the NodeJS challenger
React PHP: the NodeJS challenger
vanphp
 
The promise of asynchronous PHP
The promise of asynchronous PHPThe promise of asynchronous PHP
The promise of asynchronous PHP
Wim Godden
 
Symfony 2 (PHP Quebec 2009)
Symfony 2 (PHP Quebec 2009)Symfony 2 (PHP Quebec 2009)
Symfony 2 (PHP Quebec 2009)Fabien Potencier
 
Tobias Nyholm "Deep dive into Symfony 4 internals"
Tobias Nyholm "Deep dive into Symfony 4 internals"Tobias Nyholm "Deep dive into Symfony 4 internals"
Tobias Nyholm "Deep dive into Symfony 4 internals"
Fwdays
 
Kansai.pm 10周年記念 Plack/PSGI 入門
Kansai.pm 10周年記念 Plack/PSGI 入門Kansai.pm 10周年記念 Plack/PSGI 入門
Kansai.pm 10周年記念 Plack/PSGI 入門lestrrat
 
The promise of asynchronous PHP
The promise of asynchronous PHPThe promise of asynchronous PHP
The promise of asynchronous PHP
Wim Godden
 
How to build a High Performance PSGI/Plack Server
How to build a High Performance PSGI/Plack Server How to build a High Performance PSGI/Plack Server
How to build a High Performance PSGI/Plack Server
Masahiro Nagano
 
関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい
Hisateru Tanaka
 
Mojo as a_client
Mojo as a_clientMojo as a_client
Mojo as a_client
Marcus Ramberg
 
優しいWAFの作り方
優しいWAFの作り方優しいWAFの作り方
優しいWAFの作り方techmemo
 
symfony on action - WebTech 207
symfony on action - WebTech 207symfony on action - WebTech 207
symfony on action - WebTech 207patter
 

Similar to Jakub Kulhán - ReactPHP + Symfony = PROFIT (1. sraz přátel Symfony v Praze) (20)

Symfony As A Platform (Symfony Camp 2007)
Symfony As A Platform (Symfony Camp 2007)Symfony As A Platform (Symfony Camp 2007)
Symfony As A Platform (Symfony Camp 2007)
 
The promise of asynchronous php
The promise of asynchronous phpThe promise of asynchronous php
The promise of asynchronous php
 
The promise of asynchronous php
The promise of asynchronous phpThe promise of asynchronous php
The promise of asynchronous php
 
Symfony components in the wild, PHPNW12
Symfony components in the wild, PHPNW12Symfony components in the wild, PHPNW12
Symfony components in the wild, PHPNW12
 
When symfony met promises
When symfony met promises When symfony met promises
When symfony met promises
 
The symfony platform: Create your very own framework (PHP Quebec 2008)
The symfony platform: Create your very own framework (PHP Quebec 2008)The symfony platform: Create your very own framework (PHP Quebec 2008)
The symfony platform: Create your very own framework (PHP Quebec 2008)
 
Forget about index.php and build you applications around HTTP!
Forget about index.php and build you applications around HTTP!Forget about index.php and build you applications around HTTP!
Forget about index.php and build you applications around HTTP!
 
Forget about Index.php and build you applications around HTTP - PHPers Cracow
Forget about Index.php and build you applications around HTTP - PHPers CracowForget about Index.php and build you applications around HTTP - PHPers Cracow
Forget about Index.php and build you applications around HTTP - PHPers Cracow
 
React PHP: the NodeJS challenger
React PHP: the NodeJS challengerReact PHP: the NodeJS challenger
React PHP: the NodeJS challenger
 
The promise of asynchronous PHP
The promise of asynchronous PHPThe promise of asynchronous PHP
The promise of asynchronous PHP
 
Symfony 2 (PHP Quebec 2009)
Symfony 2 (PHP Quebec 2009)Symfony 2 (PHP Quebec 2009)
Symfony 2 (PHP Quebec 2009)
 
Tobias Nyholm "Deep dive into Symfony 4 internals"
Tobias Nyholm "Deep dive into Symfony 4 internals"Tobias Nyholm "Deep dive into Symfony 4 internals"
Tobias Nyholm "Deep dive into Symfony 4 internals"
 
Kansai.pm 10周年記念 Plack/PSGI 入門
Kansai.pm 10周年記念 Plack/PSGI 入門Kansai.pm 10周年記念 Plack/PSGI 入門
Kansai.pm 10周年記念 Plack/PSGI 入門
 
The promise of asynchronous PHP
The promise of asynchronous PHPThe promise of asynchronous PHP
The promise of asynchronous PHP
 
How to build a High Performance PSGI/Plack Server
How to build a High Performance PSGI/Plack Server How to build a High Performance PSGI/Plack Server
How to build a High Performance PSGI/Plack Server
 
関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい
 
Plack - LPW 2009
Plack - LPW 2009Plack - LPW 2009
Plack - LPW 2009
 
Mojo as a_client
Mojo as a_clientMojo as a_client
Mojo as a_client
 
優しいWAFの作り方
優しいWAFの作り方優しいWAFの作り方
優しいWAFの作り方
 
symfony on action - WebTech 207
symfony on action - WebTech 207symfony on action - WebTech 207
symfony on action - WebTech 207
 

More from Péhápkaři

Startup vs korporace vs Previo
Startup vs korporace vs PrevioStartup vs korporace vs Previo
Startup vs korporace vs Previo
Péhápkaři
 
RabbitMQ a ElasticSearch v Previu
RabbitMQ a ElasticSearch v PreviuRabbitMQ a ElasticSearch v Previu
RabbitMQ a ElasticSearch v Previu
Péhápkaři
 
Martin Froněk - Jak využít soft skills ve svůj prospěch 2 (15. sraz přátel PH...
Martin Froněk - Jak využít soft skills ve svůj prospěch 2 (15. sraz přátel PH...Martin Froněk - Jak využít soft skills ve svůj prospěch 2 (15. sraz přátel PH...
Martin Froněk - Jak využít soft skills ve svůj prospěch 2 (15. sraz přátel PH...
Péhápkaři
 
Čtvrtkon #53 - Štěpán Zikmund
Čtvrtkon #53 - Štěpán ZikmundČtvrtkon #53 - Štěpán Zikmund
Čtvrtkon #53 - Štěpán Zikmund
Péhápkaři
 
Václav Makeš - Infrastructure as code - Jak nahazovat stroje a nic moc nevědě...
Václav Makeš - Infrastructure as code - Jak nahazovat stroje a nic moc nevědě...Václav Makeš - Infrastructure as code - Jak nahazovat stroje a nic moc nevědě...
Václav Makeš - Infrastructure as code - Jak nahazovat stroje a nic moc nevědě...
Péhápkaři
 
Tomáš Klíma - Implementace BitCoinut v praxi (13. sraz přátel PHP v Praze)
Tomáš Klíma - Implementace BitCoinut v praxi (13. sraz přátel PHP v Praze)Tomáš Klíma - Implementace BitCoinut v praxi (13. sraz přátel PHP v Praze)
Tomáš Klíma - Implementace BitCoinut v praxi (13. sraz přátel PHP v Praze)
Péhápkaři
 
PHP Evening #1 - Automatizace [Jan Klat]
PHP Evening #1 - Automatizace [Jan Klat]PHP Evening #1 - Automatizace [Jan Klat]
PHP Evening #1 - Automatizace [Jan Klat]
Péhápkaři
 
PHP Evening #1 - Propel ORM [Martin Sojka]
PHP Evening #1 - Propel ORM [Martin Sojka]PHP Evening #1 - Propel ORM [Martin Sojka]
PHP Evening #1 - Propel ORM [Martin Sojka]
Péhápkaři
 
Tomáš Kazatel - Jsme přece vývojáři, ne textaři (12. sraz přátel PHP v P...
Tomáš Kazatel - Jsme přece vývojáři, ne textaři (12. sraz přátel PHP v P...Tomáš Kazatel - Jsme přece vývojáři, ne textaři (12. sraz přátel PHP v P...
Tomáš Kazatel - Jsme přece vývojáři, ne textaři (12. sraz přátel PHP v P...
Péhápkaři
 
Jakub Kratina - Když si dva vývojáři založí s.r.o. (12. sraz přátel PHP v Pra...
Jakub Kratina - Když si dva vývojáři založí s.r.o. (12. sraz přátel PHP v Pra...Jakub Kratina - Když si dva vývojáři založí s.r.o. (12. sraz přátel PHP v Pra...
Jakub Kratina - Když si dva vývojáři založí s.r.o. (12. sraz přátel PHP v Pra...
Péhápkaři
 
Petr Pavel - Co musí programátor umět kromě programování (12. sraz přátel PHP...
Petr Pavel - Co musí programátor umět kromě programování (12. sraz přátel PHP...Petr Pavel - Co musí programátor umět kromě programování (12. sraz přátel PHP...
Petr Pavel - Co musí programátor umět kromě programování (12. sraz přátel PHP...
Péhápkaři
 
Jindřich Kubát - Microservice – Post Monolith Architecture (11. sraz přátel P...
Jindřich Kubát - Microservice – Post Monolith Architecture (11. sraz přátel P...Jindřich Kubát - Microservice – Post Monolith Architecture (11. sraz přátel P...
Jindřich Kubát - Microservice – Post Monolith Architecture (11. sraz přátel P...
Péhápkaři
 
Jakub Kratina - Jak testovat aplikace s radostí díky Codeception (11. sraz př...
Jakub Kratina - Jak testovat aplikace s radostí díky Codeception (11. sraz př...Jakub Kratina - Jak testovat aplikace s radostí díky Codeception (11. sraz př...
Jakub Kratina - Jak testovat aplikace s radostí díky Codeception (11. sraz př...
Péhápkaři
 
Ako nespáliť server - Monit [Jozef Lami] (7. sraz, Praha)
Ako nespáliť server - Monit [Jozef Lami] (7. sraz, Praha)Ako nespáliť server - Monit [Jozef Lami] (7. sraz, Praha)
Ako nespáliť server - Monit [Jozef Lami] (7. sraz, Praha)
Péhápkaři
 
Doctrine - Co dělat když entity nestačí [Filip Procházka] (7. sraz, Praha)
Doctrine - Co dělat když entity nestačí [Filip Procházka] (7. sraz, Praha)Doctrine - Co dělat když entity nestačí [Filip Procházka] (7. sraz, Praha)
Doctrine - Co dělat když entity nestačí [Filip Procházka] (7. sraz, Praha)
Péhápkaři
 
Blackfire.io - Fire up your php app performance [Jan Kopp] (7. sraz, Praha)
Blackfire.io - Fire up your php app performance [Jan Kopp] (7. sraz, Praha)Blackfire.io - Fire up your php app performance [Jan Kopp] (7. sraz, Praha)
Blackfire.io - Fire up your php app performance [Jan Kopp] (7. sraz, Praha)
Péhápkaři
 
Automatizace jednoduše [Martin Zeman] (6. sraz, Praha, 31.3.2016)
Automatizace jednoduše [Martin Zeman] (6. sraz, Praha, 31.3.2016)Automatizace jednoduše [Martin Zeman] (6. sraz, Praha, 31.3.2016)
Automatizace jednoduše [Martin Zeman] (6. sraz, Praha, 31.3.2016)
Péhápkaři
 
MicroKernel aneb spatny nazev pro Helper (5. sraz pratel Symfony)
MicroKernel aneb spatny nazev pro Helper (5. sraz pratel Symfony)MicroKernel aneb spatny nazev pro Helper (5. sraz pratel Symfony)
MicroKernel aneb spatny nazev pro Helper (5. sraz pratel Symfony)
Péhápkaři
 
Petr Nikolas Prokop - Symfony framework (0. sraz přátel Symfony v Hradci Král...
Petr Nikolas Prokop - Symfony framework (0. sraz přátel Symfony v Hradci Král...Petr Nikolas Prokop - Symfony framework (0. sraz přátel Symfony v Hradci Král...
Petr Nikolas Prokop - Symfony framework (0. sraz přátel Symfony v Hradci Král...
Péhápkaři
 
Karel Škopek - WordPress + Laravel = <3 (4. sraz přátel Symfony v Praze)
Karel Škopek - WordPress + Laravel = <3 (4. sraz přátel Symfony v Praze)Karel Škopek - WordPress + Laravel = <3 (4. sraz přátel Symfony v Praze)
Karel Škopek - WordPress + Laravel = <3 (4. sraz přátel Symfony v Praze)
Péhápkaři
 

More from Péhápkaři (20)

Startup vs korporace vs Previo
Startup vs korporace vs PrevioStartup vs korporace vs Previo
Startup vs korporace vs Previo
 
RabbitMQ a ElasticSearch v Previu
RabbitMQ a ElasticSearch v PreviuRabbitMQ a ElasticSearch v Previu
RabbitMQ a ElasticSearch v Previu
 
Martin Froněk - Jak využít soft skills ve svůj prospěch 2 (15. sraz přátel PH...
Martin Froněk - Jak využít soft skills ve svůj prospěch 2 (15. sraz přátel PH...Martin Froněk - Jak využít soft skills ve svůj prospěch 2 (15. sraz přátel PH...
Martin Froněk - Jak využít soft skills ve svůj prospěch 2 (15. sraz přátel PH...
 
Čtvrtkon #53 - Štěpán Zikmund
Čtvrtkon #53 - Štěpán ZikmundČtvrtkon #53 - Štěpán Zikmund
Čtvrtkon #53 - Štěpán Zikmund
 
Václav Makeš - Infrastructure as code - Jak nahazovat stroje a nic moc nevědě...
Václav Makeš - Infrastructure as code - Jak nahazovat stroje a nic moc nevědě...Václav Makeš - Infrastructure as code - Jak nahazovat stroje a nic moc nevědě...
Václav Makeš - Infrastructure as code - Jak nahazovat stroje a nic moc nevědě...
 
Tomáš Klíma - Implementace BitCoinut v praxi (13. sraz přátel PHP v Praze)
Tomáš Klíma - Implementace BitCoinut v praxi (13. sraz přátel PHP v Praze)Tomáš Klíma - Implementace BitCoinut v praxi (13. sraz přátel PHP v Praze)
Tomáš Klíma - Implementace BitCoinut v praxi (13. sraz přátel PHP v Praze)
 
PHP Evening #1 - Automatizace [Jan Klat]
PHP Evening #1 - Automatizace [Jan Klat]PHP Evening #1 - Automatizace [Jan Klat]
PHP Evening #1 - Automatizace [Jan Klat]
 
PHP Evening #1 - Propel ORM [Martin Sojka]
PHP Evening #1 - Propel ORM [Martin Sojka]PHP Evening #1 - Propel ORM [Martin Sojka]
PHP Evening #1 - Propel ORM [Martin Sojka]
 
Tomáš Kazatel - Jsme přece vývojáři, ne textaři (12. sraz přátel PHP v P...
Tomáš Kazatel - Jsme přece vývojáři, ne textaři (12. sraz přátel PHP v P...Tomáš Kazatel - Jsme přece vývojáři, ne textaři (12. sraz přátel PHP v P...
Tomáš Kazatel - Jsme přece vývojáři, ne textaři (12. sraz přátel PHP v P...
 
Jakub Kratina - Když si dva vývojáři založí s.r.o. (12. sraz přátel PHP v Pra...
Jakub Kratina - Když si dva vývojáři založí s.r.o. (12. sraz přátel PHP v Pra...Jakub Kratina - Když si dva vývojáři založí s.r.o. (12. sraz přátel PHP v Pra...
Jakub Kratina - Když si dva vývojáři založí s.r.o. (12. sraz přátel PHP v Pra...
 
Petr Pavel - Co musí programátor umět kromě programování (12. sraz přátel PHP...
Petr Pavel - Co musí programátor umět kromě programování (12. sraz přátel PHP...Petr Pavel - Co musí programátor umět kromě programování (12. sraz přátel PHP...
Petr Pavel - Co musí programátor umět kromě programování (12. sraz přátel PHP...
 
Jindřich Kubát - Microservice – Post Monolith Architecture (11. sraz přátel P...
Jindřich Kubát - Microservice – Post Monolith Architecture (11. sraz přátel P...Jindřich Kubát - Microservice – Post Monolith Architecture (11. sraz přátel P...
Jindřich Kubát - Microservice – Post Monolith Architecture (11. sraz přátel P...
 
Jakub Kratina - Jak testovat aplikace s radostí díky Codeception (11. sraz př...
Jakub Kratina - Jak testovat aplikace s radostí díky Codeception (11. sraz př...Jakub Kratina - Jak testovat aplikace s radostí díky Codeception (11. sraz př...
Jakub Kratina - Jak testovat aplikace s radostí díky Codeception (11. sraz př...
 
Ako nespáliť server - Monit [Jozef Lami] (7. sraz, Praha)
Ako nespáliť server - Monit [Jozef Lami] (7. sraz, Praha)Ako nespáliť server - Monit [Jozef Lami] (7. sraz, Praha)
Ako nespáliť server - Monit [Jozef Lami] (7. sraz, Praha)
 
Doctrine - Co dělat když entity nestačí [Filip Procházka] (7. sraz, Praha)
Doctrine - Co dělat když entity nestačí [Filip Procházka] (7. sraz, Praha)Doctrine - Co dělat když entity nestačí [Filip Procházka] (7. sraz, Praha)
Doctrine - Co dělat když entity nestačí [Filip Procházka] (7. sraz, Praha)
 
Blackfire.io - Fire up your php app performance [Jan Kopp] (7. sraz, Praha)
Blackfire.io - Fire up your php app performance [Jan Kopp] (7. sraz, Praha)Blackfire.io - Fire up your php app performance [Jan Kopp] (7. sraz, Praha)
Blackfire.io - Fire up your php app performance [Jan Kopp] (7. sraz, Praha)
 
Automatizace jednoduše [Martin Zeman] (6. sraz, Praha, 31.3.2016)
Automatizace jednoduše [Martin Zeman] (6. sraz, Praha, 31.3.2016)Automatizace jednoduše [Martin Zeman] (6. sraz, Praha, 31.3.2016)
Automatizace jednoduše [Martin Zeman] (6. sraz, Praha, 31.3.2016)
 
MicroKernel aneb spatny nazev pro Helper (5. sraz pratel Symfony)
MicroKernel aneb spatny nazev pro Helper (5. sraz pratel Symfony)MicroKernel aneb spatny nazev pro Helper (5. sraz pratel Symfony)
MicroKernel aneb spatny nazev pro Helper (5. sraz pratel Symfony)
 
Petr Nikolas Prokop - Symfony framework (0. sraz přátel Symfony v Hradci Král...
Petr Nikolas Prokop - Symfony framework (0. sraz přátel Symfony v Hradci Král...Petr Nikolas Prokop - Symfony framework (0. sraz přátel Symfony v Hradci Král...
Petr Nikolas Prokop - Symfony framework (0. sraz přátel Symfony v Hradci Král...
 
Karel Škopek - WordPress + Laravel = <3 (4. sraz přátel Symfony v Praze)
Karel Škopek - WordPress + Laravel = <3 (4. sraz přátel Symfony v Praze)Karel Škopek - WordPress + Laravel = <3 (4. sraz přátel Symfony v Praze)
Karel Škopek - WordPress + Laravel = <3 (4. sraz přátel Symfony v Praze)
 

Recently uploaded

openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
AI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website CreatorAI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website Creator
Google
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
Roshan Dwivedi
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 

Recently uploaded (20)

openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
AI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website CreatorAI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website Creator
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 

Jakub Kulhán - ReactPHP + Symfony = PROFIT (1. sraz přátel Symfony v Praze)

  • 1. ReactPHP + Symfony = PROFIT aneb 1000req/s s minimálními nároky na server 1. sraz přátel Symfony v Praze (29.10.2015)
  • 2. O mně • Kouzelná Almara • Skrz.cz • @jakubkulhan • jakub.kulhan@gmail.com • github.com/jakubkulhan
  • 3. Slovníček • klik = najedu myší na nabídku a zmáčknu tlačítko • imprese = podíval jsem se na nabídku
 (alespoň polovina nabídky byla ve viewportu alespoň jednu sekundu) • CTR (click-through rate) = kliky / imprese
  • 4.
  • 5.
  • 7. ReactPHP: req, res → λ Symfony: req → λ → res ❓
  • 8. req → λ → promise[res] ❗
  • 10. Boot $kernel = new AppKernel( $environment = $input->getOption("environment"), $environment !== "prod" ); $kernel->boot(); $loop = Factory::create(); /** @var Container $container */ $container = $kernel->getContainer(); $container->set("react.loop", $loop); $socket = new Socket($loop); $http = new Server($socket); $http->on("request", function ( Request $request, Response $response ) use ($kernel, $loop) { // ... }); $socket->listen( $port = $input->getOption("port"), $host = $input->getOption("host") ); echo "Listening to {$host}:{$port}n"; $loop->run();
  • 11. ReactPHP → Symfony $headers = $request->getHeaders(); $cookies = []; if (isset($headers["Cookie"])) { foreach ((array)$headers["Cookie"] as $cookieHeader) { foreach (explode(";", $cookieHeader) as $cookie) { list($name, $value) = explode("=", trim($cookie), 2); $cookies[$name] = urldecode($value); } } } $symfonyRequest = new SymfonyRequest( $request->getQuery(), [], // TODO: handle post data [], $cookies, [], [ "REQUEST_URI" => $request->getPath(), "SERVER_NAME" => explode(":", $headers["Host"])[0], "REMOTE_ADDR" => $request->remoteAddress, "QUERY_STRING" => http_build_query($request->getQuery()), ], null // TODO: handle post data ); $symfonyRequest->headers->replace($headers); $symfonyResponse = $kernel->handle($symfonyRequest); if ($kernel instanceof TerminableInterface) { $kernel->terminate($symfonyRequest, $symfonyResponse); }
  • 12. Symfony → ReactPHP if ($symfonyResponse instanceof PromiseInterface) { $symfonyResponse->then(function (SymfonyResponse $symfonyResponse) use ($response) { $this->send($response, $symfonyResponse); }, function ($error) use ($loop, $response) { echo "Exception: ", (string) $error, "n"; $response->writeHead(500, ["Content-Type" => "text/plain"]); $response->end("500 Internal Server Error"); $loop->stop(); }); } elseif ($symfonyResponse instanceof SymfonyResponse) { $this->send($response, $symfonyResponse); } else { echo "Unsupported response type: ", get_class($symfonyResponse), "n"; $response->writeHead(500, ["Content-Type" => "text/plain"]); $response->end("500 Internal Server Error"); $loop->stop(); }
  • 13. Symfony → ReactPHP (2) private function send(Response $res, SymfonyResponse $symfonyResponse) { $headers = $symfonyResponse->headers->allPreserveCase(); $headers["X-Powered-By"] = "Love"; $cookies = $symfonyResponse->headers->getCookies(); if (count($cookies)) { $headers["Set-Cookie"] = []; foreach ($symfonyResponse->headers->getCookies() as $cookie) { $headers["Set-Cookie"][] = (string)$cookie; } } $res->writeHead($symfonyResponse->getStatusCode(), $headers); $res->end($symfonyResponse->getContent()); }
  • 14. Controller /** * @Controller */ class IndexController { /** * @var LoopInterface * * @Autowired */ public $loop; public function indexAction(Request $request) { return Response::create("Hello, world!n"); } public function promiseAction(Request $request) { $secs = intval($request->attributes->get("secs")); $deferred = new Deferred(); $this->loop->addTimer($secs, function () use ($secs, $deferred) { $deferred->resolve(Response::create("{$secs} seconds later...n")); }); return $deferred->promise(); } }
  • 15. Knihovny • ReactPHP (např. HTTP klient, ZeroMQ)
 https://github.com/reactphp • MySQL
 https://github.com/kaja47/async-mysql
 https://github.com/KhristenkoYura/react-mysql
 https://github.com/bixuehujin/reactphp-mysql • Redis
 https://github.com/nrk/predis-async • RabbitMQ
 https://github.com/jakubkulhan/bunny