We have just started a project based on microservices architecture at my job. The team is actually oriented to PHP/Symfony but all resources on the web for microservices are oriented to other technologies such as node or goland...
I have just tested Swoft for personnal purpose last week (by curiosity). The first benchmark by building a PHP 8 docker and swoft was incredible. After warmup, the bootstraping show responses between 1ms and 3ms (on a recent mac pro). Then, I want to see more then I'ave ported the authentification and a route (with services) of or legacy api app. That was a heavy loading route (more that 4s). After async synchronisation, the route (on our dev VM then not a really speed machine, in same conditions) take only 63ms.
My purpose is not to benchmark Swoft for community but, it's clear for me that PHP is a good language to handle microservices apps.
Here are the packages I have developed to perform the test and certainly will be used on our production microservices (I can't put the test app because it contains business privates infos) :
- [small-orm-swoft https://github.com/sebk69/small-orm-swoft] as orm
- [small-swoft-auth https://github.com/sebk69/small-swoft-auth] as auth engine
- [swoft-voter https://github.com/sebk69/swoft-voter] implements fine rigth management inspired on Symfony voters system
- [swoft-json-response https://github.com/sebk69/swoft-json-response] just to implement a simple json response object more permissive that Swot dedicated middleware
- [small-orm-forms https://github.com/sebk69/small-orm-forms] (not achieved yet, just used to check login infos) implement yet form validation. My intention is to automatize form generation by simply injecting a DAO to create form and inject body of api for validation.
In a word, that is not acted yet but Swoft will probably be used for our project. YES : PHP and microservices are compatible !