framework-x
React
framework-x | React | |
---|---|---|
14 | 44 | |
847 | 8,910 | |
- | 0.4% | |
6.3 | 3.9 | |
4 months ago | 6 months ago | |
PHP | PHP | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
framework-x
-
Modern PHP features explained – PHP 8.0 and 8.1
Have a look at Framework X (https://framework-x.org). It's barebones, but provides routing and basic request/response handling to build your own stuff upon. It's based on ReactPHP so you can use it as standalone service or use it in shared hosting with FPM, whichever suits you.
-
I like the PHP constant RAM characteristics under a load but struggle to find a semi-decent req/s PHP framework/library for API backends
Using FrameworkX default hello world example I get 12.4K req/s on my M1. FrameworkX is using ReactPHP. Unless I'm reading activity monitor wrong it's ~10MB idle and 12,5 MB max.
-
Do I need Laravel for an HTTP API project? If so, why?
There are many micro-frameworks available like Slim, Mezzio(with Swoole may be), or if you are into async then you can also try Framework X(from core maintainer of ReactPHP). This frameworks have small footprints compare to Laravel, Symfony, etc. Yes, you can't get things like authentication, routing and other out of the box but they can easily be installed and configured to be used.
-
What have fibers been used for so far?
I saw it was mentioned in the Framework X
-
What is after OPcache ?
As others have mentioned, in certain scenarios using a long-running application server (rather than mod_php/php-fpm) to serve requests can make sense. There are a number of extensions and libraries available that facilitate this with asynchronous code execution - Swoole has already been mentioned but you may also want to check out ReactPHP (not related to JS React, other than they stole the name) and Framework X
-
Media Streaming with ReactPHP
The Framework X is an attempt to make ReactPHP into a micro framework, but I see little mention of it.
- Framework X - Reactive Web Application Framework
-
What would you use for simple PHP app with few routes and http client?
Framework-x https://github.com/clue/framework-x
-
Anyone have production examples or prototypes you built in Swoole?
With ReactPHP, I've written a couple websocket apps. Worked pretty great for that. https://framework-x.org/ is also a pretty good place to get started for a simple HTTP microservice-type app.
-
Persistent PHP code in an API?
Yeah ReactPHP will do this. I have an event source server running and it was pretty easy (once you get the hang of using react). I had an nginx proxy in front of it for tls. Have a look at https://framework-x.org too
React
-
Concurrency and parallelism in PHP (part 1)
Even though this Generator's side is quite obscure for most PHP developers, it has been extensively explored by well-known libraries, such as ReactPHP and AMPHP, which we will see later on.
- ReactPHP – Event-driven, non-blocking I/O with PHP
- ReactPHP: Event-driven, non-blocking I/O in pure PHP
- FrankenPHP: The Modern PHP App Server
-
Getting started with asynchronous PHP using ReactPHP
ReactPHP is a library that allows you to turn PHP into something like Go or Node.js so that tasks can be performed asynchronously. Note that ReactPHP is just a library that you install with Composer. It doesn’t have cumbersome requirements, such as installing a custom PHP extension; it just works as intended.
-
Understanding Concurrency in PHP
ReactPHP is categorized as a low-level dependency for event-driven programming. It features an event loop that supports low-level utilities, such as HTTP client/server, async DNS resolver, streams abstraction, and network client/servers.
-
Which FW should I use for the link shortening service?
So you could either skip the framework entirely and shave of these 10ms per request, or you could turn to something like Laravel Octane or ReactPHP to have a long running application that answers requests without bootstrapping the whole framework each time (which is what Node.js, Python or .NET applications do, the practice of restarting the whole app with every request is quite unique to the PHP community).
-
How are folks feeling about the React team's push toward server components?
I remember calling out the movement to serverside of the frontend framework as reactPHP (I think it's when the remix hype first surfaced) on twitter and realized there's a literal php framework called reactPHP (https://reactphp.org/) since they liked my tweet lol.
-
PHP Swoole or OpenSwoole?
https://reactphp.org/ of course.
-
I don’t get all the hate for PHP and at this point I am too afraid to ask.
You could also use something like EventMachine (In ruby), Twisted (Python), Node (JS) or ReactPHP (for PHP) that will use the language and turn it into a web application server, and then you'll have only one long running process that handle all your requests with shared memory. You could even use something more fancy like RoadRunner in the case of PHP.
What are some alternatives?
nano - 🧬 Nano is a zero-config, no skeleton, minimal Hyperf distribution that allows you to quickly build a Hyperf application with just a single PHP file.
Amp - A non-blocking concurrency framework for PHP applications. 🐘
easyswoole - swoole,easyswoole,swoole framework
Ratchet - Asynchronous WebSocket server
020-end-to-end - Demonstrating end to end testing of a simple REST API
Workerman - An asynchronous event driven PHP socket framework. Supports HTTP, Websocket, SSL and other custom protocols.
tsf - coroutine and Swoole based php server framework in tencent
Swoole - 🚀 Coroutine-based concurrency library for PHP
GroupCo - PHP的服务化框架。适用于Api、Http Server、Rpc Server;帮助原生PHP项目转向微服务化。出色的性能与支持高并发的协程相结合
Elephant.io - Ça trompe énormément
async - Async utilities and fibers for ReactPHP.
Icicle - Icicle is a PHP library for writing asynchronous code using synchronous coding techniques