Metanotion Java Utils

This is a collection of classes and interfaces, generically useful in many of our projects.

For the rest of Metanotion Software's services and products, please visit our homepage.

This is a catch all project, mostly centered around classes and interfaces that are generically reusable, and have little in the way of a common theme. A lot of these classes are oriented around interfaces for describing delegation and dynamic invokation patterns, IO utility classes, and collections. The collection of classes in this project is not guaranteed to be stable, as any group of classes or pattern of objects may evolve to deserve a separate library. However, if we remove classes, the new projects which these classes graduate to will be listed here as well.

A note on style: We prefer interfaces and delegation to inheritance. Generics are to be used extensively. Constructors shoul be used to support a constructor injection style (Pico Container is our preferred dependency injection framework). Static methods and static variables are to be avoided. Final instance variables are preferred. Thread Safety, composability and java.util.concurrent.* are important, and synchronized methods are "bad". Reflection is generally "bad".

There is a time and place for everything, the preceding "style list" is more about the mindset this code was developed for. Also, we make mistakes, so not all of this is reflected 100% in the code. Doing everything completely different from that lis is fine too, just not in this project, today, well, at least, sometimes. There's always an exception to the rule.

Highlights

RPC Server

In this release, we have included the "batteries included" part of our RPC package based on Apache MINA(net.metanotion.rpc). These classes contain almost everything needed to run your on client/server asynchronous message passing RPC system that works over the open internet. However, in order to use the full package you will need our IDL compiler available here: http://www.metanotion.net/software/idl. This is currently in its initial public release and contains some similarities to Google Protocol Buffers and Facebook Thrift. Note that this is used in a manner similiar to RMI, except it is entirely based on an abstract interface, non-blocking, and more of a message passing style(all methods in the interface have a void return type). This RPC package is a set of convenience classes to connect Apache MINA to the generated de/serialization code from the IDL compiler and create a server or client. Interfaces are identified by the MD5 of a "canonicalized" representation of the interface definition, and demuxing of raw requests is based determined by this hash.

Numerics

The net.metanotion.numerics package is also in this release. This is a port of code written in C for a course in Iterative Solutions to Large Sparse Systems of Equations. If you are interested in multigrid solvers, and matrix preconditioners, you may find this code interesting. This port will be expanded on in the future, and is a candidate for being moved to a separate project in due time.

Server

The net.metanotion.server package represents a set of interfaces describing a generic "application server", and are used both in the RPC framework, and the web framework(http://www.metanotion.net/software/web). These interfaces and classes also set up a finite state machine based model of session handling, rather than the "Map<String,Object>" more commonly seen. Basically, a session represents a cell holding the current state, and that state is a reference to an instance of a class. State transitions replace this instance with new values, and any specific values that need to be preserved are handled opaquely within the state class. Furthermore, the Session "demutiplexes" requests to it via a "I theInterface(Class<I> interface);" method delegated to the State object it contains. (this works, in a loosely similar manner to the "IUnknown" interface if you have ever used MS COM...).

The project

To Do List

While normally people would say "volunteers welcome", several of these cryptic notes are more for internal reference.

General

Specific Classes

Last Update: December 8th, 2008.