Hosting Java Web Applications: Why Is It Still So Hard?

Hosting Java Web applications is far from trivial. Ask anyone who has tried it and you'll start to understand why Java Web applications are not popular outside the enterprise. On the other hand, another common type of Web application - PHP based - has no such hosting issues. While there is lots of information on this topic throughout the Internet, I thought about performing my own simple test and I focused on three representative hosting providers.

The benchmark

Our company has recently launched the Java translation of phpBB 2, branded as nBB2. It's open-source and you can get it from nbb2.sourceforge.net. So what I had at hand was the Java equivalent of a popular PHP forum engine. Same look, same behavior, only backed by a different programming language. If one wants to compare the hosting options for small-to-medium PHP and Java Web applications, the phpBB/nBB2 pair looked to me like a good test material.

My reasoning was to use a Java application that is the very close counterpart of something that runs on even the cheapest PHP hosting options. By "close counterpart" I mean they both carry out the same operations on system resources (e.g. writing files, using sockets, accessing databases).

Another concern I had was performance. I wanted to find out not only whether the Java application can run on a certain hosting plan, but also how fast. Again, the most reasonable benchmark was to compare performance with the original PHP application running in the same environment.

I started by setting up a testing scenario using Apache JMeter which performs the following workflow: main page → login page → main page (automatic redirect) → view forum → view topic → post reply → log out → main page (automatic redirect).

This scenario is executed by 10 concurrent threads (users), 30 times each. This produces 300 new topic posts at the end of the performance test. All JMeter project files are available on the CVS here.

Reference tests

Before using the hosting providers, I conducted reference testing on two of our machines (one Linux, one Windows). The results were consistent: phpBB 2 was 10-15% faster than nBB2.

I ran PHP 5.2.3 through the Apache 2.x PHP module, a pretty common setup. For nBB2, I used Apache Tomcat 5.5 (on J2SE 6) and I imposed a heap limit of 32 MB, close to what one can expect in a remote hosting environment. More performance tuning could produce better nBB2 results, but this was enough to prove that the performance of the two applications is comparable.

The JMeter aggregate reports are also on the CVS. In case you wonder why Java doesn't blow out PHP for speed (or vice-versa), do not forget that both applications share the same architecture.

Shared hosting

For Java Web applications, the basic hosting options I have encountered feature a setup in which several users share the same instance of Tomcat 5.x. Perhaps Caucho Resin would be a better choice, but that's another discussion.

After many attempts, I gave up on GoDaddy's cheap Linux-based Java hosting account (the Deluxe Plan with $6.99 per month). I can only say what many others do, that it isn't suitable for anything but the simplest servlets or JSP pages.

Their JVM is set up to be very restrictive. As a rule of thumb, any part of the Java API that requires security permissions will probably not work. Think of write access to your own account (or /tmp), reading of system properties, creation of URL stream handlers, FTP connections. Before dismissing the importance of write access, think about logging. You'll be forced to log to a database. Log4j JDBCAppender is your friend, but it can't replace a simple log file. But I digress.

Other basic hosting accounts forbid the use of third-party JARs, like the case of HostIgnition's StarterFire plan.

Deployment/redeployment is another issue, since you don't have direct access to the JVM and so you cannot restart it at your convenience. According to GoDaddy's documentation, they have scheduled restarts each night at 1 AM Arizona time. In practice, they seem to do restarts more often than that. Other providers have on demand restarts. Each user can request a certain number of restarts each day. The problem is that other users you are sharing the JVM with can temporarily take down your application.

