Tuesday, October 09, 2007

JUNG - Java Universal Network/Graph Framework

Lately I played around with JUNG on an applet, doing visual modeling of networks. Knowing where I work lives a little room for guesses of the type of networks ;-)

Few reasons why I liked JUNG:
* Good generics utilization
* Fantastic plugability of views, model objects, grouping algorithms
* Flexibility and good separation of concerns
* The visualization runs on both desktop apps and applets.

Working with JUNG was a real pleasure, but had lots of drawbacks. First and foremost I have to mention that I used version 2.0 which is still in its beta. It reacted as a beta would react:
* Trowed NPEs when under pressure.
* Had problems with frequent updates to the graph (using the Swing update thread).
* Didn't scale good with dense networks with more then a hundred nodes.
* Very heavy on the CPU.

As a good open source user I know I should report the bugs and suggest patches. Promise I'll do it when I'll get back to it.
The bottom line is that it gave me a bad taste in the mouth about using Applets for intensive graphics and computing applications.

I'll give it a second round when JUNG 2.0 will finalize (anyone know when?), but unfortunately it looks like that in this case Java should stay in the backend and let Flash or similar technology run the browser side.

6 comments:

Joshua January 23, 2008 at 9:07 AM  

Hey, Eishay. One of the other JUNG developers noticed your post, so I thought I'd respond briefly.

I'm glad to hear that JUNG works well for you in at least some respects.

Yes, JUNG 2.0 is still in alpha; recently I've just switched jobs to one which should give me more time to work on it. (It hasn't helped that my home machine was out of commission for a few months with a busted HD.)

We'd definitely like to know about any bugs that you turn; please post information to the web forum.

The main problem with the scaling--and I should emphasize that the scaling problems you experienced are almost certainly related to visualizations, not analysis--is that our existing layout algorithms aren't the most efficient implementations. This is a known problem that we intend to address as time and resources allow. So the problem there is not really Java-related, per se.

Anyway, we look forward to your feedback on the forum.

Eishay Smith January 23, 2008 at 9:33 AM  

Thanks Joshua, I will.

Since the last post I've made another application using JUNG and had more problems related to multi threading (triggered an infinite loop in SpringLayout.calculateRepulsion).
Its great that the library is so extensible and I did took advantage of that.

Anyway, JUNG is great and I'm sure it will be much better.

Joshua January 23, 2008 at 9:51 AM  

Hmm. Yeah, definitely bring that to the forum; Tom Nelson is more conversant with those kinds of issues than I am.

sandeep November 17, 2008 at 10:29 PM  

Hi, I am new to using jung can any one tell me how to accept and excel sheet as input which i made and to convert that into graph using jung.

Herli Menezes January 21, 2010 at 11:14 AM  

Hello, Joshua.

I need to get some expertise on JUNG, do you recommend any resource to study from the beggining?

Thanks.

Joshua O'Madadhain January 21, 2010 at 11:23 AM  

Herli (and anyone else that's reading this post): please do not post JUNG questions here. This is what the JUNG web forum and mailing list are for. We'll be happy to answer questions posted there.

Creative Commons License This work by Eishay Smith is licensed under a Creative Commons Attribution 3.0 Unported License.