These promotions will be applied to this item:
Some promotions may be combined; others are not eligible to be combined with other offers. For details, please see the Terms & Conditions associated with these promotions.
Your Memberships and Subscriptions
Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet or computer – no Kindle device required.
Read instantly on your browser with Kindle for Web.
Using your mobile phone camera - scan the code below and download the Kindle app.
Mastering Swoole PHP: Build High Performance Concurrent System with Async and Coroutines Kindle Edition
Introduction
Introducing a new execution model of PHP applications, how Open Swoole works and the pitfalls of new developers coming into the Open Swoole world. This book is also about the general concepts behind building a high concurrency and high-performance web system and how these concepts are implemented in Open Swoole and how advanced PHP works. This book provides just enough Linux OS kernel knowledges with code samples helping you understand how async I/O, concurrency and coroutine works. When start learning or using a new framework, people always carry some assumption coming from the previous experience. Some of these experiences are helpful to understand the new system, but some of these experiences may lead to the misunderstanding of the new system. This book introduces the pitfalls to avoid if you are an experienced PHP developer. This book is for the developers who have already know the basics about how a web system works such as PHP web application or application in the other programming languages such as Node.js, Golang or Java. After reading this book, you should be able to build a high concurrent Swoole PHP system with confidence.
Table of contents
- Introduction
- Background
- - Stateless PHP-FPM
- - Performance problem
- - Concurrency problem
- - PHP CLI
- General concepts
- - Executor and execution containers
- - Lifecycle
- - Decoupling and layers
- - Queue, Buffer, Buffering and Batching
- - Pipe and Channel
- - Context, stack and context switch
- - Singleplex vs multiplexing
- - Asynchronous
- - State, stateless, stateful and pooling
- - File descriptor, I/O stream
- - Exceptions
- - Protocol
- - Concurrency and I/O model
- - Event driven and callbacks
- - Facts, costs and limitation
- - Rate limiting & Concurrency Limiting
- The practical world on Linux OS
- - User mode and kernel mode
- - Memory management
- - Process, Thread and Coroutine
- - Socket and Networking I/O
- - Blocking IO and Non-blocking IO
- - Callbacks, await async vs coroutines
- Connect with protocols
- - TCP/UDP Protocol
- - HTTP Protocol
- - Websocket Protocol
- - HTTP2 Protocol and GRPC
- - Custom protocol
- Swoole runtime and internal
- - Swoole PHP extension
- - Variable and states
- - Event loop and asynchronous I/O
- - Swoole PHP Coroutine
- - Multiple execution modes
- Hands on Swoole PHP
- - Swoole Server
- - Swoole Server Workers
- - Swoole Process
- - Swoole Clients
- - Swoole Table
- - Swoole Timer
- - Swoole Coroutine and Channel
- Use cases and patterns
- - HTTP services
- - Data processing
- - HTTP and PHP-FPM proxy
- - Sidecar process
- - TCP service
- - WebSocket Server
- - Task Scheduler
- - Producer and Consumer
- - M:N concurrency mapping
- - Connection polling
- - Web spider and scraper
- - PUBSUB system
- - Server-sent events (SSE)
- - Integrate with Linux process
- - Service Governance: RPC and gRPC
- - Rate limiting
- - Design custom TCP protocols - Monitoring and reporting
- Hosting and deployment
- - Docker and Kubernetes
- - Running on the AWS EC2 or bare metal
- LanguageEnglish
- Publication date26 Nov. 2020
- File size5.1 MB
Product details
- ASIN : B0881B227S
- Publisher : Transfon (26 Nov. 2020)
- Language : English
- File size : 5.1 MB
- Text-to-Speech : Enabled
- Screen Reader : Supported
- Enhanced typesetting : Enabled
- X-Ray : Not Enabled
- Word Wise : Not Enabled
- Print length : 336 pages
- Best Sellers Rank: 1,629,395 in Kindle Store (See Top 100 in Kindle Store)
- 74 in PHP Computer Programming
- 92 in Parallel Programming
- 26,257 in Computing & Internet Programming
- Customer reviews:
About the author
Bruce Dou is one of the maintainers of open source Open Swoole, asynchronous concurrency system expert, specialized in application performance optimization, system cost reduction, cloud migration, web infrastructure and large-scale system architecture. You can find him @doubaokun on Twitter.
Customer reviews
Customer Reviews, including Product Star Ratings, help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyses reviews to verify trustworthiness.
Learn more how customers reviews work on AmazonTop reviews from United Kingdom
Top reviews from other countries
- geekcomReviewed in Brazil on 25 November 2022
5.0 out of 5 stars Amazing
The best way to learning PHP Swoole.
-
AntonioReviewed in Spain on 31 October 2023
5.0 out of 5 stars Muy interesante
Me ha gustado mucho entender cómo Swoole funciona por dentro. Además me ha venido muy bien para recordar conceptos de concurrencia y sistemas distribuidos.
El libro me ha dado una mejor idea de cómo y cuándo utilizar Swoole, y muchas ideas que probar.
El autor claramente ha participado en el desarrollo de Swoole, explica muy bien cómo han conseguido crear Swoole.
Después de leer el libro, sólo puedo decir que Swoole es una obra de arte y una genialidad.
- Rodolfo A.Reviewed in the United States on 12 December 2020
5.0 out of 5 stars Swoole Rules
This is a review for Kindle edition.
This book will allow you to master what you have to actually know to get the most out of Swoole. The author is an eminence in this topic and a big part of the book is just about how you should be using the protocols and tools offered by Swoole.
Using Swoole will certainly deliver you a greater throughput and the knowledge in this book will allow to master it.
Many thanks to the Swoole community and Mr. Dou for this book.
-
dlorenzoReviewed in France on 4 February 2021
1.0 out of 5 stars Décevant
Je pensais trouver dans ce livre plus que des copies du site d'aide de Swoole, et surtout des exemples concrets d'usage avec des explications sur les paramètres des fonctions. Il n'en est rien, pire, les soit disant exemples sont exactement les mêmes que ceux du site, sans aucune explication.
Ce livre est totalement inutile ...
- DarioReviewed in Italy on 2 January 2021
5.0 out of 5 stars Clear and complete
The official guide to swoole all aspect and use cases are very useful . Clear source code examples makes the reading very easy