Sign in
Cyrus' Blather
Translate This Page
Translate this page
Powered by
Microsoft® Translator
Options
Blog Home
Email Blog Author
Share this
RSS for posts
Atom
RSS for comments
Search
Tags
No tags have been created or used yet.
Archive
Archives
November 2005
(1)
October 2005
(2)
September 2005
(11)
August 2005
(3)
July 2005
(5)
June 2005
(17)
May 2005
(8)
April 2005
(36)
March 2005
(30)
February 2005
(5)
January 2005
(7)
December 2004
(4)
November 2004
(5)
October 2004
(6)
September 2004
(16)
August 2004
(25)
July 2004
(35)
June 2004
(77)
May 2004
(73)
SF/JavaOne, Day 3, Java 1.6 Collections
MSDN Blogs
>
Cyrus' Blather
>
SF/JavaOne, Day 3, Java 1.6 Collections
SF/JavaOne, Day 3, Java 1.6 Collections
CyrusN
29 Jun 2005 1:38 AM
Comments
11
I got to go see the BirdsOfAFeather talk with Josh Bloch concerning the new collection in Java1.5 (which you can read about:
here
) and the upcoming collections they have planned for the future (which you can read about:
here
). I've long been a fan of the java collections and i've found that they've normally held a good balance between simplicity and power. It's actually a case of "Goldilocks and the Three Bears" for me. stl is too complex and painful to use, .Net is too simplistic and limited in power, whereas java get's it just about right. It's not perfect, but it's flexible enough to handle almost anything you'd ever need. I always found the deep use of abstractions to be enormously helpful for writing your own special collections while only writing 1/10th or evern 1/100th of the code necessary to implement the full interface. It's also not cluttered with a gazillion interfaces like i've seen in other packages which isn't especially helpful in a language like java which doesn't have unions.
However, it's starting to seem like the new collections are starting to buckle under their own weight in recent java releases. With the
java.util.concurrent
package it seems like the number of collections grew enormously with new axes of concurrent access and blocking access being threaded through (no pun intended) every type of collection and interface. In my experience, having a collection surrounded by a
reader/writer lock
usually fit the bill just fine. Of course, i only ever had to handle a couple of hundred threads at a time, and it's quite possible that to be able to scale to thousands better and deeper integration of lock-free data structures are really needed. I also question the need for skip lists to be introduced into the core collection implementation methods. I think it's important to provide core implementations that offer linear, logarythmic and amortized-constant/constant time performance with the associated benefits and drawbacks. But i don't see why
skip-lists
are needed in the core collections, but i suppose the fact that Bill Pugh is on the JSR166 expert group might have something to do with it.
However, i shouldnt' knock it until i've tried it. I'll have to dig up my massively overthreaded web app that i built at one point and see if these new collections can make that code much simpler, safer, easier to understand, and possibly faster. If it achieves any of those benfits without any significant drawbacks, then i guess it will have been worth it.
11 Comments
Blog - Comment List MSDN TechNet
Comments
Loading...