Shared hosting using a private JVM was the next logical step in my quest. This took the monthly charge well over $10 (e.g. $14.95 for HostIgnition's LiteFire with the Level 2 JSP/Servlets option). At this level one needs to get used to 32 MB of heap, at best. Above that, prices increase steeply (e.g. $59.95 for 64 MB of heap at HostIgnition). Having your own JVM, you may restart it at your convenience and can see even the Tomcat logs directory through FTP.

But even using the private JVM doesn't mean that all will go well. For instance, on my test Hostignition LiteFire account, I occasionally encountered the java.lang.OutOfMemoryError: GC overhead limit exceeded error during performance testing. This is documented to occur when the -XX:-UseGCOverheadLimit JVM option is enabled, more than 98% of the total time is spent in garbage collection and less than 2% of the heap is recovered. Now this could happen if a certain part of the heap resided in swap and could not be restored to RAM in a time-effective manner.

On a positive note, the performance of nBB2 slightly exceeded that of phpBB on my HostIgnition account - configuration options do help.

After all this, I see the shared hosting with private JVM as the cheapest viable Java hosting alternative. While the basic hosting services just won't do, this one is reasonable but starts to be a little pricey.

Virtual Private Servers (VPS)

After finding a reasonable Java Web hosting solution, I thought about going upwards in the price range. The next step is represented by the Virtual Private Servers. You get your own machine (Linux or Windows) and have full root/admin access through SSH/Remote Desktop. The catch is that all this is virtualized and you are sharing a physical machine with others. Depending on how many users are allocated to the same physical machine and on what they are doing at a given time, performance varies.

The downside is that, besides the JVM, you are in charge of the whole operating system. Setting up and maintaining the servers for DNS, email, database, Web etc. is no small task.

My Linux-based GoDaddy VPS (Economy Plan, $30+) had enough RAM (256 MB RAM + 1 GB of swap), but experienced occasional performance drops. This was really bad. I thought I'd try a different VPS provider.

On a LunarPages VPS also running on Linux, things were much better and consistent on the performance side. The problem was that I had only 512 MB of memory available, including swap space. I'd say that on a real machine this would be the equivalent of 128 MB RAM and 384 MB of swap. This memory was eaten up pretty fast by the running services and I had difficulties getting a JVM to fully use its 32 MB heap space (in client mode, since the server mode requires additional non-heap memory). This ate up all the memory and /proc/meminfo was consistently reporting low to critical memory resources. Under these circumstances, even simple Cron jobs were failing due to out of memory errors. Naturally, the JVM also required daily restarts, otherwise I'd get OutOfMemory errors there as well.

Had I skipped the Plesk administrative interface and disabled some non-essential services, I might have been able to fully use the 32 MB of heap space and have some memory to spare. But it seemed pointless to pay twice the price of a private JVM on a shared host to get the same level of performance at best.

Performance-wise, when the Java application DID work, the results were consistent with what I had obtained on our local machines.

Dedicated Hosting

It surely works great, but it is in a completely different price range. I find a $100+ monthly charge to be rarely justified for low to medium traffic sites running small sized Web applications. The JVM is snappy, while experiencing the same comparative performance as on my local tests. Memory is no issue since all dedicated plans come with at least 512 MB of RAM and a swap space for which you have exclusive use. It's a physical machine for your use only.

The conclusion

With all this effort, I managed to find out nothing new :-) Java runs well in an enterprise environment (good up-scaling) and lags outside of it (bad down-scaling). The memory overhead of the JVM translates into memory problems for the applications in a budget-friendly hosting environment, making the comparable performance (when/while things do run) a small consolation.

But PHP works well outside the enterprise. Its simple development and deployment life-cycles are ideal for shared hosting environments, just as if the language was been built with this in mind – well, actually, it was.

While Java comes out a little bruised from this comparison, future evolutions might change the balance of power. If the MVM (multi-tasking virtual machine) from JSR 121 that promises to run multiple isolated virtual machines inside the same JVM process will ever be released, this could make it easy and cost-effective for hosting providers to give full access to a JVM per account even in their basic hosting plans. Another possibility is for the embedded J2SE platform to be used by hosting providers, if it catches on.

Average: 2.7 (3 votes)

Comments

David Lee replied on Fri, 2008/04/04 - 9:54am

Great topic, and I've gone through everything you mentioned, especially w/godaddy and settled on a dedicated server at cari.net.

 
low cost, quality  java hosting is long over due.

Navneet Karnani replied on Fri, 2008/04/04 - 10:20am

