Merge "DCAE Controller documentation DCAEGEN2-213"
[dcaegen2.git] / docs / sections / components / component-specification / streams-grid.rst
diff --git a/docs/sections/components/component-specification/streams-grid.rst b/docs/sections/components/component-specification/streams-grid.rst
new file mode 100755 (executable)
index 0000000..6105e9e
--- /dev/null
@@ -0,0 +1,149 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.\r
+.. http://creativecommons.org/licenses/by/4.0\r
+\r
+.. _streams-grid:\r
+\r
+Streams Formatting Quick Reference\r
+==================================\r
+\r
+Each of the following tables represents an example of a publisher and\r
+its subscriber, which are of course, different components. This focuses\r
+on the fields that are ‘different’ for each of these TYPEs, to\r
+illustrate the relationship between ``config_key``, dmaap connection\r
+object, and the generated configuration. Some notes on specific\r
+properties:\r
+\r
+-  ``config_key`` is an arbitrary string, chosen by the component\r
+   developer. It is returned in the generated configuration where it\r
+   contains specific values for the target connection\r
+-  ``format``, ``version``, and ``type`` properties in the subscriber\r
+   would match these properties in the publisher\r
+-  ``aaf_username`` and ``aaf_password`` may be different between the\r
+   publisher and the subscriber\r
+\r
+Using http\r
+~~~~~~~~~~\r
+\r
+*Publishing Component*\r
+^^^^^^^^^^^^^^^^^^^^^^\r
+\r
++-----------------------------+----------------------------------------+\r
+| component \                 | runtime platform generated config      |\r
+| spec                        |                                        |\r
++=============================+========================================+\r
+| "streams":{                 | "streams_publishes":{                  |\r
+| "publishes":[{              | "prediction":"10.100.1.100:32567/data" |\r
+| "config_key":"prediction",  |                                        |\r
+| "format":"some-format",     |                                        |\r
+| "type":"http",              |                                        |\r
+| "version":"0.1.0"   }       |                                        |\r
+| ]}                          |                                        |\r
++-----------------------------+----------------------------------------+\r
+\r
+*Subscribing Component*\r
+^^^^^^^^^^^^^^^^^^^^^^^\r
+\r
++-----------------------------+----------------------------------------+\r
+| component                   | runtime platform generated config      |\r
+| spec                        |                                        |\r
++=============================+========================================+\r
+| “streams”:{                 | "N/A"                                  | \r
+| "subscribes":[{             |                                        |\r
+| "route":"/data",            |                                        |\r
+| "format":"some-format",     |                                        |\r
+| "type":"http"               |                                        |\r
+| "version":"0.1.0"   }       |                                        |\r
+| ]}                          |                                        |\r
++-----------------------------+----------------------------------------+\r
+\r
+Using Message Router\r
+~~~~~~~~~~~~~~~~~~~~\r
+\r
+.. publishing-component-1:\r
+\r
+*Publishing Component*\r
+^^^^^^^^^^^^^^^^^^^^^^\r
+\r
+Note: When deploying, this component should be deployed first so satisfy\r
+downstream dependencies. Refer to the –force option in component ‘run’\r
+command for more information.\r
+\r
++---------------+------------------------+-----------------------------------------------------------------------------+\r
+| component \   | Dmaap Connection \     | runtime platform generated \                                                |\r
+| spec          | Object                 | config                                                                      |\r
++===============+========================+=============================================================================+\r
+| “streams”:{   | {     “dmaap_info”:    | “streams_publishes”:{                                                       |\r
+|     “config_k\| {} \ *Note: For \      | “aaf_username”:“pub-user”,                                                  |\r
+| ey”:“mr_out\  | message router, this \ |   “type”:“message_router”,                                                  |\r
+| put”,     “t\ | object is identical \  |      “topic_url”:"https://we-are-message-router.us:3905/events/some-topic"\ |\r
+| ype”:“messag\ | for the publisher and \| "streams_subscribes":{...}                                                  |\r
+| e_router”,    | the subscriber*        |                                                                             |\r
+|  }]}          |                        |                                                                             |\r
++---------------+------------------------+-----------------------------------------------------------------------------+\r
+\r
+*Subscribing Component*\r
+^^^^^^^^^^^^^^^^^^^^^^^\r
+\r
++---------------+------------------------+-----------------------------------------------------------------------------+\r
+| component \   | Dmaap Connection \     | runtime platform generated \                                                |\r
+| spec          | Object                 | config                                                                      |\r
++===============+========================+=============================================================================+\r
+| “streams”:{   | {     “dmaap_info”:    | “streams_publishes”:{…},                                                    |\r
+|     “config_k\| {} \ *Note: For \      | “streams_subscribes”:{                                                      |\r
+| ey”:“mr_inp\  | message router, this \ | “aaf_username”:“sub-user”,                                                  |\r
+| ut”,     “ty\ | object is identical \  |   “type”:“message_router”,                                                  |\r
+| pe”:“message\ | for the publisher and \|      “topic_url”:“https://we-are-message-router.us:3905/events/some-topic"  |\r
+| _router”,     | the subscriber*        |                                                                             |\r
+| }]}           |                        |                                                                             |\r
++---------------+------------------------+-----------------------------------------------------------------------------+\r
+\r
+Using Data Router\r
+~~~~~~~~~~~~~~~~~\r
+\r
+.. publishing-component-2:\r
+\r
+*Publishing Component*\r
+^^^^^^^^^^^^^^^^^^^^^^\r
+\r
++---------------+-----------------------------------------------+-----------------------------------------------+\r
+| component spec| Dmaap Connection Object                       | runtime platform generated config             |\r
++===============+===============================================+===============================================+\r
+| “streams”:{   | {    “dmaap_info”: {                          | streams_publishes“:{    ”typ\                 |\r
+| “config_key:  |      “location”:                              | e“:”data_router“,       "location":"mtc00"    |\r
+| “dr_output"   | “mtc00”,                                      | ,                                             |\r
+| , "type":     | “publish_url”:                                | "publish_url“:                                |\r
+| “data_r\      | "https://we-are-data-router.us/feed/xyz"\     | "http://we-are-data-router.us/feed/xyz"       |\r
+| outer”,   }]  | ,                                             | ,                                             |\r
+| }             | “log_url”:\                                   | "log_url“:\                                   |\r
+|               | \                                             | ”https://we-are-data-router.us/feed/xyz/logs" |\r
+|               | "https://we-are-data-router.us/feed/xyz/logs"\| ,                                             |\r
+|               | ,                                             | ”username“:”pub-user“,                        |\r
+|               | “username”:                                   | ”publisher_id“:”123456\                       |\r
+|               | “pub-user”,                                   | “}},                                          |\r
+|               | “password”:                                   |  ”streams_subscribes“:{                       |\r
+|               | “pub-password”,                               | … }                                           |\r
+|               | “publisher_id”:                               |                                               |\r
+|               | “123456”}}                                    |                                               |\r
++---------------+-----------------------------------------------+-----------------------------------------------+\r
+\r
+.. subscribing-component-1:\r
+\r
+*Subscribing Component*\r
+^^^^^^^^^^^^^^^^^^^^^^^\r
+\r
++---------------+---------------------------------------------------+---------------------------------------------------------------------------+\r
+| component \   | Dmaap Connection \                                | runtime platform generated \                                              |\r
+| spec          | Object                                            | config                                                                    |\r
++===============+===================================================+===========================================================================+\r
+| “streams”:{   | {      “dmaap_info”:                              | “streams_publishes”:{ … },                                                |\r
+|     “config_k\| {      “location”:                                | “streams_subscribes”:{                                                    |\r
+| ey”:“dr_inp\  | “mtc00”,                                          | “type”:“data_router”,                                                     |\r
+| ut”,     “ty\ | “delivery_url”:                                   |   “location”:“mtc00”,                                                     |\r
+| pe”:“data_ro\ | "https://my-subscriber-app.dcae:8080/target-path"\|          “delivery_url”:"https://my-subscriber-app.dcae:8080/target-path"\|\r
+| uter”,        | \                                                 | \                                                                         | \r
+|     “route”:  | ,                                                 | ,                                                                         |\r
+| “/target-pat\ |      “password”:                                  | \                                                                         |\r
+| h”}           | “sub-password”,                                   | “username”:“sub-user”,                                                    |\r
+|               | “subscriber_id”:                                  |                                                                           |\r
+|               | “789012”}}                                        | “subscriber_id”:“789012”}}                                                |\r
++---------------+---------------------------------------------------+---------------------------------------------------------------------------+\r