https://github.com/bringhurst/balancemq
An API for self-stabilization algorithms.
https://github.com/bringhurst/balancemq
Last synced: about 2 months ago
JSON representation
An API for self-stabilization algorithms.
- Host: GitHub
- URL: https://github.com/bringhurst/balancemq
- Owner: bringhurst
- Created: 2013-01-12T19:17:52.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2013-04-29T21:39:08.000Z (about 13 years ago)
- Last Synced: 2026-01-02T15:19:09.974Z (6 months ago)
- Language: Shell
- Homepage: http://www.balancemq.com/
- Size: 6.21 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
BalanceMQ
=========
BalanceMQ is a continuous workload balancer that knows how to efficiently and automatically distribute work evenly among many (tens of thousands) of servers with minimal communications overhead (see [this paper](https://dl.acm.org/citation.cfm?id=2389114) for a description of the algorithm used).
This program is still in development, please come back later if you want to use it for a production need.
Example
-------
This example is a distributed treewalk of a filesystem hierarchy using the STOMP interface. Assuming the underlying filesystem is parallel (i.e. has multiple read heads), this will distribute and balance the stat(2) workload among many nodes.
```
import sys
import stomp
conn = stomp.Connection()
class TreewalkListener(object):
def on_error(self, headers, message):
print 'received an error %s' % message
def on_message(self, headers, message):
if os.path.isfile(message):
print 'F: %s' % message
if os.path.isdir(message):
print 'D: %s' % message
for file in os.listdir(message):
conn.send(file, destination='/queue/treewalk_example')
conn.set_listener('', TreewalkListener())
conn.start()
conn.connect()
conn.send(sys.argv[1], destination='/queue/treewalk_example')
conn.subscribe(destination='/queue/treewalk_example', ack='auto')
conn.disconnect()
```
Build Status
------------
The current build status is [](https://travis-ci.org/fintler/balancemq).