For your VPS evaluation, you must try http://www.linode.com

 I am a user and a friend, who i referred, using it and bot of us are very happy with the results we see there. We run several JVMs in the base package of 384MB RAM/10GB HDD for $20.

 

Having said that I must say that shared java hosting has a long way to go.

Onur Ersen replied on Fri, 2008/04/04 - 10:25am

Very good topic ! :)

I'm one of those who had serious problems with shared hosting !!!!

My hosting company previously used Tomcat 5.x and then 6.x now.

I've been running simple java-jsp applications on my host(i.e. jsp forum etc.).

Then one day I deployed a little much more complex application that I developed using Myfaces and Hibernate.

It was a total mass!!!  It took 2 weeks of work to fix application based and hosting based problem too see index(!).As I was trying to fix those my only communication way was e-mail:(

I remember one of those problems was encoding.

In my hibernatesession class my code was setting encoding to a different one from hosting jvm's default encoding so it caused all web application deployed on that machine to crash!!

Not happy with my shared hosting(slow) and I think private hosting prices are high for individuals.

Daniel Ray replied on Fri, 2008/04/04 - 10:32am

I have been building J2EE apps for nearly eight years now I would highly recommend eApps, http://www.eapps.com/, for Java hosting. I challenge anyone to find better customer support, better pricing, and better software/tool options for maintaining their applications. I often use them when starting a new application while waiting on business servers to be allocated. My team is then allowed to develop outside of their local machines for a month or two while our infrastructure is being updated to support new projects. Not to mention it keeps the executives happy.

Jess Holle replied on Fri, 2008/04/04 - 10:34am

MVM does not stand for multi-threaded virtual machine.

I've also not heard anything stating that MVM support will be in Java 6 Update 10.  Can you please give a specific citation  to this effect?

Robert Enyedi replied on Fri, 2008/04/04 - 11:50am in response to: jessh

jessh wrote:

MVM does not stand for multi-threaded virtual machine.

I've also not heard anything stating that MVM support will be in Java 6 Update 10. Can you please give a specific citation to this effect?

Jess, you are right on both counts. Two information sources had somehow mixed up in my head. I've corrected the article, thank you and sorry for the mistake.

hosiawak replied on Fri, 2008/04/04 - 12:02pm

Hmm, I've never seen the words "Enterprise" and "phpBB" in one sentence, interesting :)

A catchy title and it seems you're trying to prove something very hard:

You're trying to prove that Java sucks because you can't run phpBB in it on a 256MB server. Everyone knows that there's not many things that run properly on a shared hosting apart from PHP (and that includes Python/Ruby/Smalltalk/Lisp or anything that is not mod_php). You didn't do a good job at comparing the VPS's - currently you can easily buy 1GB/2GB VPS for 30EUR/50EUR per month. I'm sorry but 50 EUR is far from being "Enterprise" :)

The title of this post should be:

" Why PHP is great for cheap, hared hosting of discussion boards"

 

Stephen Strenn replied on Fri, 2008/04/04 - 12:28pm

Check out webappcabaret.net.  It's easy to use, and you can get a private jvm w/96mb heap for $17/mo.  Lots of other options.  Great support.

 I've been using them for years w/o problems.

 

Robert Enyedi replied on Fri, 2008/04/04 - 1:11pm in response to: hosiawak

hosiawak, what I was trying to see was - for small-to-medium Java applications that need to run on a tight budget, are there any convenient hosting options? The "enterprise" world was certainly not in my views - surely they have big bad servers of their own :-) And well, I am a Java fan and our company translates PHP to Java and not the opposite.

Please note that the price figures I mentioned where in USD. These days a Euro is 1.56 USD, so the figures that you are talking about are much higher in USD than they look.

Eric MacAdie replied on Fri, 2008/04/04 - 5:27pm

I went to webappcabaret.com to look at their packages. The prices looked pretty good, but after a few minutes the page would refresh and take me back to the index page. A hosting company with a hard-to-use site seems wrong to me.

Eric MacAdie replied on Fri, 2008/04/04 - 8:54pm

I went back to webappcabaret just now and I did not have the refresh issue. Before I was on my employer's computer on their network. Perhaps something about the setup was causing the issue.

