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