Project

distribot

0.0
No commit activity in last 3 years
No release in over 3 years
Distributed flow engine based on redis and rabbitmq
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

Distribot

Code Climate Test Coverage

Stream processing engine for Ruby.

Features

  • Built on RabbitMQ and Redis.

robot

Installation

In your Gemfile

gem 'distribot'

Usage

require 'distribot'

Distribot.configure do |config|
  config.redis_url = ENV['DISTRIBOT_REDIS_URL']
  config.rabbitmq_url = ENV['DISTRIBOT_RABBITMQ_URL']
end
{
  "name": "search",
  "phases": [
    {
      "name": "pending",
      "is_initial": true,
      "transitions_to": "searching"
    },
    {
      "name": "searching",
      "transitions_to": "fetching-pages",
      "handlers": [
        "GoogleSearcher",
        "BingSearcher"
      ]
    },
    {
      "name": "fetching-pages",
      "transitions_to": "finished",
      "handlers": [
        {
          "name": "PageDownloader",
          "version": "~> 1.2"
        }
      ]
    },
    {
      "name": "finished",
      "is_final": true
    }
  ]
}

TODO

Features

  • Ability to control running flows
    • cancel
    • pause
    • resume
  • Handler versioning
    • semver
    • specify handler versions in flow definitions
      • similar to gemfile

Organization

  • Break this project into smaller parts.
    • gem code
      • should not require infrastructure to run tests
      • enough infrastructure to run the code
    • small running environment which uses the gem
      • engine (Dockerfile.thin)
      • worker
      • controller
      • infra
        • redis
        • rabbitmq
        • elasticsearch
        • kibana
  • status dashboard
    • show running flows
    • create a new flow

Notes

Clear out queues:

sudo rabbitmqctl list_queues | grep distribot | awk '{print $1}' | xargs -I qn rabbitmqadmin delete queue name=qn