Pyrasun EmberIO

EmberIO is a high-performance Java library for managing and performing I/O.

See:
          Description

Packages
pyrasun.eio The pyrasun.eio package is the main package for the EmberIO library, and contains the core EmberIO classes.
pyrasun.eio.handlers The handlers package contains the EIOEventHandler abstract base class, and all of the default concrete implementations of EIOEventHandler.
pyrasun.eio.helpers This package defines helper classes which make common EIO tasks easier to accomplish than is the case with the core EIO classes, which are sometimes a bit too generic and daunting to the semi-casual EIO user.
pyrasun.eio.protocols.bytearray This package contains the bytearray protocol.
pyrasun.eio.protocols.object An EmberIO protocol used for sending Serialized objects around.
pyrasun.eio.protocols.string The incredibly stupid and (almost) worthless string protocol.
pyrasun.eio.services The services package defines various services that EmberIO supports.
pyrasun.eio.services.bytearray  
pyrasun.eio.services.generic  
pyrasun.eio.services.object  
pyrasun.eio.services.telnet  
pyrasun.eio.util Everybody who's anybody has got a 'util' package, and EIO is no exception.

 

EmberIO is a high-performance Java library for managing and performing I/O. It's main features include:

The biggest bang for the buck you'll get out of EmberIO is in the buffer management, built-in support for a variety of threading models, and generally extracting the pain out of using NIO intelligently. In addition, note that while one of the initial motivations behind EmberIO is to make using NIO easier, it is being expanded to handle non-NIO I/O resources as well.

One of the most interesting EmberIO features is the threading model support - it offers a boatload of them, each of which is targetted towards different I/O scenarios. Almost any scenario may be configured to be used in either a blocking or non-blocking manner (with a few exceptions where the model constrains you to one or the other). On top of this, EmberIO supports both traditional blocking Java I/O semantics (which I'll call BIO here - thanks to James Strachan for keying me on this term!) and newer NIO asynchrous/multiplexed/non-blocking semantics (which I'll just call NIO).

A non-exhaustive list of threading models include: The above models are configurable per connection type. So, for example, you could configure one type of connection using the DEDICATED_READER strategy for the lowest possible latency, and another type of connection could be configured for USE_RWP_POOLS where many connections are expected with variable I/O sizes, some of them potentially large.

In addition to the various threading models, EmberIO includes a few other features to help the developer tune the model towards the best balance of resource usage/throughput/latency that matches their needs. Most of these are configurable, but a few are hard-coded into the library to work around known NIO (or plain BIO issues) and boost performance.

One thing to keep in mind about EmberIO is that all features are to some extent intertwined, and some features negate the use of others. As one example, use of DEDICATED_READER effectively negates the greedy operations feature, since DEDICATED_READER channels bypass the Selector entirely. Keep this in mind when you're trying out the various EmberIO configruations, and above all use your head! For more information, see NOTES.txt in the main distribution directory for a more complete outline of what EmberIO's motivation is and what problems its intended to solve. This is an early text version of the blog entry first describing EmberIO in detail. See also DEEP_THOUGHTS.txt, in the same directory, for a much more in-depth explanation of EmberIO - what it does, what the classes are, how to use it, and some exploration into the source code.

Since:
EmberIO 0.3 Alpha


Pyrasun EmberIO