Wednesday 14 July 2010

JXTA/JXSE 2.6 is out

After more than a year of hard work, JXSE 2.6, the Java implementation of the JXTA protocols, is finally out.

"Euh... what is JXTA again? Remind me? Ooooh yeah, that P2P Open Source project started by Sun Microsystems in 2001!!! I remember... super-hard to make work, somehow buggy, poor documentation. I couldn't understand the behavior under the hood. Had high hopes, gave it a try, finally gave up! Well, what's new with that?"

The 2.6 release has been an opportunity to start resorbing the huge technical debt accumulated in the code. We started by trimming tons of dead code and refactoring tons of other to make it more readable. There is still more to come. One sequential bit at-a-time.

That is not all:
OSGi
It is now possible to start the JXTA network as an OSGi bundle. The Apache Felix OSGi implementation has been integrated in JXSE as a dependency and can be used as the standard OSGi framework.

Task Manager
In order to reduce the consumption of threads and other resources, a single task manager object has been implemented to use a single thread group. Serious impact on performance. Can run 300 peergroups on a MAC smoothly.

Cache Manager
New implementations of the cache manager based on Apache Derby, H2 or Berkeley DB are now available. These can replace the current standard b-tree file system implementation. No more of those small files on your drive. Advertisement fetching is now much faster overall.

Configuration Objects
Easy to use configuration objects, based on the Properties Java class, are now available to set-up the NeworkManager. These can be easily saved and loaded from XML documents.

Connectivity Methods
A new set of monitoring methods between EDGE, RENDEZVOUS and RELAY has been implemented. Now, a peer can really know where it stands in the network.

New TCP Implementation
A new implementation of the TCP layer based on the NIO Netty has been implemented. The intention is to NOT re-invent the wheel any further and delegate what can be delegated to existing performing libraries.

Documentation
Finally, a long awaited relatively comprehensive documentation of what is happening 'under the hood' has been made available in the new Programmer's Guide. The code remains somewhat of a maze, but this time we have a map to dodge the Minotaur.

Maven
And last but not least, we are finalizing the migration of the project to Maven. Artifacts will be posted in an open source repository offered by Sonatype. Soon, continuous integration will not be a dream anymore.
This comes on top of solving a long series of small bugs, including a nasty lurking one when attempting to establish a connection between NAT-ed peers. It just would not work.

"So, what's next?" - Well, we are looking forward at finishing the migration from Java.net to Kenai, a new HTTP protocol, more refactoring that will speed-up the code, implementing NAT traversal for TCP and running multiple peers in the same JVM. The latter is the last missing link to a full test driven development environment. This has prevented us from implementing a complete set of JUnit tests. All remaining issues are now well-identified and just need to be processed one by one.

JXTA/JXSE 2.5 is still part of Glassfish. Sun has lowered its participation to the project since the end of 2008, but some individuals remained very active in participating to the knowledge transfert. We don't know what the participation of Oracle will be. The possibility of moving to Apache has been raised.

"Any books?" - For those who do not want to go through the programmer's guides, the JXTA protocols specifications, Googling and trying to run obsolete examples found on the net, I have revised the first edition of Practical JXTA.

This book is an introduction to JXTA, JXSE and P2P for software engineers. It contains a new chapter covering NAT traversal issues.

3 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Hello there,
    first: jxta is a great concept, and you seem to be a driving force for the enourmous progress since 2.5. thanks for that.
    However, no mention of jxta for some time... is jxta development continuing? considering it for a research project.
    regards,
    Ingvar

    ReplyDelete
  3. Hi Greenhorn, sorry for the late reply, I have not been visiting my blog for some time.

    Story is: JXTA 2.7 is now out (see http://jxse.kenai.com). Oracle is not being fair play with the JXTA community and this has made many members angry. We have considered moving to Apache, but we are stuck in a legal limbo zone...

    I have put an end to leading the JXTA effort in March 2011. I have started the Chaupal project on Google code to implement a new P2P framework implementation instead.

    ReplyDelete