In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
Hyperf publishes the view of Swoole Enterprise and what the Task components are. For this question, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and easy way.
Update content
This update mainly adds Swoole Enterprise components, view components and Task components, strengthens the exception handling of JSON RPC and improves the service registration and management of JSON RPC under the TCP protocol, and fixes the Bug of some other components, which is released in version 1.0.6. The documents of related components can be viewed through the hyperlink above, or directly visit the official website https://www.hyperf.io or document https://doc.hyperf.io to view.
Added
# 203 # 236247 # 252 add view components to support Blade engine and Smarty engine
# 203 add Task components to adapt to Swoole Task mechanism
# 245 add two scheduled task scheduling strategies: TaskWorkerStrategy and WorkerStrategy.
# 251 add using co-program context as cache driver for storage
# 254 added RequestMapping::$methods support for array values. You can now define methods through @ RequestMapping (methods= {"GET"}) and @ RequestMapping (methods= {RequestMapping::GET}).
The Hyperf\ Utils\ Contracts\ Arrayable returned by the # 255 controller is automatically converted to a Response object, and text/plain Content-Type is added to the response object that returns a string.
# 256 if there is a container binding relationship in Hyperf\ Contract\ IdGeneratorInterface, then the json-rpc client will automatically generate a request ID based on this class and store it in Request attribute, and improve the service registration and health check of JSON RPC under the TCP protocol.
Changed
# 247 use WorkerStrategy as the default scheduling policy for scheduled tasks
# 256 optimizes the error handling of JSON RPC, and now returns a standard JSON RPC error object when the method does not exist
Fixed
# 235 adds a default error handler for grpc-server to prevent errors from being thrown.
# 240optimizes the trigger of OnPipeMessage events and fixes the problem that incorrect data can be obtained by multiple listeners
# 257 fixed an issue where intranet IP could not be obtained in some environments
About Hyperf
Hyperf is a high-performance and flexible PHP protocol framework based on Swoole 4.3 +, with built-in protocol server and a large number of commonly used components. It has a qualitative improvement over the traditional PHP-FPM-based framework, providing ultra-high performance while maintaining extremely flexible scalability. The standard components are all implemented based on PSR standards and are designed based on powerful dependency injection. It ensures that most components or classes are replaceable and reusable. Framework component library in addition to the common collaborative version of the MySQL client, Redis client Eloquent ORM, WebSocket server and client, JSON RPC server and client, GRPC server and client, Zipkin (OpenTracing) client, Guzzle HTTP client, Elasticsearch client, Consul client, ETCD client, AMQP component, Apollo configuration center, Aliyun ACM application configuration management, current limiter based on token bucket algorithm, general connection pool, fuse, Swagger document generation and other components are also prepared for you. 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, automatic model caching, PSR-16-based caching and other very convenient features to meet rich technical and business scenarios.
Original intention of the framework
Although the framework developed based on the PHP language is in an era of contending flowers, we still fail to see a perfect framework for the coexistence of elegant design and ultra-high performance, nor do we see a framework that really paves the way for PHP micro services, which is the original intention of Hyperf and its team members. We will continue to invest and make efforts to this end, and you are welcome to join us to participate in open source construction.
Design concept
Hyperspeed + Flexibility = Hyperf, from the name we regard ultra-high speed and flexibility as the gene of Hyperf.
For ultra-high speed, we are based on Swoole protocol and do a lot of optimization in framework design to ensure ultra-high performance output.
For flexibility, we are based on Hyperf's powerful dependency injection components, which are implemented based on PSR standard contracts and contracts defined by Hyperf, so that most of the components or classes in the framework are replaceable.
Based on the above characteristics, Hyperf will have rich possibilities, such as the implementation of Web services, gateway services, distributed middleware, micro-service architecture, game server, Internet of things (IOT) and so on.
Complete documentation
We have invested a lot of time in document construction to solve various problems caused by missing documents, and there are a large number of examples on the documents, which are equally friendly to beginners.
Production availability
We have conducted a large number of unit tests for the components to ensure the correctness of the logic. at present, there are 483 single tests with a total of 1306 assertion conditions, while maintaining high-quality documents. Before the official opening of Hyperf to the public (June 20, 2019), a number of services have been online in a round C and a round B Internet company and have been running perfectly with a stable attitude for more than half a year, which has passed the test of the harsh production environment. We officially opened the project to the public.
This is the answer to the question about Hyperf's release of Swoole Enterprise's view and Task components. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.