Retina (Work in Progress)

NOTE: this specification is a work in progress.

Retina is an fast asynchronous generator of callbacks (webhooks) to external providers.

Retina is responsible for:

  • Subscribing and listening to a stream of incoming events that are assumed to be compatible with JSON/Hash semantics.
  • Optionally, applying a set of filters and transformations to the payload to either select desired attributes, or remove the undesired attributues, or both.
  • Determining the destination of a particular payload using a configurable and easily swappable way, possibly caching it.
  • Delivering the payload over HTTP(s) exactly once successfully
    • If error occurs, retrying the payload using a decaying frequency function.
    • HTTP delivery should be non-blocking and happen in parallel.
  • Recording each delivery attempt in an append-only log for auditing and querying
    • Offering JSON API endpoint for fetching a paginated list of HTTP delivery attempts filtered by attributes in the payload.

Installation

Add this line to your application's Gemfile:

gem 'retina'

And then execute:

$ bundle

Or install it yourself as:

$ gem install retina

Usage

Work in progress.

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/kigster/retina.

License

The gem is available as open source under the terms of the MIT License.