Abstracting Services in Ruby
Objectives
- Simplify service/client definitions.
- Anticipate new encoding, delivery and security requirements.
- Separate request/response encoding and delivery for composition.
- Elide deployment decisions.
- Integrate diagnostics and logging.
- Simplify integration testing.
Features
- One-way and two-way requests as Module or instance methods.
- Request support:
- Delayed requests.
- Request meta-data: UUID, Timestamp.
- Support for multiple request/response transports:
- File.
- Named Pipe.
- TCP.
- HTTP under WEBrick or as Rack application.
- Beanstalkd.
- ZeroMQ.
- Resque.
- Buffered transports.
- Broadcast transports.
- Fallback transports.
- Time-decaying retry and polling logic.
- Support for multiple encodings:
- Marshal.
- XML.
- JSON.
- YAML.
- Base64.
- ZLib.
- Chained encodings.
- Signed payloads.
Platform support
- CRuby 1.8.7
- CRuby 1.9.3-head
- CRuby 2.0-head
- JRuby 1.6.x (with JRUBY_OPTS=—1.9) IN-PROGRESS
Dependencies
- gem install zmq
- zmq 2.1.4 needs a zmq 2.x library.
- On OS X Macports: sudo port install zmq22.