Mobile’s Design Home team • Playing with PHP since 2000. • Worked for a diverse group of companies in China and US, including eBay, Visa and Glu • Focus on building high performance, secure web services • Born in China, worked in U.S., live in Canada • On twitter: @deminy • On Github: https://github.com/deminy 2
more. • Connection pool. • Build high performance, concurrent HTTP, WebSocket, TCP, UDP, Unix socket services. What Is Swoole: Enrich PHP with Some Amazing Features
Swoole 4: Asynchronous Programming with Coroutines • Top Swoole Use Cases • History of Swoole, and What's New in Swoole 4 • The Future of Swoole • Q & A
Connection pool. • Extra operations when using PDO: • Message sent to MySQL server to deallocate the prepared statement when destroying a PDOStatement object. • Message sent to MySQL server to close the MySQL connection when destroying a PDO object. • ……
Swoole 4: Asynchronous Programming with Coroutines • Top Swoole Use Cases • History of Swoole, and What's New in Swoole 4 • The Future of Swoole • Q & A
paused when IO happens, and resumed after IO finishes. • PHP code still executed in sequential manner. • No new processes or threads created. Low costs on “scheduling”. • No locks needed when updating shared resources from different coroutines. • High concurrency. • Easier to use, especially when comparing to asynchronous callbacks.
successful until memory exhausted. chan::push() Blocks if running out of allocated space. pop() SplQueue>pop() Throws an exception when the queue is empty. chan::pop() Blocks if no data available.
Swoole 4: Asynchronous Programming with Coroutines • Top Swoole Use Cases • History of Swoole, and What's New in Swoole 4 • The Future of Swoole • Q & A
Swoole 4: Asynchronous Programming with Coroutines • Top Swoole Use Cases • History of Swoole, and What's New in Swoole 4 • The Future of Swoole • Q & A
for the Swoole ecosystem, with more supports to the open source community: • SDLC process improvements. • Improved documentation. • Lots of refactors. • More components like ZooKeeper, Kafka, Hadoop, HBase, etcd, grpc, AMQP, MQTT, etc.
Swoole 4: Asynchronous Programming with Coroutines • Top Swoole Use Cases • History of Swoole, and What's New in Swoole 4 • The Future of Swoole • Q & A