InfoQ

News

xSocket Aims to Keep NIO Simple

Posted by Craig Wickesser on Apr 30, 2008 08:45 PM

Community
Java
Topics
Release
Tags
xSocket ,
Java SE ,
NIO
Gregor Roth recently released xSocket 2.0, a NIO-based Java library for building high performance and scalable networking applications. InfoQ had an opportunity to interview Gregor and touch on the history of xSocket, the latest release and future plans for the library.

InfoQ: What is the history of xSocket?

Gregor Roth: The initial version of xSocket is a spin-off, of a high performance SMTP server evaluation project. The common, NIO-related network code has been reimplemented as xSocket. In July 2006 the first public version of xSocket (V0.8) has been released. With xSocket 1.0 the API has been completely redesigned. The later versions of xSocket (V1.1 and 1.2) enhanced the API by adding new methods, classes and functionality.

InfoQ: What are the major new features or bug fixes in 2.0?

GR: Beside minor changes, renaming and removed deprecated artefacts, the xSocket v2.0 main API is equals to the xSocket V1.2 API. The most important changes are the new extension modules and the reimplemented internal components.

Major issues of xSocket V2.0 are:

  • [API] API-cleaning by removing deprecated artefacts and minor changes.
  • [API] New execution annotation support. Based on the new execution annotations the user can define if the call back methods of his network handler should be executed in single threaded mode or multithreaded mode.
  • [Deployment] xSocket binaries are now OSGi conform
  • [Monitoring] Improved JMX-Monitoring
  • [Performance] Significant performance improvements by reimplementing xSocket's low-level code
  • [SSL] reimplemented SSL support
  • [Resources] Improved suspend and resume read support by auto detaching and reattaching the socket's SelectionKey to the Selector, which reduces the resource requirements.
New extension modules (early access):
  • xSocket-multiplexed, supports running several logical connections on the top of one physical TCP connection.
  • xSocket-http, supports writing synchronous and asynchronous HTTP client and server components. xSocket–http includes a HttpClient and helps to write event based HTTP network components such as HTTP proxies or COMET server applications by providing an asynchronous, streaming API.

InfoQ: What are the future plans for xSocket?

GR: Socket 2.x:

  • Further performance optimizations (improved NIO-level file streaming support, ...)
  • [xSocket-http] improved COMET support (supporting the Bayeux protocol, …)
The next major version of xSocket (V3.0) will use NIO.2 features (NIO.2 will be part of JSE 1.7).

InfoQ: Any integration plans with JBoss, Glassfish, etc, similar to what Grizzly has done?

GR: Currently no specific integrations are planned.

If you have any questions about xSocket or would like to provide feedback to Gregor, he can be contacted via email at gregor DOT roth AT googlemail DOT com. You can also find more information about using xSocket for Asynchronous HTTP and Comet Architectures.

No comments

Watch Thread Reply

Educational Content

Bindings, Platforms, and Innovation

This presentation focuses on the Internet and separating myth from fact, history from the future, and the mundane from the imaginative. Bob Frankston presents a vision of what could and should be.

Orchestrating Long Running Activities with JBoss / JBPM

This article explores the use of JBoss and jBPM to implement design solutions that effectively address the issue of orchestrating long running activities.

Neo4j - The Benefits of Graph Databases

This presentation covers the use of graph databases as an optimal solution for data that is difficult to fit in static tables, rapidly evolving data or data that has a lot of optional attributes.

Realistic about Risk: Software development with Real Options

This session introduces Real Options and shows how it can help in running your project. Real Options is a decision-making process that can be used to manage risk.

Communication Flexibility Using Bindings

This article discusses the use of bindings on services and references (including the instance of non-configured bindings) as the means to implement SCA communications in a Web and SOA environment.

Writing DSLs in Groovy

After a short introduction to DSLs, Scott Davis plays with the keyboard showing how to approach the creation of a DSL by typing working snippets of Groovy code that get executed.

Scaling Agile with C/ALM (Collaborative Application Lifecycle Management)

IBM Rational and InfoQ present, Scaling Agile with C/ALM, an eBook showing organizations how to become “finely tuned software delivery machines” by enabling team integration and scaling.

Concurrent Programming with Microsoft F#

Amanda Laucher presents a real life enterprise application written in F#. She shows actual code snippets, explaining design decisions and suggesting how to use some of the F# constructs.