The Server Side Java Symposium – Day II

March 18th, 2010 @

Day II at the Server Side Java Symposium started with the Oracle-sponsored keynote presenting Oracle’s cloud story. This type of audience, made up mostly of truth seeking developers and architects, has little tolerance for vendor-sponsored presentations who skew the truth in their favour. In all fairness though, the presenter did a good job of presenting the state of the SOA, grid/cloud computing and process orchestration but we had to sit through the details of the Oracle-based solution. Fair enough.

More clouds on the horizon
The symposium continued with its focus on cloud computing. One interesting session was Elastic Data on the Cloud. The theme is that your entire in-house DBA department can be outsourced to a cloud-based vendor offering persistence as a service. If you shape your application to the cloud mould, your app can achieve massive scalability and you never need to worry about hosting the database server.

There are some very interesting ideas here, but they need to be taken with a grain of salt. Cloud principles include the idea that scalability must be baked into your architecture from the outset. It’s a scale first mindset instead of scale last. Second, the NOSQL movement (Not Only SQL) believes with good reason that not all data needs to be relational allowing some processing to be offloaded away from your database. Third, is the notion that you can pick any two but never all three of these facets of data storage: Consistency (data is always coherent), Availability (fault-tolerant, always up) or Partition-tolerant (never need to re-shard/re-partition or move around data). If these concepts are baked-in your application, you are ready for PaaS (platform as a service) for your data tier.

There are already many competing vendors in this space each with varying solutions. Amazon and its S3 offering allows your to access their cloud database via a REST-based API. This can be done from within their EC2 environment or remotely from within your own hosted environment. Google only allows access to their persistence from within their app engine. GigaSpaces, with its XAP solution, provides the middleware to connect to Amazon’s EC2.

Storm clouds on the horizon
Cloud-based persistence is a great idea because it outsources persistence and makes it someone else’s headache. Sounds good but why is it that today, IT departments need a small army of people ensuring that database servers are up and running. In typical production environments, there are frequent database connectivity issues that cause outages. There are locks that cause applications to freeze and there are inexplicable database server crashes that corrupt user data. How does cloud computing make those troubles go away? What’s Google’s toll-free number I can use if I need to yell at someone when my data gets lost? I know, I know… these things never happen in the cloud world. Tough sell, though.

C++ vs. Java
Cameron Purdy’s keynote retrospected about why Java superseded C++ in the enterprise world. He argued that even though there are areas where C++ is superior to Java (fast start up time, lower memory footprint, native optimizations), Java won the war because of its automated garbage collection. This allowed frameworks to flourish in the Java world because without the need to manage memory, frameworks become much simpler to use. Gone is the need to bake resource liberation into the APIs.

Java was also able to take advantage of multi-core CPUs. Since the Java runtime manages garbage collection, it knows which thread is accessing which object. This allows it to parallelize memory access for objects that are not shared by multiple threads. It can also allocate and destroy memory more efficiently than C++. More importantly, though, Java quickly gained an advantage at the beginning of the Internet revolution because Java could not cause buffer overflows and core dumps – an important characteristic in an age of Java applets running in browsers. In summary, all the advantages of C++ were no longer important. And, any other void left by Java were filled by tools such as Javascript. Cameron always provides unique insights and he didn’t disappoint this time around.

The REST of the symposium
The symposium also focused on REST vs SOAP-based APIs. This included topics such as what makes an API RESTful, when is REST a better solution for web services than SOAP, and how to think of REST as accessing resources with HTTP constructs. One of the best orators was Scott Davis and his presentation of HTML 5 which introduces constructs for the semantic web. More on this in day III.