Wednesday, May 17, 2006

JavaOne - First Day

I had not been to a JavaOne for a few years. They are usually scheduled at the same time as Apple's WorldWide Developer Conference and I usually have to present at that, or do other work for the conference.

Yesterday was good. There was good energy and a lot of interested people. Asking random people what they worked on almost always got people going about this and that, usually with a lot of passion. There were a lot of internationals, inclusing a recent grad from Brasil who won a ticket and a gentleman from South Africa. There were some suits who had some behemoth app for some insurance company and they want to make sure their behemoth can keep chugging along. But there really were not too many of those. And you cannot get rid of these people completely. After all, they usually have money.

The session I most wanted to go to was the Concurrent Collection talk by the guys at Sun who brought you JSR 166 and all that great stuff.

Most of the talk was a walk through the classes. It was useful to hear the rationale and the "canonical use case" for a given class. It is always unclear, at these talks, if one could have just more completely read the web pages and got the same info. I think some of this was not just "stuff from the web".

For example, looking at BlockingQueue and the SynchronousQueue, I do not think I would have seen this. Brian Goetz explicitly called out that the SynchronousQueue was not like the other BlockingQueue sub-classes but was most usefully thought of as a pipe for producer-consumer situations.

Another class was the Exchanger, which was described as being one of the "Syn chronizers". I think that "Synchronizer" is a casual term. I do not see it in the classes. The use case for this as, again, a producer-consumer situation where one wanted to swap an empty arrow for a full one, for example. The other synchronizers namred were Semaphore, CountDownLatch, and CyclicBarrier.

It always seems to me that some of these classes are just random bits of "hey this might be useful" stuff, but when such smart people are doing the classes, then I think that their random bags of "just stuff" are probably worth working with. We'll see.

There were a couple of things that I had seen but that I now want to look at more closely.

One was the Future interface. Brian described it as a thing to hold the result of a call that might occur in the future, might have occurred already, or might never occur. It gives you a way to decide whether the result is still expected and deal with the fallout from that. This is certainly an interesting way to approach the abstration.

The other is the atomic instances. These were described as being like volatiles but better, as one had atomic operations on them.

I do not know if this made it to the documentation or not. It was said that the Lock interface was useful in J2SE 5.0, but might not be so useful after that. Apparently, the synchronized keyword support in later versions of the VM is much better. It was said that the performance gains obtained through the use of the Lock interface became less notable after the fixes to synchronized. This is probably a good thing to know.

I'll try to update this every day and find some of the things that are not hype. I do not try to go to a lot of sessions. I find one learns more by talking to people, keeping one's ears open and like that. One also has time for a few sessions with the new first-person shooters in the Games Lab. Not that I hang out there overmuch. Yeah, of course not....

If you're at the conference, I hope you are having fun and remember, if you can see them in your scope, you might already be dead.


Post a Comment

Subscribe to Post Comments [Atom]

<< Home