
Hi Michael, I agree with you on two points. First that PHP can scale well across multiple servers and secondly that bad design/ engineering can ruin any chance of an application scaling whether it be developed in Java or PHP. I think scaling in this case has to be defined and metrics put in place for it to make sense. On a single server with high processing power PHP fails in scaling by virtue of the fact that it runs as an add on module on a Web Servers. JSP/Servlets on the other will run in a Web Container or J2EE server which in turn runs in a JVM. With increased processing power on a single server you can increase the instances of your Web Container/ J2EE server to scale the system. Again scalability has to be defined and metrics put in place for it to make sense. I still think that Java scales better than PHP even on a single server. KR, Loki "Excellent people exceed expectations". ________________________________ From: Michael Pedersen <sku@kaal.dk> To: Skunkworks forum <skunkworks@lists.my.co.ke> Sent: Wednesday, September 2, 2009 11:22:50 AM Subject: Re: [Skunkworks] PHP vs Servlets/JSP Hi Skunks and Nicholas, I highly disagree with you that PHP does not scale as well as JSP/Servlets - I will even go as far as to say that it scales better. That PHP does not scale / is enterprise ready is an old myth, one that most likely is a result of the fact that very few PHP applications are engineered with scalability in mind, or is just of poor engineering quality. Prime examples of PHP applications that scale very very well are Wikipedia & Facebook. The main difference is that PHP is stateless and JSP/Servlets is statefull. This leads to the fact that PHP applications (usually) is very easy to scale across multiple servers (i.e. scale very high) whereas JSP/Servlets (usually) is able to scale better when running on a single server - but often have a hard time running on multiple servers without considerable extra engineering. however bad design/engineering can ruin any chance of an application scaling - both with Java & PHP. Regards Michael Pedersen PLUSPEOPLE Nicholas Loki wrote:
Hi Skunks, Allow me to disagree with what comrade Saidi mentioned about over-engineering. I think in any enterprise system design a high degree of over-engineering is expected. Personally I would go with start simple but make sure your simple anticipates and expects features that may come up in later releases. About the language of choice, if you want fast turn around times for your development cycles together with ease of use PHP is the way to go. Though I still think it doesn't scale well under increased load. JSPs/Servlets scale very well under load, but are more complex to develop and maintain. Either way you need skills to achieve productivity with both approaches.
Another way to look at it is, you could use a hybrid approach and have PHP for the front end and JSP/Servlets for business logic etc in the back end. You could then use REST APIs or WebServices to pass messages back and forth within the architecture. A bit of an overkill, but might be the way to go with really high volume systems. KR, Loki
_______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks Other services @ http://my.co.ke Other lists ------------- Announce: http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks-announce Science: http://lists.my.co.ke/cgi-bin/mailman/listinfo/science kazi: http://lists.my.co.ke/cgi-bin/mailman/admin/kazi/general