Peter Blakeley replied on Fri, 2008/04/04 - 9:35pm in response to: Budoray

I would like to second this comment we have been using eapps.com for 4 years and the support is great these guys know J2EE. We now have several clients running their web apps their as well as our own apps, also host 20 odd web sites  as domains all accessing our webapps on tomcat.

pb... 

 

Marc Wick replied on Sat, 2008/04/05 - 1:22am

Did you also look at other phpBB ports to java? There a quite a few of them and nBB2 is the result of an automated migration. I would expect it to have quite poor performance compared to a 'real' java implementation.

Look at jforum.net for instance.


Marc

Robert Enyedi replied on Sat, 2008/04/05 - 2:53am in response to: mw51287

mw51287 wrote:

Did you also look at other phpBB ports to java? There a quite a few of them and nBB2 is the result of an automated migration. I would expect it to have quite poor performance compared to a 'real' java implementation.

No, I did not look at the Java clones of phpBB. What I was interested in were the issues with hosting the closest equivalent of phpBB 2, meaning that both do the same things in the same order, access the same resources etc. Think of it as a small comparative research between PHP and Java hosting.

The performance of nBB2 in absolute numbers wasn't the problematic issue. I just wanted to check whether the comparative performance (e.g. how many percent slower/faster is nBB2 compared to phpBB) is the same on remote hosting as on local machines. What I found worrying instead was the state of the remote hosting setups, security permissions and fees for such a small application as a forum engine.

Geert Bevin replied on Sat, 2008/04/05 - 4:42am

I've been using Amazon EC2 (http://amazon.com/ec2) for my Java hosting needs for a year or so now. Works really great. It sets you back for $72 / month and now that they allow you to fix the IP address for a host, this becomes even more interesting. The nice thing is also that once you need to scale to more nodes, you already have one of the most flexible platforms on the planet at your disposal with your single node approach. The fact that S3 is available for backups and permanent storage with free transfer from/to EC2 is also a very nice aspect of it.

Behrang Saeedzadeh replied on Sat, 2008/04/05 - 6:58am

It would be nice if you could also benchmark phpBB on Caucho's Quercus.

gent replied on Sun, 2008/04/06 - 1:03am

I'm using free java host from http://www.jdy.net/ for testing my jsp application .

LunarPages is using resin as java container.  

Many webmasters discard  java hosting and switch to php hosting because most of godd quality scripts written by PHP. javalobby is a good example. (running on drupal) 

 

esbium m replied on Sun, 2008/04/06 - 3:56am

Kattare.com has been hosting my Java applications with minimal effort on my part for 3 years!  Check them out!

Robert Enyedi replied on Sun, 2008/04/06 - 5:43am in response to: gent

gent wrote:

Many webmasters discard java hosting and switch to php hosting because most of godd quality scripts written by PHP. javalobby is a good example. (running on drupal)

While I'm skeptic about the quality of most publicly available PHP scripts, fact is that JavaLobby and the whole DZone network do run on Drupal (which incidentally has an above average code quality). This is something to think about indeed.

David Lee replied on Sun, 2008/04/06 - 12:14pm in response to: sky_HALud

It is something to think about and I have and it's only substantiates the hosting problem noted in the article.  There are fewer free java apps like drupal and joomla in part because of the hosting issue.  If you wrote a drupal in java you'd surely need a dedicated server, because the app would mostly like be bloated with libraries that would easliy run through most of the heap space you get with most of these shared plans.  PHP's success, in part ,can easily be attributed to its low cost of everything, tools and hosting.  Java's lack of success on the hosting side is clear, and this definitely has had an effect on the the what's available for java. 

I suspect the drupal decision was made in part because of cost.  Javalobby appeared to be running on resin and some jive software, and probably some other stuff.  But the forum software and resin weren't always free.  I suspect JL was running on licensed $ software, not the free versions.  I also suspect when considering to update the site, the cost of java development vs the cost of using something like drupal made the decision easy from a cost/time perspective.

 If you're an aspiring web developer, and you want to build the next great webapp, even if all else was equal , you have to consider where the app can and is likely to to be deployed.  To give yourself the best chance of success, you have to conclude that you have far more hosting options by choosing to not go with java. 

