summaryrefslogtreecommitdiffstats
path: root/docs/sections/components/component-specification/streams-grid.rst
blob: 6105e9e1b628e9d1c45920fcfbb6072f6692eea1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
.. This work is licensed under a Creative Commons Attribution 4.0 International License.
.. http://creativecommons.org/licenses/by/4.0

.. _streams-grid:

Streams Formatting Quick Reference
==================================

Each of the following tables represents an example of a publisher and
its subscriber, which are of course, different components. This focuses
on the fields that are ‘different’ for each of these TYPEs, to
illustrate the relationship between ``config_key``, dmaap connection
object, and the generated configuration. Some notes on specific
properties:

-  ``config_key`` is an arbitrary string, chosen by the component
   developer. It is returned in the generated configuration where it
   contains specific values for the target connection
-  ``format``, ``version``, and ``type`` properties in the subscriber
   would match these properties in the publisher
-  ``aaf_username`` and ``aaf_password`` may be different between the
   publisher and the subscriber

Using http
~~~~~~~~~~

*Publishing Component*
^^^^^^^^^^^^^^^^^^^^^^

+-----------------------------+----------------------------------------+
| component \                 | runtime platform generated config      |
| spec                        |                                        |
+=============================+========================================+
| "streams":{                 | "streams_publishes":{                  |
| "publishes":[{              | "prediction":"10.100.1.100:32567/data" |
| "config_key":"prediction",  |                                        |
| "format":"some-format",     |                                        |
| "type":"http",              |                                        |
| "version":"0.1.0"   }       |                                        |
| ]}                          |                                        |
+-----------------------------+----------------------------------------+

*Subscribing Component*
^^^^^^^^^^^^^^^^^^^^^^^

+-----------------------------+----------------------------------------+
| component                   | runtime platform generated config      |
| spec                        |                                        |
+=============================+========================================+
| “streams”:{                 | "N/A"                                  | 
| "subscribes":[{             |                                        |
| "route":"/data",            |                                        |
| "format":"some-format",     |                                        |
| "type":"http"               |                                        |
| "version":"0.1.0"   }       |                                        |
| ]}                          |                                        |
+-----------------------------+----------------------------------------+

Using Message Router
~~~~~~~~~~~~~~~~~~~~

.. publishing-component-1:

*Publishing Component*
^^^^^^^^^^^^^^^^^^^^^^

Note: When deploying, this component should be deployed first so satisfy
downstream dependencies. Refer to the –force option in component ‘run’
command for more information.

+---------------+------------------------+-----------------------------------------------------------------------------+
| component \   | Dmaap Connection \     | runtime platform generated \                                                |
| spec          | Object                 | config                                                                      |
+===============+========================+=============================================================================+
| “streams”:{   | {     “dmaap_info”:    | “streams_publishes”:{                                                       |
|     “config_k\| {} \ *Note: For \      | “aaf_username”:“pub-user”,                                                  |
| ey”:“mr_out\  | message router, this \ |   “type”:“message_router”,                                                  |
| put”,     “t\ | object is identical \  |      “topic_url”:"https://we-are-message-router.us:3905/events/some-topic"\ |
| ype”:“messag\ | for the publisher and \| "streams_subscribes":{...}                                                  |
| e_router”,    | the subscriber*        |                                                                             |
|  }]}          |                        |                                                                             |
+---------------+------------------------+-----------------------------------------------------------------------------+

*Subscribing Component*
^^^^^^^^^^^^^^^^^^^^^^^

+---------------+------------------------+-----------------------------------------------------------------------------+
| component \   | Dmaap Connection \     | runtime platform generated \                                                |
| spec          | Object                 | config                                                                      |
+===============+========================+=============================================================================+
| “streams”:{   | {     “dmaap_info”:    | “streams_publishes”:{…},                                                    |
|     “config_k\| {} \ *Note: For \      | “streams_subscribes”:{                                                      |
| ey”:“mr_inp\  | message router, this \ | “aaf_username”:“sub-user”,                                                  |
| ut”,     “ty\ | object is identical \  |   “type”:“message_router”,                                                  |
| pe”:“message\ | for the publisher and \|      “topic_url”:“https://we-are-message-router.us:3905/events/some-topic"  |
| _router”,     | the subscriber*        |                                                                             |
| }]}           |                        |                                                                             |
+---------------+------------------------+-----------------------------------------------------------------------------+

Using Data Router
~~~~~~~~~~~~~~~~~

.. publishing-component-2:

*Publishing Component*
^^^^^^^^^^^^^^^^^^^^^^

+---------------+-----------------------------------------------+-----------------------------------------------+
| component spec| Dmaap Connection Object                       | runtime platform generated config             |
+===============+===============================================+===============================================+
| “streams”:{   | {    “dmaap_info”: {                          | streams_publishes“:{    ”typ\                 |
| “config_key:  |      “location”:                              | e“:”data_router“,       "location":"mtc00"    |
| “dr_output"   | “mtc00”,                                      | ,                                             |
| , "type":     | “publish_url”:                                | "publish_url“:                                |
| “data_r\      | "https://we-are-data-router.us/feed/xyz"\     | "http://we-are-data-router.us/feed/xyz"       |
| outer”,   }]  | ,                                             | ,                                             |
| }             | “log_url”:\                                   | "log_url“:\                                   |
|               | \                                             | ”https://we-are-data-router.us/feed/xyz/logs" |
|               | "https://we-are-data-router.us/feed/xyz/logs"\| ,                                             |
|               | ,                                             | ”username“:”pub-user“,                        |
|               | “username”:                                   | ”publisher_id“:”123456\                       |
|               | “pub-user”,                                   | “}},                                          |
|               | “password”:                                   |  ”streams_subscribes“:{                       |
|               | “pub-password”,                               | … }                                           |
|               | “publisher_id”:                               |                                               |
|               | “123456”}}                                    |                                               |
+---------------+-----------------------------------------------+-----------------------------------------------+

.. subscribing-component-1:

*Subscribing Component*
^^^^^^^^^^^^^^^^^^^^^^^

+---------------+---------------------------------------------------+---------------------------------------------------------------------------+
| component \   | Dmaap Connection \                                | runtime platform generated \                                              |
| spec          | Object                                            | config                                                                    |
+===============+===================================================+===========================================================================+
| “streams”:{   | {      “dmaap_info”:                              | “streams_publishes”:{ … },                                                |
|     “config_k\| {      “location”:                                | “streams_subscribes”:{                                                    |
| ey”:“dr_inp\  | “mtc00”,                                          | “type”:“data_router”,                                                     |
| ut”,     “ty\ | “delivery_url”:                                   |   “location”:“mtc00”,                                                     |
| pe”:“data_ro\ | "https://my-subscriber-app.dcae:8080/target-path"\|          “delivery_url”:"https://my-subscriber-app.dcae:8080/target-path"\|
| uter”,        | \                                                 | \                                                                         | 
|     “route”:  | ,                                                 | ,                                                                         |
| “/target-pat\ |      “password”:                                  | \                                                                         |
| h”}           | “sub-password”,                                   | “username”:“sub-user”,                                                    |
|               | “subscriber_id”:                                  |                                                                           |
|               | “789012”}}                                        | “subscriber_id”:“789012”}}                                                |
+---------------+---------------------------------------------------+---------------------------------------------------------------------------+