This is another comment to HarryF's original post in Are PHP apps fundamentally data driven?. It's another argument against his hypothesis and the more general notion that PHP's inability to store session data in memory has major architectural implications.
I was recently asked the question: how do you do failover with PHP? I had to admit I'd never heard of the concept, but it's not a difficult one. It means having the ability to switch the user transparently between different Web servers so that if one server fails, the user won't notice anything.
The person who asked me explained that the J2EE programmers had told him J2EE would handle this for them. I said, in PHP you could store the session in a database.
I just realized that this has some bearing on the question of how different PHP is from other platforms. For failover, you presumably need to be prepared for the possibility that a server is blown away in an instant as a result of massive hardware failure. That means there will be no way to salvage data from RAM on that machine. So the session must be stored somewhere else, most likely on disk.
In other words, any application that requires failover cannot simply store session data in memory. Regardless of programming language or platform, it has to use some other strategy, and almost certainly one that can be duplicated in PHP.
Am I right, or did I miss something important?



This also offers a few more advantages. If this isn't your question, can you explain a bit more ?


Bookmarks