I say all of that to simply agree, again, with the article's original point,  hosting java web apps is harder and more expensive than it needs to be.

Will Hartung replied on Sun, 2008/04/06 - 1:19pm

PHP apps are popular because PHP hosting is cheap, and most PHP apps are more than adequate for the tasks that they perform for a majority of users. Technologists may care about the underlying implementation, but Users can care less. They look at bang/$ ratios, and PHP wins this game hands down.

PHP is cheap to host because most shared hosting plans serve idle applications with little traffic, and PHP only consumes resources (modulo disk space) on the system when there is traffic, rather than Java which consumes resources based on the number of hosted applications. That's why all of the "cheap" Java plans have no memory, and why all of the "cheap" plans are nigh worthless. PHP costs the host disk space for each virtual host, Java costs the host memory. I'm sure you've all compared prices between RAM sticks and hard drives recently...

And there is nothing to be done about it. It is simply the nature of the beast. Shared Java hosting is unreliable (as mentioned in the original article), unless you go VPS which is expensive for a system of reasonable size (much less finding one well configured, like the 512MB host with no swap -- practically unusable). PHP hosting is effectively free today. ($5/month hosts with gazillion GB of hard drive space).

Simply, it's a cost of doing business with Java and needs to be factored in to your calculations regarding adoption of it or not.

Tom Pridham replied on Sun, 2008/04/06 - 10:28pm

For budget hosting, I would recommend CWI Hosting. For a dedicated server, I use ServerBeach - ServerBeach was founded by the same guy that started Rackspace. When I setup servers for my customers, I use Rackspace - the customer service at Rackspace is the best I have seen.

 

Regards,

Tom

Robert Enyedi replied on Mon, 2008/04/07 - 9:22am in response to: whartung

whartung wrote:
PHP is cheap to host because most shared hosting plans serve idle applications with little traffic, and PHP only consumes resources (modulo disk space) on the system when there is traffic, rather than Java which consumes resources based on the number of hosted applications.

Will, that's exactly the reason why PHP hosting is cheap and simple. This makes me conclude that if Java were to seriously compete with PHP on budget hosting it would be using a shared JVM hosting environment. This is the closest equivalent of the PHP model. You have one big JVM with all the available RAM allocated to it and, in theory, the web container manages the contexts as efficiently as possible. And the Java web application model does scale better than PHP.

Yet we now that shared hosting is a nightmare. I see two reasons for this happening:

  1. Setting up such a web container is difficult and requires in-depth knowledge about Java and JVM internals, something the average hosting provider does not have. This could be solved by creating preconfigured standard packages of Tomcat/Resin/GlassFish etc. that are ready for such tasks.
  2. There are technology limits on what the JVM and web containers can do in isolating web contexts and providing proper context lifecycle management (deploy/redeploy/undeploy).
I suspect the most unconfortable reason (number 2) to be the issue here. As a sidenote, I've heard that GlassFish v3 will focus on this (see comment #2 from here), but I don't know specifics. Is there anyone more informed about this?

Dieter Krachtus replied on Mon, 2008/04/07 - 11:32am

Hi Robert,

While I do not need Java hosting myself I guess some people take monthly costs into account at the beginning of a project and then choose PHP over the Java platform. And there is no way back even if hosting costs won't play a role when the project is maturing. So cheap Java hosting would be a nice gateway drug.

I wonder why Sun doesn't act - everybody choosing PHP is lost for the Java platform ;)

By now I doubt that MVM will come althought it would be great - not only for cheap hosting. I guess a single instance of Tomcat/Glassfish that gets all heap memory and which is then shared between many users is no option?

Perhaps it is up to a little startup to provide such a solution, use something like

http://blogs.sun.com/chrisoliver/entry/poor_man's_multi-vm

(source code included) as a starting point and then add the elements as described in:

http://www.jroller.com/dk/entry/bundling_java_glassfish_with_mysql

