Friday, May 27, 2005

PHP vs Java

It wasn't really a question until now. We have a big PHP product to run our web servers and we want to sell it. It looks nice and serves its purpose. One problem is that PHP is very inefficient and higher traffic chokes the server. Another problem is scalability. Small scripts look nice but when they become bigger you just spend more time digging and meditating than typing. This road leads to a deadend where you can't fix/expand features and the scripts are just too valuable to throw away because you spent so much time and effort and it works somehow even now. What to do? Should have never started with PHP - that's for sure.
Okey, we sad, let's migrate to Java. The idea looks promising and worth to try. Quite some time later we realized two things. First, renting one more server is about 100$ a month, which is like at least ten times less the profit. So scalability is not an issure here. Second, we're going to have hard times selling our Java version rather then PHP one. This is weird. Java-setup is better by all parameters (for example some tests have shown Java to be about 500 times more efficient then PHP, so instead of 500 servers you'd have just one!) but less profitable for us to sell. Is Sun loosing the battle? We'd love to see Java SE runtime on every PC available or at least on most of them but that is so far from reality.
Representing a small outsource team I'll say that current market situation is unfair. Right now we have a complete production cycle based on open source technologies, from PC 3D games to large bussines network sollutions. Out of all that we prefer to deal with are PC client software and small to average bussines web sites because these segments are very massive and easy to pray. But it appears that Java positions here are weak: try to convince a regular WinXP user to download a 100 Mb Java SE RT bundled with your unquestionably briliant software. Even webmasters are not that easily touched by the promises of all Java bounties when they hear about an application server. Hardware is getting cheaper and more powerful, lame and lazy webmasters are multiplying like rabbits, Sun is still afraid of open-source community... I know, mobile edition is still something to think about but in a way it's like LEGO, it just looks cute but makes no sense.