blob: 6105e9e1b628e9d1c45920fcfbb6072f6692eea1 [file] [log] [blame]
Ralph Knag1fca6ac2017-12-05 12:05:57 -05001.. This work is licensed under a Creative Commons Attribution 4.0 International License.
2.. http://creativecommons.org/licenses/by/4.0
3
4.. _streams-grid:
5
6Streams Formatting Quick Reference
7==================================
8
9Each of the following tables represents an example of a publisher and
10its subscriber, which are of course, different components. This focuses
11on the fields that are different for each of these TYPEs, to
12illustrate the relationship between ``config_key``, dmaap connection
13object, and the generated configuration. Some notes on specific
14properties:
15
16- ``config_key`` is an arbitrary string, chosen by the component
17 developer. It is returned in the generated configuration where it
18 contains specific values for the target connection
19- ``format``, ``version``, and ``type`` properties in the subscriber
20 would match these properties in the publisher
21- ``aaf_username`` and ``aaf_password`` may be different between the
22 publisher and the subscriber
23
24Using http
25~~~~~~~~~~
26
27*Publishing Component*
28^^^^^^^^^^^^^^^^^^^^^^
29
30+-----------------------------+----------------------------------------+
31| component \ | runtime platform generated config |
32| spec | |
33+=============================+========================================+
34| "streams":{   | "streams_publishes":{  |
35| "publishes":[{ | "prediction":"10.100.1.100:32567/data" |
36| "config_key":"prediction", |
37| "format":"some-format", | |
38| "type":"http", | |
39| "version":"0.1.0"   } | |
40| ]} | |
41+-----------------------------+----------------------------------------+
42
43*Subscribing Component*
44^^^^^^^^^^^^^^^^^^^^^^^
45
46+-----------------------------+----------------------------------------+
47| component | runtime platform generated config |
48| spec | |
49+=============================+========================================+
50| streams”:{    | "N/A" |
51| "subscribes":[{ | |
52| "route":"/data", | |
53| "format":"some-format", | |
54| "type":"http" | |
55| "version":"0.1.0"   } | |
56| ]} | |
57+-----------------------------+----------------------------------------+
58
59Using Message Router
60~~~~~~~~~~~~~~~~~~~~
61
62.. publishing-component-1:
63
64*Publishing Component*
65^^^^^^^^^^^^^^^^^^^^^^
66
67Note: When deploying, this component should be deployed first so satisfy
68downstream dependencies. Refer to the force option in component run
69command for more information.
70
71+---------------+------------------------+-----------------------------------------------------------------------------+
72| component \ | Dmaap Connection \ | runtime platform generated \ |
73| spec | Object | config |
74+===============+========================+=============================================================================+
75| streams”:{  | {     “dmaap_info”: | streams_publishes”:{    |
76|     “config_k\| {} \ *Note: For \ | aaf_username”:“pub-user”,   |
77| ey”:“mr_out\ | message router, this \ |   “type”:“message_router”,   |
78| put”,     “t\ | object is identical \ |      “topic_url”:"https://we-are-message-router.us:3905/events/some-topic"\ |
79| ype”:“messag\ | for the publisher and \| "streams_subscribes":{...} |
80| e_router”,   | the subscriber* | |
81|  }]} | | |
82+---------------+------------------------+-----------------------------------------------------------------------------+
83
84*Subscribing Component*
85^^^^^^^^^^^^^^^^^^^^^^^
86
87+---------------+------------------------+-----------------------------------------------------------------------------+
88| component \ | Dmaap Connection \ | runtime platform generated \ |
89| spec | Object | config |
90+===============+========================+=============================================================================+
91| streams”:{  | {     “dmaap_info”: | streams_publishes”:{…}, |
92|     “config_k\| {} \ *Note: For \ | streams_subscribes”:{    |
93| ey”:“mr_inp\ | message router, this \ | aaf_username”:“sub-user”,   |
94| ut”,     “ty\ | object is identical \ |   “type”:“message_router”,   |
95| pe”:“message\ | for the publisher and \|      “topic_url”:“https://we-are-message-router.us:3905/events/some-topic" |
96| _router”,    | the subscriber* | |
97| }]} | | |
98+---------------+------------------------+-----------------------------------------------------------------------------+
99
100Using Data Router
101~~~~~~~~~~~~~~~~~
102
103.. publishing-component-2:
104
105*Publishing Component*
106^^^^^^^^^^^^^^^^^^^^^^
107
108+---------------+-----------------------------------------------+-----------------------------------------------+
109| component spec| Dmaap Connection Object | runtime platform generated config |
110+===============+===============================================+===============================================+
111| streams”:{  | {    “dmaap_info”: { | streams_publishes“:{    ”typ\ |
112| config_key: |      “location”: | e“:”data_router“,       "location":"mtc00" |
113| dr_output" | “mtc00”,      | , |
114| , "type": | “publish_url”: | "publish_url“: |
115| data_r\ | "https://we-are-data-router.us/feed/xyz"\ | "http://we-are-data-router.us/feed/xyz" |
116| outer”,   }] | , | , |
117| } | log_url”:\ "log_url“:\ |
118| | \ | ”https://we-are-data-router.us/feed/xyz/logs" |
119| | "https://we-are-data-router.us/feed/xyz/logs"\| , |
120| | , | username“:”pub-user“, |
121| | username”: | publisher_id“:”123456\ |
122| | pub-user”,      | “}}, |
123| | password”: |  ”streams_subscribes“:{ |
124| | pub-password”,      | } |
125| | publisher_id”: | |
126| | 123456”}} | |
127+---------------+-----------------------------------------------+-----------------------------------------------+
128
129.. subscribing-component-1:
130
131*Subscribing Component*
132^^^^^^^^^^^^^^^^^^^^^^^
133
134+---------------+---------------------------------------------------+---------------------------------------------------------------------------+
135| component \ | Dmaap Connection \ | runtime platform generated \ |
136| spec | Object | config |
137+===============+===================================================+===========================================================================+
138| streams”:{  | {      “dmaap_info”: | streams_publishes”:{ }, |
139|     “config_k\| {      “location”: | streams_subscribes”:{       |
140| ey”:“dr_inp\ | mtc00”,      | type”:“data_router”,        |
141| ut”,     “ty\ | delivery_url”: |   “location”:“mtc00”, |
142| pe”:“data_ro\ | "https://my-subscriber-app.dcae:8080/target-path"\|          “delivery_url”:"https://my-subscriber-app.dcae:8080/target-path"\|
143| uter”, | \ | \ |
144|     “route”: | , | , |
145| “/target-pat\ |      password”: | \        |
146| h”} | sub-password”,      | username”:“sub-user”, |
147| | subscriber_id”: |          |
148| | 789012”}} | subscriber_id”:“789012”}} |
149+---------------+---------------------------------------------------+---------------------------------------------------------------------------+