quarks-edge / quarks

Quarks is an open source programming model and runtime for edge devices that enables you to analyze data and events at the device.
http://quarks-edge.github.io/
Apache License 2.0
123 stars 42 forks source link

Add pub-sub model between jobs #92

Closed ddebrunner closed 8 years ago

ddebrunner commented 8 years ago

Allow a running job to publish tuples that can be subscribed to by other running jobs.

Method in TStream:

<U super/extends T> TSink<T> publish(String topic, Class<U> streamType)

Method in Topology

TStream subscribe(String topic, Class streamType)` This would be tied with a `PublishSubscribe` service that can be added to a provider. Initial implementation would allow pub-sub within provider.
ddebrunner commented 8 years ago

This is related to #68

dlaboss commented 8 years ago

Why extend Topology and TStream instead of just defining a new connector?

ddebrunner commented 8 years ago

Good question.

My first reaction is that publish/subscribe is inherently part of the provider/runtime, therefore not a connector.

But a connector may make more sense, I'll think about it for a while.

ddebrunner commented 8 years ago

Pull request #98 implements pub/sub using the connector style suggested by @dlaboss