http://www.jroller.com/dk/entry/lt_followup_on_jlamp

to offer a complete low-cost solution for interested Java hosting providers.

Dieter

 

 

 

Will Hartung replied on Mon, 2008/04/07 - 1:55pm in response to: sky_HALud

GFv3 can only take the problem so far. There are fundamental issues with the underlying JVM.

The primary issue isolation of applications within the shared system. It's is far to easy for a hostile application to harm the server. By hostile I mean simply either an intentional attack via malicious code, or an unintentional attack via bad code. That's why shared hosting can be unreliable if other users needs to restart the server.

Now in theory, the containers have SOME control over this, but I don't know of any that are written to handle the shared hosting environment well. For example, if the container catches an OOM exception from an application, perhaps it can force a reload of that application with the hopes that it will free up some memory. But, that's not really fair being as the app that throws the OOM error isn't necessarily the app that CAUSED the OOM error, and in truth, THAT's the app you want to reload.

Also Java apps are set up to be "long running" "in memory" applications. It's routine for many applications to perform slow start up (perhaps pre-loading and caching a lot of data) to ready themselves to better handle the requests when they do come in. Put that application in to an environment where the application itself may be continually loaded and reloaded, and you end up with what appears to be a badly performing application.

But others are endemic to the JVM. For example, there's no safe way to kill a thread in the JVM. So, you can't even have a container that has watchdog thread running looking for runaway threads, so it can kill them off. Also, since the memory system is opaque to Java, you can't impose memory limits on individual threads. And even if you could, they'd be difficult to track. For example, how much of a threads memory is being used by shared resources within the container, vs the thread itself. (You can see this problem today on Unix systems. When using shared memory, it can be very difficult to find out exactly how much memory an individual process is using.)

Java, also, has historically had a poor track record of reclaiming space from Classes. The dreaded PermGen errors folks get from constantly reloading JSPs and what not.

