Distribot
Stream processing engine for Ruby.
Features
- Built on RabbitMQ and Redis.
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 flowscancelpauseresume
-
Handler versioningsemver-
specify handler versions in flow definitionssimilar to gemfile
Organization
- Break this project into smaller parts.
- gem code
should not require infrastructure to run testsenough infrastructure to run the code
- small running environment which uses the gem
-
engine(Dockerfile.thin) - worker
- controller
-
infraredisrabbitmqelasticsearchkibana
-
- gem code
-
status dashboardshow running flowscreate a new flow
Notes
Clear out queues:
sudo rabbitmqctl list_queues | grep distribot | awk '{print $1}' | xargs -I qn rabbitmqadmin delete queue name=qn