Hyperf is a high-performance and highly flexible PHP coroutine framework based on Swoole4.4+. It has a built-in coroutine server and a large number of commonly used components. Its performance is qualitatively improved compared to the traditional framework based on PHP-FPM, providing ultra-high performance At the same time, it also maintains extremely flexible scalability. Standard components are implemented based on the PSR standard and are based on a powerful dependency injection design, which ensures that most components or classes are replaceable and reusable.
In addition to the common coroutine version of MySQL client and Redis client, the framework component library also prepares for you the coroutine version of EloquentORM, WebSocket server and client, JSONRPC server and client, GRPC server and client, OpenTracing (Zipkin, Jaeger) client, GuzzleHTTP client, Elasticsearch client, Consul client, ETCD client, AMQP component, Nats component, Apollo, ETCD, Zookeeper and Alibaba Cloud ACM configuration center, based on the token bucket algorithm Current limiter, universal connection pool, circuit breaker, Swagger document generation, SwooleTracker, Blade, Smarty, Twig, Plates and ThinkTemplate view engine, Snowflake global ID generator, Prometheus monitoring and other components, eliminating the need to implement the corresponding coroutine version yourself. trouble.
Hyperf also provides PSR-11-based dependency injection containers, annotations, AOP aspect-oriented programming, PSR-15-based middleware, custom processes, PSR-14-based event managers, Redis/RabbitMQ message queues, and automatic model caching , PSR-16-based caching, Crontab second-level scheduled tasks, Session, i18n internationalization, Validation form verification and other very convenient functions to meet a variety of technical scenarios and business scenarios, and can be used out of the box.
Hyperf featuresOriginal intention of the framework Although the framework developed based on the PHP language is now in an era of blooming, we still have not seen a perfect framework that coexists with elegant design and ultra-high performance, nor have we seen a framework that truly paves the way for PHP microservices. , this is the original intention of Hyperf and its team members. We will continue to invest and work hard for this, and you are welcome to join us and participate in open source construction.
design concept
Hyperspeed+Flexibility=Hyperf, from the name we take ultra-high speed and flexibility as the genes of Hyperf.
For ultra-high speed, we are based on the Swoole coroutine and perform a lot of optimizations on the framework design to ensure ultra-high-performance output.
For flexibility, we are based on Hyperf's powerful dependency injection components. The components are all implemented based on the PSR standard contract and the contract defined by Hyperf, so that most components or classes in the framework are replaceable.
Based on the above characteristics, Hyperf will have rich possibilities, such as implementing single Web services, API services, gateway services, distributed middleware, microservice architecture, game servers, Internet of Things (IOT), etc.
Complete documentation We have invested a lot of time in document construction to provide a high-quality documentation experience to solve various problems caused by missing documentation. The documentation also provides a large number of examples, which is equally friendly to novices.
Hyperf official development documentation
Production is available. We have conducted a large number of unit tests for the components to ensure that the logic is correct. Currently, there are 1,342 single tests with a total of 3,961 assertion conditions. Hyperf is a project that has experienced harsh production environment tests. Currently, there are many large-scale Internet companies have deployed Hyperf in their production environments and run it stably.