Spryker + OpenSwoole or other PHP network frameworks
Hi everyone,
Recently I tried out to implement the OpenSwoole framework in my local dev setup of the B2B demo shop.
OpenSwoole is a event-driven, asynchronous network framework with non-blocking I/O.
The big advantage you have with the framework (in addition to other features like coroutines) is that the rather costly spryker application boot process that gets executed on every request can be stored inside the OpenSwoole server workers. With that the application only needs to be booted once. However one of the disadvantages is that data persists between requests, for example in static arrays, which can lead to memory leaks.
I managed to create a proof of concept for the B2B demo shop. I needed to change the docker/sdk templates, implement a custom server worker and session storage and some more thing for it to work. The increase of the site loading speed I got was very high.
Although you properly need to refactor quite a bit of code, for example the static arrays used in the spryker code, It showed me that it is definitely possible to implement.
That's why I wanted to ask if the Spryker team looked into other network frameworks than PHP-FPM or if others have also tried or already managed to implement a stateful framework inside a Spryker project?
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 76 Spryker News
- 929 Developer Corner
- 787 Spryker Development
- 89 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 26 Job Opportunities
- 3.2K 📜 Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random