What you maybe doesn't know yet is about Siler! It is a set of general purpose high-level abstractions aiming an API for declarative programming in PHP. With Siler we can abstract way "hard" parts from popular tools like GraphQL and recently Swoole. And yes, I'm the author, so feel free to file any issues or make any questions about it.Read more
@ PHPLondon at London UKRead more
@ PHP study meetup at Tokyo In JapanRead more
Redis provides the commands for message queue and pubsub:
Messages can be ingested into Redis with Redis Client API. But how to consume and process, broadcast these messages?
These are some examples of processing messages from Redis Queue or Redis PubSub with Swoole and PHP:Read more
Coroutine features are mature in PHP Swoole since version 4.x. Swoole provides the powerful CSP (Communicating sequential processes) programming model with three keywords:
CSP is an alternative concurrent programming model to the actor model in
Akka. It is well known because it is adopted in
Golang. The key concepts of CSP are:
Version used in this article: Swoole 4.2.9 PHP 7.2.9
The design of coroutine in PHP Swoole is similar to the coroutine in Golang:
But there are some differences between the coroutine in PHP Swoole and the coroutine in Golang:Read more
This article introduce how to get started with Swoole without manually compile the Swoole PHP extension.
Docker make it easy for us to try Swoole with only several commands.
Make sure you have installed Docker on your machine and updated the swoole version to be the latest version.Read more