Chad Remesch bio photo

Chad Remesch

Entrepreneur, developer, and software engineer

Email LinkedIn Github

Recently I put together two new Ruby gems called Tribe EM and Tribe EM AMF Socket.  Both gems build on top of my Tribe gem.

Tribe EM bridges the gap between Tribe and EventMachine.  Currently it provides basic TCP server functionality for Tribe actors.  My intent is to use this as a base for implementing higher-level protocols such as HTTP.

Tribe EM AMF Socket is a wrapper around my existing AMF Socket - Ruby gem.  Currently it only supports messages and not requests (RPC).  I believe this to be a reasonable limitation for now since AMF Socket messages fit in very well with Tribe's asynchronous messaging system.

One key difference between the two gems is what I refer to as native vs wrapper implementations:

Native: The Tribe::EM::Connection class is considered native since it pushes the higher level protocol implementation onto the actor threads.  This results in greater scalability since actors take advantage of multi-core systems (especially on JRuby).

Wrapper: The Tribe::EM::AmfSocket::Connection class is considered a wrapper since it wraps the AMF Socket gem for use with Tribe.  This means that a lot of work (serialization, deserialization, framing, keep alives, etc) are all performed on the EventMachine thread.  The result is lower performance than a native implementation, but less coding since I can reuse the existing Ruby implementation of AMF Socket.

Both gem are designed to be easily customized.  Feel free to contact me with your custom protocol implementations so that I can add them to the Tribe EM homepage.