Why PHP is succeeding in web 2.0?
IMO, there are 3 key reasons:
- Apache web server
- Developer community
- Performance
In a very broader context, we have 3 technology stacks:
- Java
- LAMP
- .NET
Web 1.0
The birth of Java & commercial Web 1.0 was nearly happened at the same time and brilliant engineers of Sun Microsystems was able to make Java as the defacto standard for web with some key inventions like Servlets, JSP, JDBC, JMS and the container model for building & deploying apps. Also, not to forget the external contributions like struts framework, various Apache products, etc.
So, Java model was a super fit for the 3 tier web 1.0 architecture-
- Webserver - for static content
- Appserver - for business logic
- RDBMS - for data storage
Java also evolves. I admit that it doesn't evolve as quickly in the front end web app domain compared to PHP. Java is heavily used in building the back end infrastructure and even data frameworks like Hadoop are written in Java. Java is still a major force in the web architecture and will continue to be...
Web 2.0
The question here is why PHP succeeding in Web 2.0?
In the web2.0 type architecture, there is no clear separation of web server & app server. The static content is mostly served by CDN. Then data is brought closer to the app tier using memcache for performance. So, the architecture is 2 tier: webserver + data storage.
So in this 2 tier architecture model, PHP makes perfect sense as it runs inside the Apache itself as a module. This completely eliminates the need to have a separate tier for business logic for the web app.
- Apache web server is a high performance engine. Also it's a modular architecture- we can add modules based on demand. So this is a natural choice for most.
- Then having PHP running inside Apache itself as a module helps to deploy the complete app inside the Apache and avoids yet another layer + network hop. This gives good performance.
- Like Java, PHP also has a great developer community. Once you have the mass, you will get lot's of support + rich libraries.
Summary
If you are starting to build a scalable web application, think PHP! If you have any scalable concerns, think whether your app is bigger than Facebook or Zynga! I love to hear it.
3 Comments:
Just so that it is clear, Facebook uses an internally developed tool called "HipHop" to convert PHP into C++ code. The C++ code is then compiled to get better performance. This has allowed Facebook to get much more performance out of its web servers.
@Prakash: Thanks. I am aware of "HipHop" and make sense.
Long ago, while consulting for HP in the virtual call center product, I have to do a similar job- use a tool called "TowerJ" to convert Java byte code into native HP-UX binary for performance. But it was not successful.
In computing, what goes out yesterday will come back tomorrow!
This comment has been removed by the author.
Post a Comment
<< Home