Monday, August 08, 2005

Friendster goes PHP: "Rasmus, your post is the very reason _not_ to use PHP. You're pushing session state, inter-process messaging, and application state off to a database. For Friendster's sake, I hope they have a huge clustered Oracle instance, because once they exceed the capabilities of their database, the site will fall apart.

JSP is far, far more efficient than PHP when it comes to taking load off the database, for the very reasons you mentioned above. Sandboxing every request is inherently a mistake, because to do any sort of OO would require that you load up the user's profile every single time you hit a page.

Hearing that Friendster used _Tomcat_ as their application server explains why the site was so slow. Tomcat is the reference implementation, and has never been known for its speed. I would bet that, rather than doing a costly and time-consuming conversion to PHP, had Friendster sprung for some licenses for Resin (caucho.com) the site would have performed admirably. Inter-JVM messaging in Resin is done extremely quickly, and as a JSP engine Resin is unparalleled. "

0 Comments:

Post a Comment

<< Home