Thanks for your contribution! Always love seeing new attempts with PHP. While I 100% appreciate your efforts, there are a few really big questions or problems I have with the way this has been presented. As a PHP developer, I hope you don't mind me addressing them here. 1) You benchmarked a large framework with all sorts of features and functionality against a very specific library with a few files. What about all of…
Pux – High Performance Router for PHP
21–30 of 58 posts
Re: Pux – High Performance Router for PHP
#22Earlier quoted context omitted.
> If they would only first explain what the heck is "routing in PHP"... "Routing" is a common and well-understood term in application development: I'm sure you can appreciate the act of writing documentation for an intended audience. In the context of an application, a router interprets a request from a client and forwards it to the appropriate resource (a controller or some other business logic) which then produces…
Web application development. I'm sure plenty of programmers would think of the Layer-3 device that chooses paths to forward packets through nodes to a destination.
Yes, and web application developers are the intended audience.
Re: Pux – High Performance Router for PHP
#23Thanks for your contribution! Always love seeing new attempts with PHP. While I 100% appreciate your efforts, there are a few really big questions or problems I have with the way this has been presented. As a PHP developer, I hope you don't mind me addressing them here. 1) You benchmarked a large framework with all sorts of features and functionality against a very specific library with a few files. What about all of…
Without getting into the tests, I suspect he checked his code against the Symfony Routing component[0] instead of the entire framework stack. Symfony is build from stand-alone loosely decoupled components[1]. [0] https://packagist.org/packages/symfony/routing [1] https://packagist.org/packages/symfony/
1) How was the component isolated and used for the test?
2) Do the features of the Symfony routing component match the features of Pux?
This is exactly why I'm more upset at the presentation of the project and not the project itself.
These questions wouldn't need to be answered if the README simply talked about what it did and how it performed. Instead, it positions itself as a competitor to a specific product and then tests against it. That would be fine, except the tests appear incomplete, very specific, and not a good comparison. In addition, it doesn't highlight the total throughput numbers or show off the maximum viable performance at all. It simply says it's better than something else. When you're selling something as being performant routing, that means you should be flaunting the maximum number of requests you were able to squeeze out of it. There isn't a single statement about how much you can really push through this until it fails. So, how is it interesting? When comparing performance, you have to know maximums. There are none here except for the amount of requests possible when requesting a single page at 10 concurrent users.
The project stands alone as an interesting dive into attempting to speed up routing for specific use-cases.
This sort of goes to the adage of product placement in that you shouldn't sell your product by simply talking about the competitor. Unless you execute it very, very well you stand to have your product lost in the noise.
Re: Pux – High Performance Router for PHP
#24> Pux tries not to consume computation time to build all routes dynamically (like Symfony/Routing). Instead, Pux compiles your routes to plain PHP array for caching, the compiled routes can be loaded from cache very fast. symfony/routing compiles routes only once to PHP code ([1]), and then that generated code is used for matching all subsequent requests. (There are multiple route matchers, but the default one works…
Probably by the php extension in c :) I would think that phalcon router will be faster too.
Re: Pux – High Performance Router for PHP
#25> Pux tries not to consume computation time to build all routes dynamically (like Symfony/Routing). Instead, Pux compiles your routes to plain PHP array for caching, the compiled routes can be loaded from cache very fast. symfony/routing compiles routes only once to PHP code ([1]), and then that generated code is used for matching all subsequent requests. (There are multiple route matchers, but the default one works…
Well for a start they're misusing apachebench gnuplot data (which isnt time-ordered). And "compiled to php" is kinda meaningless, it depends what it's compiled to. There is no "native routing" language. For my two cents, if you're having to translate your solution into simpler code your solution is wrong.
Re: Pux – High Performance Router for PHP
#26Thanks for your contribution! Always love seeing new attempts with PHP. While I 100% appreciate your efforts, there are a few really big questions or problems I have with the way this has been presented. As a PHP developer, I hope you don't mind me addressing them here. 1) You benchmarked a large framework with all sorts of features and functionality against a very specific library with a few files. What about all of…
Without getting into the tests, I suspect he checked his code against the Symfony Routing component[0] instead of the entire framework stack. Symfony is build from stand-alone loosely decoupled components[1]. [0] https://packagist.org/packages/symfony/routing [1] https://packagist.org/packages/symfony/
Re: Pux – High Performance Router for PHP
#27Earlier quoted context omitted.
> If they would only first explain what the heck is "routing in PHP"... "Routing" is a common and well-understood term in application development: I'm sure you can appreciate the act of writing documentation for an intended audience. In the context of an application, a router interprets a request from a client and forwards it to the appropriate resource (a controller or some other business logic) which then produces…
Web application development. I'm sure plenty of programmers would think of the Layer-3 device that chooses paths to forward packets through nodes to a destination.
I don't know if I'd make that distinction. Routing certainly gets a lot of use in web application development, but routing at the application level is not web-specific: examples of the pattern can be found in the Android SDK,[1] userland Android/iOS development,[2] and in a number of EIPs.[3]
> I'm sure plenty of programmers would think of the Layer-3 device that chooses paths to forward packets through nodes to a destination.
I don't discount this at all, but I do think it's pretty obvious from the context and the README which type of routing this library provides.
[1]: http://developer.android.com/reference/android/media/MediaRo...
Re: Pux – High Performance Router for PHP
#28Please use 0 as the baseline (zero point of y axis).
Re: Pux – High Performance Router for PHP
#29As far as performance, I seriously doubt the bottleneck in modern applications is the router.
Re: Pux – High Performance Router for PHP
#30There's no need to reinvent frameworks in PHP as PHP is the framework already. There's no need to reinvent templating in PHP as PHP is the templating already.
If you require different productivity from a language just don't stick on PHP and make the right choice by using the most appropriate language for you. There's plenty out there.
PHP is great, it rocks and is very fast when used in the right way.