The JVM can be changed to better accommodate this task, even without the MVM. They can make a "smarter", more "container friendly"JVM to better support the problem. Memory accounting would still be a problem though I think. (I don't know how much flexibility the JVM leaves the implementor as to the underlying primitive object layout.)

Unix as an underlying OS handles this problem wielding it's course process model. Processes have their own costs, but they're very safe form an OS point of view. This coarse process model is what make PHP work so well.

Dieter Krachtus replied on Mon, 2008/04/07 - 3:11pm in response to: whartung

Yes I fully agree.

The primary issue isolation of applications within the shared system. It's is far to easy for a hostile application to harm the server. By hostile I mean simply either an intentional attack via malicious code, or an unintentional attack via bad code. That's why shared hosting can be unreliable if other users needs to restart the server.

Isn't it the same with Applets? One badly written Appelt can effect all the other well-behaving Applets in the Browser? Also I never read anywhere what really is going on behind the surface when Applets are started.

http://www.jroller.com/dk/entry/applets_for_the_masses

Is there a difference between how Applets are treated in IE, Firefox, Safari? or Windows/Linux/OSX in general?

Do they have to share the same VM?

Do they have to share the same limited heap? What happens if one Applet causes a OOM?

What happens if I push the reload button in my browser?

What Objects are disposed if I reload the Applet? This is obvious you say?

 

Anyway...asking this questions and experimenting I got a lot of strange behaviour (e.g. JTextPanes breaking after reload etc.). Another thing is the inconsistent behaviour between browsers. Very annoying.

It should be possible (especially for beginners) to write an applet that is fully and automatically destroyed once I close the browser page. Even the classloader-class that loaded all other classes would need to go to nirvana.

As long as these problems are not fixed I see no possibility to use Applets anywhere, not even in situations where you control the client. Not to mention to use it as everyday thing on a webpage. Imagine this kind of behaviour with the 50something Flash-apps automatically started in my browser every day.

Is Flash somehow keeping each app completely separated from the rest? At least they never brought down the browser and if I close the browser page they also seem to be completly removed from my memory (maybe I am wrong). Anyway, 50-flash-plugins a day and the browser still behaves well.

 

Jay Bee replied on Tue, 2008/04/08 - 6:52pm

I find it interesting that nobody's compared Java and PHP hosting with .NET hosting.

I'm not a shill for Microsoft, hear me out.

.NET hosting prices are generally on par with LAMP hosting, whereas, as noted in the article, realistic Java hosting is more than double the monthly cost. Big organizations with deep pockets buying expensive, enterprisy-smelling servers can sustain the Java platform only so long. Managers who are conscious of economic efficiency don't care about brand name or platform loyalty, and lightweight, loosely-coupled simple services are the wave of the future.

The Java community really has to solve the hosting problem if it wants to move forward in the server-side space. It doesn't matter how cool JRuby on Rails is for straight-to-the-point agile development if Joe Startup can't affordably host the Next Big Thing written in it. They'll do a cool mashup in Drupal, Joomla or DotNetNuke and get it on the street for ten buxamonth instead.

Parting rhetorical question: If Java is so great running on a fifty-dollar cell phone, why can't it run cost-effectively on a server?

Ray Kelm replied on Wed, 2008/04/09 - 12:17pm

If you'll pardon the shameless plug, I run dataslab.com, which provides a vps with 256M ram, 512M swap, and 20G disk for $20 (US) per month.

I wanted to note two things:

1. Those specs are excellent for running a tomcat instance.

2. The $20 price point is fairly common in the vps industry, as are those specs.

It doesn't take too much looking to find a VPS provider with similar specs for the same price. The $30 mentioned in the article is above the norm.

That said, I would have no problem with putting 10 virtual hosted php sites onto a single VPS, whereas putting a tomcat instance I'd recommend only one. Not that tomcat needs the full capacit, but that it's easier to manage those php virtual hosts.

I'm also a developer, and generally prefer java over php. I wish there were a better story for deploying java web apps. To that end, I've been working with OSGi, and I think there is something there worth using, but it's not yet at the point where it is easily deployed.

 

Jeroen Wenting replied on Fri, 2008/04/11 - 1:43am

I think a major part of the problem finding Java hosting on the low end of the market has nothing whatsoever to do with complexity of the work and everything with the type of people starting and running hosting companies at that end of the market.

Those people are typically Linux fanatics, with a decade of "hatred" of Microsoft and Java under their belts, so they won't even consider hosting Java even if they had skills exceeding those needed to create virtual hosts on Apache.
Some have bowed under pressure and started hosting Frontpage extensions because the home user and small business (their customers) often ask about those, since those users often use Frontpage to create their websites and Frontpage assumes Frontpage extensions to be available by default unless you tell it otherwise.
Java has no such penetration in the low end of the market of web designers (which is hardly surprising as Java was never aimed for web development at those people, where Microsoft very agressively targets ASP at them).

So it's a political/religious and economic issue more than a technology issue.
One could host a cluster of JBoss or Tomcat instances just as easily as a cluster of Apache instances. But these people don't want to, the very thought never even enters their mind, and they're still under the impression (from all the reports they saw on slashdot a decade ago and regurgitated there every few weeks) that "Java is slow", "Java is not secure", etc. etc.

Robert Enyedi replied on Fri, 2008/04/11 - 7:49am in response to: rk29

rk29 wrote:

That said, I would have no problem with putting 10 virtual hosted php sites onto a single VPS, whereas putting a tomcat instance I'd recommend only one. Not that tomcat needs the full capacit, but that it's easier to manage those php virtual hosts.

Ray, it's good to know that you are in the hosting business. Did you attempt to provide shared hosting for Java? We all would like to hear some more thoughts about this. Previous posts did mention Java's lack of control over threads as one of the reliability issues. Having the ability to impose limits on memory and processor usage, arbitrary interruption etc. would certainly be nice.

rk29 wrote:

I'm also a developer, and generally prefer java over php. I wish there were a better story for deploying java web apps. To that end, I've been working with OSGi, and I think there is something there worth using, but it's not yet at the point where it is easily deployed.

What parts of OSGi do you think that could ease Java web deployments? Is that the fact that you have better application lifecycle management than those that come with the popular Java web containers?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.