Why Zimbra is Written in Java and not PHP
Today I just got Zimbra working on our company server and was generally pleased. It does 90% of what we need, and I think its a great product with great support for even greater price.
I have one question (or suggestion ???), since I am fluent in programming. Why Zimbra is written in Java and not PHP? Tomcat is slow and resource-hungry, even over local 100mbit net login process takes 20 - 30 seconds, despite hosting on 2.8 GHz P4 PC with fast 3ware RAID. On the other hand, compiled (with opcode cache) PHP programs are very very snappy. I am not a fan of any technology whatsoever, decision must be made on the basis of purposfulnes and not personal taste. Please do not consider as I am throwing stones, just curious....
Many reasons for choosing Java over PHP
Here we go:
1) JSP/Servlets are faster and easier to scale. (At runtime they are already compiled, and runs in threaded mode). PHP must start a process each time a new request is made, which is very resource consuming to the OS. PHP is not suitable for large web solutions. That is also the reason You will never see large bank or govern solutions based on PHP.
2) PHP is a scripting language not a real high level programming language, it has weakly type bindings, and is very difficult to maintain when large bulks of code is to be written. The code itself often appears unstructured and cluttered when one need to write large procedures for certain tasks.
3) Clustering, failover and scaleablillity is almost impossible in PHP. Furthermore mulitprogramming, threading and advanced designpatterns is impossible to deploy in PHP.
4) Java is a real high level language to be used in advanced solutions where stability and security has high priority.
I deeply respect PHP for it's popularity today. But I don't believe many programmers consider it a real programming language they like to work with. PHP is specialized towards WEB usage, where Java is a general purpose programming language with unlimited technical options.
I have worked both with PHP and Java/JSP/Servlets. I think both sides have advantages. But if Zimbra should appear as a serious competitor to MS exchange only an implementation in Java should be considered.
Happy easter, Daniel Mersebak
Re: Why Zimbra is Written in Java and not PHP
Yes, I've got your point. As long as software works as expected, its underlying technology does not matter. You have a lot of highest-class Java specialists in your company, so obviously you have choosen Java. What I like in PHP is very quick prototyping with template engine (like Savant) and adodb, plus enormous number of third-party class libraries. However, debugging PHP is a nightmare, I am simply use "echo" in problematic code to get a clue what is going on (stone age, eh ?).
We have one client (large international advertising agency), which year or a couple ago have choosen MS Exchange as their corporate mail platform. Now they have numerous troubles just as expected. They also considered Open Exchange, but their buttheads in London moved toward MS (local branch I have contact with had only one option - to submit). Have you sold Zimbra to the large customers who have thousands of sites abroad (and huge e-mails, like 50 - 100 mb each)? Personally, I am in doubt of scalability of Java solutions because of JVM overhead. Such organizations have a lot of designers which work on Quad-CPU Macs, and they certainly will smell rats about 20-30 sec login process. I am using Dual CPU Mac and AhlonXP 1600 Linux PC, both with FireFox, and I have to say clicking on tabs/options leads to short pause, which is related to AJAX I think.