JBoss Community

View post: Shiny new remoting layer for JBM

Shiny new remoting layer for JBM

Posted on 2008-07-31 09:53:00.0 by Tim Fox [ View original post ]

I've just completed a refactoring of our JBoss Messaging remoting layer.

This is a thin layer that sits between the majority of the JBM core code and the actual transport provider (E.g. Apache MINA).

Most of the leg-work is done in our remoting layer - ordering of sessions, pinging (heartbeats) etc.

The core remoting code now has zero dependencies on any particular transport provider. This means we can easily plug-in different providers with the minimum of pain - e.g. Apache MINA, Trustin Lee's Netty 3, and David Lloyd's XNIO.

Integrating a new transport provider is simple. JBM provides a spi (service provider interface) set of interfaces that need to implemented for each transport provider. Once that is done, you just add the ConnectorFactory and AcceptorFactory class names to the config file and you're done.

The implementations of the spi interfaces are typically very simple, since all the generic code is in our remoting layer and doesn't change.