Wednesday, June 3, 2009

JavaOne 2009, day one, part two

TS-3966 Using REST and WS-* Together for SOA

I really liked this presentation it appeared to give a balanced view of the topic and the presenter was clear. The key point to take home from this presentation is that both WS-*, SOAP web services, and REST services are valid implementations for SOA. Neither thought are ideal for all situations.

The key point of SOA from the point of view of this presentation the key point of SOA is to introduce loose coupling so you can change implementations on the fly. This is contrasted to RPC style services where even changing the number of parameters would require the service to be shutdown and all client modified.

On balance SOAP has all the enterprise features such as WS-TX and WS-RM; but REST, at least over HTTP, works better over the web. (Even simple stuff like allowing GET for caching) You can roll your own enterprise features on top of REST/HTTP but you pretty much end up with the complication seen in WS-*.

Is it interesting to understand that just at the moment we have a consistent WS interop story that the technical world want to drop all of this and start again. Having said that REST does work better over the net, you can cache values where required although I am not sure how this works in practice.

Interestingly if we had a SOAP 1.3 that had come control over HTTP methods then you could get many of the advantages of REST but with the consistent interop standard that SOAP gives you.

The presenters view was that the RESTvsSOAP debate was useful and instructive; but that going forward we should focus more fixing the problems with both rather than bickering. Which I kinda agree with.

The summary was that for cross web use REST/HTTP but for interop at the moment you will find that WS-* wins because of the number of add-hoc relationships you currently see in REST because of the lack of standard. Interesting point of view.

Tuesday afternoon technical session

I was a bit late as Lucas Jellema happen to pick the one of the hundreds of tables at lunch that I was sitting at. Very odd to hear the words ... "Do you know Gerard Davison". Might 2.5 seconds of fame I guess.

I had a good chat with Lucas even had some time to give him some quick previews of some features in JDeveloper. But pressed for time at that point; but was happy to bump into him and will hope to keep in touch.

Lots of stuff in JDK 7 in the presentation; but nothing particularly interesting. The one significant project was "Jigsaw" which reduces the JDK into much smaller modules. For example desktop profile made up of base; awt and swing. Really does cut down on the core download. Oh for the day we don't have to download the Corba support all those useless classes which pollute code insight.

There was the a little bit on EE6; but to be honest not anything new apart some new scheduling annotations in EJB 3.1 which are nice for timed events.

The one really interesting API is JSR 303 Bean Validation. This allows you to perform assertions such as string length etc. Using meta annotations you can define you only validators, this looks like a nice API for general use.

Then a little bit on profiles, in particular the web one. Then a really nice demo using net beans and glassfish. They think Sept'09 for the final version of EE6 along with a matching glassfish soon after.

The final demo was for there Open ESB demo app Had some really nice web ui as part of project Fuji that allowed you to draw out a lot of the interaction flow. Looks very powerful.

TS-4629 Tips and Tricks for Ajax Push Applications

Pretty fun presentation; but the take home message is that you have to be really careful to architect you broadcast mechanism to deal with client that die of block. So if you need to broadcast to 30 browsers you need to consider how many thread you need to service this and perhaps us non-blocking NIO.2 to service these request. The other thing to consider is even consolidation, for example an application that updates x,y location and drop some intermediate event to improve performance.

Also to consider is conversation fragmentation in a cluster, but the solution to this was not covered in detail except that in most cases it is going to involve a JMS queue of some kind.

TS 4544 Introduction to CEP

Interesting stuff about monitoring real world information, this was in particular a demo of the Oracle implementation which was interesting. Runs on top of the RT version of the RocketVM because of the needs to continuously monitor events and correlate them as they arrive.

A good introduction to this topic; but I don't know enough to comment any further... Pretty cool fire service demo at the end showing real world information being integrated in real time.

TS 4213 Securing Web and Service Orientated Architectures with Apache Axis, WSS4J, Spring and OpenLDAP.

Now I have notes to prove I went to this presentation; but I think JetLag was hitting hard. I cannot make any sense of them at all. :-)

BOF-5493 Qup Vadis JavaFX Production Suite

Just a lot of work on making JavaFX very tool able. One thing of interest is the idea of a event bus so you can listen to common events and easily wire them up to actions. They have a special file format to encode designed artifacts, FXD/FXZ, that the designers can export from the normal design tooling such as creator.

Some things for the future would be a UI Contract that the designer can verify they are creating the correct objects and controls that the programmer has asked for. Also a binary format that better allows incremental load would be nice.

The tooling we demoed in several keynotes and was really quite impressive to my mind, I wonder how much it will cost.

BOF-3826 The Collections Connection

Started of with talking about collections is JDK the first thing we quite interesting in that they were proposing language changes to support array literal and look ups. Granted this is syntactic sugar; but something you should really expect from a modern language.


List<String> list = ["a", "b", "c"];
Map<Integer, String> map = {1: "One"}

// Or treat as arrays

map["1"] = "One";

Collections.sort in JDK 7 is much faster for lists that have some order and is much more efficient in it usage of memory. They we going to use the TimSort algorithm from Python.

They then went onto talk about Google collections which is nearly at 1.0; but not quite.

They have support for proper immutable lists rather than the Unmodifiable wrapper we currently have in Java. Written from the ground up to be faster as have less to worry about when compared to writable list. For example immutable set has a 2-3x smaller memory footprint when compared to the normal set. Also they provide builder methods to create literal immutable arrays which is nice. The suggestion is to always use immutable collection, never pass mutable ones which I kinda can agree with.

They have nice support for MultiSet and MultiMaps. Now original I wasn sure why you would need a MutliSet as it appeared to be the same as list. The main difference is that it has different rules for order equality. The MultiSet doesn't care about order to it is useful in some situations.

Really nice map builder interface to configure just the right amount of soft / weak keys in a map. Really useful for caches.

Take a look at the google collections project; but bare in mind some will make it into the JDK.

BOF-5009 Comet for Everyone, Everywhere

Nothing much new here that I haven't mentioned on the blog before, apart from the code snippet to launch a local version, kinda like Endpoint for JAX-WS:

// Like Endpoint.publish
SelectorThread st = GrizzlServerFactory.create("http://localhost:9999/");

They did mention the MessageTransformer class used to help prevent XSS hacks and injection bugs, they also talked a little bit about getting the broadcaster to be more efficient.

I did ask if you could get a broadcaster by name, and they said they would look into it.

And then with my brain thoroughly frazzled it was time to find some room service back at the code as it was after 10:30pm. (Right no it is actually Friday, time for me to catch a plane)

No comments: