7 ms·
Why is this a surprise to anyone? And Nginx to memcache will be even faster... and serving static content even faster... You're adding a tremendous amount of
by earle 16y ago
Why is this a surprise to anyone? And Nginx to memcache will be even faster... and serving static content even faster...
You're adding a tremendous amount of overhead with any high level language stuck in between the connect and the data source.
This is about as basic as it gets, not worthy of #1 item on hacker news.
- buro9 16y agoYou're kidding me right? I'm off to re-write my entire app as a stored proc ;) You are right of course. But what would be nice would be to replace part of a static page with the result of a piece of SQL. To combine ESIs with MySql so that you can serve static files and still be able to add things like watermarks using a MySql lookup based on a session cookie.
- regularfry 16y agoThe idea that you might not need the high-level language in the middle at all is interesting in itself. At least, it is to me. I've not seen it before.
- apgwoz 16y agoYou haven't seen PHP or Python between MySQL and the webserver? I must be missing your point.
- regularfry 16y agoThe reverse - I can't remember having seen a database spew JSON from port 80 before without an intervening HLL.
- apgwoz 16y agoThat makes more sense. Thanks for clarifying.
- earle 16y agoThis is working backwards. You do realize that before PHP and higher level languages this is how things generally worked to begin with (server modules) as opposed to now (higher level languages). I still don't understand why this is on hacker news, let alone the top of the list.. seems to be about the most obvious item of all.. disappointing
- thwarted 16y agoIsn't this still how things work if you want to do anything easily with Microsoft's IIS?
- henrikschroder 16y agoYes, you can write an ISAPI module if you want as little as possible between your program and IIS, but I wouldn't label that as "easily". And I don't see why you would bother, ASP.Net is compiled, it's not exactly a performance hog, unlike PHP.
- pjscott 16y agoI haven't used them, but there are a variety of PHP compilers, like phc or Facebook's HipHop. I hear that they can really speed up PHP code.
- cookiecaper 16y agoI can't really tell from the phc page, but HipHop at least doesn't "speed up PHP code". It converts the code from PHP to C++. That isn't speeding up PHP, that's unraveling the PHP and respinning it as C++.
- regularfry 16y agoIt's still speeding up PHP by compiling it, it's just using C++ as an (extra) intermediate representation.
- 16y ago