BT

xSocket Aims to Keep NIO Simple

by Craig Wickesser on Apr 30, 2008 |
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.

Hello stranger!

You need to Register an InfoQ account or to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2013 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT