|
|
| (29 intermediate revisions by the same user not shown) |
| Line 1: |
Line 1: |
| = Firebird -- Python based Streaming Framework = | | = [[Firebird/Introduction|Introduction]] = |
| <div class="toccolours mw-collapsible mw-collapsed expandable">
| | = [[Firebird/GettingStarted|Getting Started]] = |
| <div class="mw-collapsible-preview">Introduction</div>
| | = [[Firebird/Concepts|Concepts]] = |
| <div class="mw-collapsible-content">
| | = [[Firebird/Command Line Tools|Command Line Tools]] = |
| It is a python based streaming processing framework
| | = [[Firebird/Developer Guidelines|Developer Guidelines]] = |
| </div>
| | = [[Firebird/FAQs|FAQs]] = |
| </div>
| | = [[Firebird/Notes|Notes]] = |
| <p></p>
| |
| | |
| == APIs ==
| |
| <div class="toccolours mw-collapsible mw-collapsed expandable">
| |
| <div class="mw-collapsible-preview">Node</div>
| |
| <div class="mw-collapsible-content">
| |
| Represent a node in the pipeline. A node can have bunch of input ports and bunch of output ports. Each port has a unique name within the node.
| |
| | |
| Properties:
| |
| * name: the name of the node, it is unique within a pipeline
| |
| * INPUT: a dictionary like object, allowing you to get input port by name, e.g. <nowiki>node.INPUT["foo"]</nowiki> will return the input port with name "foo"
| |
| * input: the default input port, e.g. node.input
| |
| * OUTPUT: a dictionary like object, allowing you to get output port by name, e.g. <nowiki>node.OUTPUT["foo"]</nowiki> will return the output port with name "foo"
| |
| * output: the default input port, e.g. node.output
| |
| | |
| Methods:
| |
| <pre><nowiki>
| |
| on_message(self, name:str, data:Any)
| |
| | |
| This method will be called for this node to handle data point, data is a json object, name represent from which port the data is received.
| |
| </nowiki></pre>
| |
| | |
| | |
| <pre><nowiki>
| |
| def connect(self, *dest_ports:Union["Node", "Port"]) -> "Port"
| |
| | |
| # connect the default output port to a input port of a node
| |
| # if dest_port element is a Node, then the default input port is used
| |
| </nowiki></pre>
| |
| | |
| <pre><nowiki>
| |
| def emit(self, data:Any, name:str=DEFAULT_PORT_NAME)
| |
| | |
| # emit data to it's output port specified by name
| |
| </nowiki></pre>
| |
| | |
| | |
| </div>
| |
| </div>
| |
| <p></p>
| |
| | |
| <div class="toccolours mw-collapsible mw-collapsed expandable">
| |
| <div class="mw-collapsible-preview">Generator</div>
| |
| <div class="mw-collapsible-content">
| |
| </div>
| |
| </div>
| |
| <p></p>
| |
| | |
| <div class="toccolours mw-collapsible mw-collapsed expandable">
| |
| <div class="mw-collapsible-preview">Sink</div>
| |
| <div class="mw-collapsible-content">
| |
| </div>
| |
| </div>
| |
| <p></p>
| |
| | |
| <div class="toccolours mw-collapsible mw-collapsed expandable">
| |
| <div class="mw-collapsible-preview">Pipeline</div>
| |
| <div class="mw-collapsible-content">
| |
| </div>
| |
| </div>
| |
| <p></p>
| |
| | |
| <div class="toccolours mw-collapsible mw-collapsed expandable">
| |
| <div class="mw-collapsible-preview">RabbitMQ</div>
| |
| <div class="mw-collapsible-content">
| |
| </div>
| |
| </div>
| |
| <p></p>
| |