Wishbone

A Python framework to build event stream processing servers

https://github.com/smetj/wishbone

What?

Wishbone is a Python framework for building servers to read, process and write infinite event streams by combining and connecting modules into a processing pipeline through which structured data flows, changes, triggers logic and interacts with external services.

Wishbone can be used to implement solutions for a wide spectrum of tasks from building mashup enablers and ETL servers to CEP and stream processing servers.

Wishbone comes with a set of useful builtin event and lookup modules with many more external modules available and ready to be used.

The goal of the project is to provide a simple and pleasant yet solid and flexible framework which provides the user a toolbox to be creative building custom solutions with minimal effort and development time.

How?

Servers can be created directly in Python or by bootstrapping an instance using a YAML file directly from CLI.

The following “hello world” example creates a server which continuously prints “Hello world!” to STDOUT.

For this we connect wishbone.input.testevent to wishbone.output.stdout:

In Python

from wishbone.module.testevent import TestEvent
from wishbone.module.stdout import STDOUT
from wishbone.router import Default
from wishbone.actor import ActorConfig

input_config = ActorConfig("input")
output_config = ActorConfig("output")

router = Default()
router.registerModule(TestEvent, input_config, {"message": "Hello world!"})
router.registerModule(STDOUT, output_config)
router.connectQueue("input.outbox", "output.inbox")
router.start()
try:
    router.block()
except KeyboardInterrupt:
    router.stop()

Using a bootstrap file

modules:
  input:
    module: wishbone.input.testevent
    arguments:
      message : Hello World!

  stdout:
    module: wishbone.output.stdout

routingtable:
  - input.outbox            -> stdout.inbox

The server can be started and stopped using the wishbone CLI:

$ wishbone debug --config hello_world.yaml