Zend server/php caching results
wobbleian <at> yahoo.co.uk [Firebird-general] <Firebird-general <at> yahoogroups.com>
2014-09-18 21:14:15 GMT
Zend did a sales pitch to us this morning and we weren't the most impressed. Everyone we talk to who delivers solutions PHP+Mysql web applications seem to be obsessed with full page caches, op-code caching, and results caching. But they don't seem to mean the same thing as us when they say "application". Our history was migrating delphi apps to PHP around 2001 and we treat our app like an app that just happens to be using HTML+browser to render the UI. Firebird rocks for this and always has - the databases sit in OS disc cache for all practical purposes, queries are fast, and application logic is light.
Whilst I can see the benefit of full page caching to something
like a shopping cart application, I simply can't imagine a single page in our app that a user would be happy to visit one second, and then the next we could be sure it hadn't changed - especially since they usually visit information repeatedly exactly when they are changing it, and old data that has become static through age is rarely accessed - so I've dismissed whole page caching.
However, on every single page access there's a number of system options tables and caption tables that we hit that rarely change, and even if they do it's sort of OK if it takes seconds to propagate out the data to users, so I can see the potential for caching specific results. Most of our pages take about a second to load, and of that most of it is accessing data, and the "static" tables account for about 10ms. My gut feeling is that we simply shouldn't worry about caching results, but my colleagues aren't as convinced. Modern processors eat the load we throw at them, and 1s to a user is the same as 0.5s or 1.5s. Any longer begins to be noticeable, but doing magic to save 20ms seems like over optimisation.
I'm beginning to doubt myself, so here's the questions.
1. Are we the only people who think of PHP+Firebird as producing apps just like good old Delphi+Interbase?
2. Do people [on any stack] bother to cache query results as a matter of course?
3. If we've got servers with 30GB+ of database that are all OS-read-cached and PHP/Apache is happily sitting in < 1GB of memory, should we even be worried about op-code caching? Why is the PHP world obsessed with caching and load balancing?
4. I've been "happy" with php for 14 years, have I been mad and should we have been using Zend Server all along? [I respect your opinions more than any other forum even though it's nothing to do with firebird!]
Ta you lovely bunch,
Posted by: wobbleian <at> yahoo.co.uk