Java and the cloud
Presented by John M. Willis, a cloud computing evangelist and CEO of his self funded Zabovo Corporation. For those of you who do not know what cloud computing is I'd highly recommend reading about it in Wikipedia http://en.wikipedia.org/wiki/Cloud_computing. Basically this is the concept of higher abstraction – you can start by abstracting from something like the infrastructure (using some sort of virtualization for instance), through platform abstraction (when you do not really care whether or not you are running on windows or not … oh wait … we do care, so never mind) and even application abstraction, where you just want a place were you can deploy your code (such as Google Apps).
As you might suspect this is quite a large topic. One thing caught my eye though and it is called Hadoop (http://en.wikipedia.org/wiki/Hadoop). Check it out – it does some pretty amazing things.
Modular Dynamic Web Applications (using OSGi)
Our presenter was Rob Harrop, a lead engineer of SpringSource dm Server, author of several books including Pro Spring, a member of JCP and is involved in the JSR-255 expert group for JMX 2.0. Pretty impressive, right?
His presentation was also quite impressive – he showed the audience how an application could be split into several smaller components using OSGi. What we could see is how we could achieve absolute encapsulation – each bundle would have its own interface and their clients (the other bundles that use them) would have absolutely no way of knowing or directly using their implementation. Of course there is even a way to have more than one implementation of a given bundle and load them depending on a certain rule.
Want more cool? Here it comes : imagine you have two bundles that make up your web site – a hotel reservation and airline reservation part. You could actually remove one of them and the other would work just fine. If you make a request to the removed one (say hotel reservations) the OSGi framework would stall the request a given predefined amount of time, waiting for you to actually insert this bundle back in. You would however be surprised to find out that in order for this to actually work you should have split your logic in two (implementation and interface). If you were to simply put back the missing bundle it would have other class version even though it is the same bundle. So in order to make this work the missing bundle should be referenced by its interface package.
I didn't manage to ask about class versioning though. What would happen if you remove a bundle and you have some thread running on of its classes in the same time? Would it be forced to stop? And what if the old version of the class references methods / classes that are no longer there in the newly introduced bundle? Will have to find out this myself ...