fluffle

An implementation of JSON-RPC over RabbitMQ through the Bunny library. Provides both a client and server.

A group of baby bunnies is called a fluffle.

Features

  • Client: Thread-safe blocking client (via concurrent-ruby)
  • Server: One-thread-per-queue implementation (multi-threaded coming soon)
  • Server: Easy-to-use built-in handlers and straightforward API for building custom handlers

Examples

See the examples directory.

The server provides a few options for handling RPC requests:

  • Dispatcher pattern: dispatcher.handle('upcase') { |str| str.upcase }
  • Delegator pattern: delegate will receive the #upcase message with a single argument (the string)
  • Custom: any handler needs to implement the API described in Fluffle::Handlers::Base

License

Released under the MIT license, see LICENSE for details.