This post originated from an RSS feed registered with Java Buzz
by Bill de hÓra.
Original Post: The reason PHP is more popular than Java: it's safer
Feed Title: Bill de hÓra
Feed URL: http://www.dehora.net/journal/atom.xml
Feed Description: FD85 1117 1888 1681 7689 B5DF E696 885C 20D8 21F8
I really don't understand why PHP, etc. dominates the free/cheap hosting solutions. Tomcat is a production class Servlet Container and JBoss easily holds it own against the commercial application servers. Then for database you can always choose MySql although personally I'd go for Postgres (this has the benefit of being similar to Oracle should the client want a transfer). - Mike Cogan I'll take a stab. It's because Java/JVM wasn't designed with multi-user environments in mind. LAMP solutions leverage the (usually *NIX) operating system to manage user processes. The JVM by comparison is a single user environment - code is running pretty much as root, which is what you'd expect given its use-case evolution (devices, websites, middleware). I think it would be too easy to hose a server running on a JVM if anyone could deploy code in it. My hosting provider emails me if I have more than two processes running for a period, that's fairly easy to do from the OS. Not so easy is to email me if I have more than two Java threads running or if I have deadlocked the JVM altogether. The (usually *NIX) operating systems have been doing this well for decades so that's entirely sensible to build on them. But Java only has the JVM, so you have to build all the user controls again from the ground up. The alternative, to run multiple JVMs won't fly - memory gobbling plus you have to manage inter-JVM comms from the server to your Servlet and back again (Servlets are not designed for this, in fact, quite the opposite - their initial selling point was running them in the same process as the server). Tomcat, JBoss and friends (UCL? For multihoming? With that reputation? Are they quite mad?) strike me as too flaky for multiuser environments until the JDK ships with Isolates. I'd love to know how the few Java hosting providers that do exist manage to keep things running at all....