Over a million developers have joined DZone.

The Brokenness of Java in the Cloud

· Cloud Zone

Download the Essential Cloud Buyer’s Guide to learn important factors to consider before selecting a provider as well as buying criteria to help you make the best decision for your infrastructure needs, brought to you in partnership with Internap.

In the cloud, it's important to be able to do have computers talk to each other and invoke commands on each other. This is called Remote Method Invocation (RMI). By language, I have the following recap:

  • Python works
  • Ruby works
  • Javascript works
  • Java ... makes you work

Java RMI is a godawful mess that should be killed now. RMI is a very simple thing until you let an argument of architects come up with "the best solution" and then it becomes a convoluted mess of edge cases. In it's simplest, RMI involves serializing and deserializing some input parameters and then running some logic, then doing the same with some output parameters... gosh, that almost sounds like HTTP to me (hint, it really IS).

I don't know exactly where things went wrong with java RMI, but there are registries, incantations, and special glyphs you need to paint on your door on alternate Tuesdays to make it work correctly. In python, ruby, and javascript, I can do RMI 15 different ways while drinking a beer and cooking a steak. In java, I repeatedly need to stop, read a book, ask a professor, read the book again, build some custom software to bypass a limitation (like spanning subnets), then ultimately rejoice in the amount of effort I put into my masterful solution.

In some ways, I think dynamic scripting languages scare off hard core engineers because engineers enjoy a good challenge and a lot of things that engineers love to spend time doing become brainlessly simple when using the right tool for the job. Note, this entire post was spawned by trying to get jmeter to coordinate a bunch of remote hosts to run a load test distributed over remote EC2 instances... You'd think this should be an easy task, but it turns out to be more difficult that one might think (mostly due to java RMI limitations).

The Cloud Zone is brought to you in partnership with Internap. Read Bare-Metal Cloud 101 to learn about bare-metal cloud and how it has emerged as a way to complement virtualized services.

Topics:

Published at DZone with permission of Michael Mainguy, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}