We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Asynchronous PHP In Examples #slideless | Denys Bulakh
Denys Bulakh's talk uses ReactPHP and Swoole to demonstrate asynchronous PHP, implementing a booking system, producer-consumer system, and utilizing promises, channels, coroutines, and event loops to improve performance.
- Denys Bulakh spoke about using asynchronous PHP with ReactPHP and Swoole, a PHP extension for parallel processing.
- ReactPHP proposes using a promise concept for PHP.
- A promise is an object that represents a value that may not be available yet, but will be resolved or rejected.
- In ReactPHP, promises can be used to implement asynchronous processing.
- The speaker introduced a simple dummy booking system as an example.
- He demonstrated how to use promises with ReactPHP to create a booking system that creates a new booking and registers it with a provider.
-
The system uses the
ReactPHP
library to create a promise that can be resolved or rejected, and it uses Swoole to run tasks in parallel. - The speaker also discussed using channels and coroutines with Swoole.
- He showed how to create a producer-consumer system using ReactPHP and Swoole.
- The speaker emphasized the importance of using asynchronous programming to handle concurrent requests and improve performance.
- He also mentioned that promises can be used to implement a pipeline of tasks, with each task waiting for the previous task to complete.
- The speaker also introduced a concept called “event loop” which is used for handling asynchronous tasks.