diff options
author | Ioannis Sotiropoulos <Ioannis.Sotiropoulos@amdocs.com> | 2018-08-08 16:08:42 +0100 |
---|---|---|
committer | Ioannis Sotiropoulos <Ioannis.Sotiropoulos@amdocs.com> | 2018-08-08 16:08:42 +0100 |
commit | 414d8bf89767c18e43855c36c88aa6651ee1fe09 (patch) | |
tree | 092bf78b7752f678727e5851db61a1d90bee0084 | |
parent | b66828f9036491704dd6dfc7373a31997d9995eb (diff) |
Update Spike documentation
Reduce line length to less than 120 characters.
Change-Id: I69795c4bea1b1e61658d6b1e1b09b972d5a78059
Issue-ID: AAI-1428
Signed-off-by: Ioannis Sotiropoulos <Ioannis.Sotiropoulos@amdocs.com>
-rw-r--r-- | README.md | 135 |
1 files changed, 70 insertions, 65 deletions
@@ -1,32 +1,35 @@ # Spike Microservice -The Spike microservice consumes and processes the Champ graph data event stream from which it generates events to be consumed by other components. - +The Spike microservice consumes and processes the Champ graph data event stream +from which it generates events to be consumed by other components. + ## Public Interfaces ### Stream output -Spike receives events from the Champ microservice regarding changes to the graph database. Spike will buffer these events in an attempt to ensure proper chronological ordering, and then output them onto a configurable kafka or DMaaP queue. +Spike receives events from the Champ microservice regarding changes to the graph database. +Spike will buffer these events in an attempt to ensure proper chronological ordering, +and then output them onto a configurable queue. The messages are in a similar format to Gizmo's async pipeline. Here are some examples: #### Vertex ##### Create Vertex - { - "header":{ + { + "header":{ "event-type":"update-notification", "request-id":"8f9931a2-8002-4cb4-917b-a8c984932021", "source-name":"SPIKE", "timestamp":"20180807T153514Z" }, - "body":{ + "body":{ "transaction-id":"8f9931a2-8002-4cb4-917b-a8c984932021", - "vertex":{ + "vertex":{ "schema-version":"V14", "type":"vserver", "key":"541cf447-09f5-4484-a765-845e71aab1f2", - "properties":{ + "properties":{ "aai-last-mod-ts":1533656090789, "in-maint":false, "aai-uuid":"541cf447-09f5-4484-a765-845e71aab1f2", @@ -45,23 +48,23 @@ The messages are in a similar format to Gizmo's async pipeline. Here are some ex "timestamp":1533656091474 } } - + ##### Update Vertex - { - "header":{ + { + "header":{ "event-type":"update-notification", "request-id":"8f9931a2-8002-4cb4-917b-a8c984932021", "source-name":"SPIKE", "timestamp":"20180807T153514Z" }, - "body":{ + "body":{ "transaction-id":"8f9931a2-8002-4cb4-917b-a8c984932021", - "vertex":{ + "vertex":{ "schema-version":"V14", "type":"vserver", "key":"541cf447-09f5-4484-a765-845e71aab1f2", - "properties":{ + "properties":{ "aai-last-mod-ts":1533656090789, "in-maint":false, "aai-uuid":"541cf447-09f5-4484-a765-845e71aab1f2", @@ -80,23 +83,23 @@ The messages are in a similar format to Gizmo's async pipeline. Here are some ex "timestamp":1533656091474 } } - + ##### Delete Vertex - { - "header":{ + { + "header":{ "event-type":"update-notification", "request-id":"8f9931a2-8002-4cb4-917b-a8c984932021", "source-name":"SPIKE", "timestamp":"20180807T153514Z" }, - "body":{ + "body":{ "transaction-id":"8f9931a2-8002-4cb4-917b-a8c984932021", - "vertex":{ + "vertex":{ "schema-version":"V14", "type":"vserver", "key":"541cf447-09f5-4484-a765-845e71aab1f2", - "properties":{ + "properties":{ "aai-last-mod-ts":1533656090789, "in-maint":false, "aai-uuid":"541cf447-09f5-4484-a765-845e71aab1f2", @@ -115,34 +118,34 @@ The messages are in a similar format to Gizmo's async pipeline. Here are some ex "timestamp":1533656091474 } } - + #### Relationship ##### Create Relationship - { - "header":{ + { + "header":{ "event-type":"update-notification", "request-id":"1f2eced7-8300-4e72-966d-f345027c987a", "source-name":"SPIKE", "timestamp":"20180807T153514Z" }, - "body":{ + "body":{ "transaction-id":"1f2eced7-8300-4e72-966d-f345027c987a", - "relationship":{ - "source":{ + "relationship":{ + "source":{ "type":"vserver", "key":"ed76551f-f47f-47f9-a23d-052634446e76" }, "schema-version":"v14", "type":"tosca.relationships.HostedOn", "key":"cd5b98fd-9028-4211-af02-0bc839f9a47b", - "properties":{ + "properties":{ "prevent-delete":"IN", "SVC-INFRA":"OUT", "delete-other-v":"NONE", "contains-other-v":"NONE" }, - "target":{ + "target":{ "type":"pserver", "key":"981c0494-c742-4d75-851c-8194bbbd8a96" } @@ -151,33 +154,33 @@ The messages are in a similar format to Gizmo's async pipeline. Here are some ex "timestamp":1533656086207 } } - + ##### Update Relationship - { - "header":{ + { + "header":{ "event-type":"update-notification", "request-id":"1f2eced7-8300-4e72-966d-f345027c987a", "source-name":"SPIKE", "timestamp":"20180807T153514Z" }, - "body":{ + "body":{ "transaction-id":"1f2eced7-8300-4e72-966d-f345027c987a", - "relationship":{ - "source":{ + "relationship":{ + "source":{ "type":"vserver", "key":"ed76551f-f47f-47f9-a23d-052634446e76" }, "schema-version":"v14", "type":"tosca.relationships.HostedOn", "key":"cd5b98fd-9028-4211-af02-0bc839f9a47b", - "properties":{ + "properties":{ "prevent-delete":"IN", "SVC-INFRA":"OUT", "delete-other-v":"NONE", "contains-other-v":"NONE" }, - "target":{ + "target":{ "type":"pserver", "key":"981c0494-c742-4d75-851c-8194bbbd8a96" } @@ -186,33 +189,33 @@ The messages are in a similar format to Gizmo's async pipeline. Here are some ex "timestamp":1533656086207 } } - + ##### Delete Relationship - { - "header":{ + { + "header":{ "event-type":"update-notification", "request-id":"1f2eced7-8300-4e72-966d-f345027c987a", "source-name":"SPIKE", "timestamp":"20180807T153514Z" }, - "body":{ + "body":{ "transaction-id":"1f2eced7-8300-4e72-966d-f345027c987a", - "relationship":{ - "source":{ + "relationship":{ + "source":{ "type":"vserver", "key":"ed76551f-f47f-47f9-a23d-052634446e76" }, "schema-version":"v14", "type":"tosca.relationships.HostedOn", "key":"cd5b98fd-9028-4211-af02-0bc839f9a47b", - "properties":{ + "properties":{ "prevent-delete":"IN", "SVC-INFRA":"OUT", "delete-other-v":"NONE", "contains-other-v":"NONE" }, - "target":{ + "target":{ "type":"pserver", "key":"981c0494-c742-4d75-851c-8194bbbd8a96" } @@ -221,30 +224,31 @@ The messages are in a similar format to Gizmo's async pipeline. Here are some ex "timestamp":1533656086207 } } - + #### Transactions -Champ, and therefore Spike, will publish separate events for each operation done within a transaction. Operations from the same transaction can be identified via the database-transaction-id field. +Champ, and therefore Spike, will publish separate events for each operation done within a transaction. +Operations from the same transaction can be identified via the database-transaction-id field. ##### Transaction example The following three events were created in a single bulk request from Gizmo. Note the database-transaction-id. -[ - { - "header":{ +[ + { + "header":{ "event-type":"update-notification", "request-id":"9fc953af-bb41-4cfe-b522-dc6a9d1b5830", "source-name":"SPIKE", "timestamp":"20180807T162714Z" }, - "body":{ + "body":{ "transaction-id":"9fc953af-bb41-4cfe-b522-dc6a9d1b5830", - "vertex":{ + "vertex":{ "schema-version":"V14", "type":"vserver", "key":"9c649f2b-7500-4b35-abb8-d51008fb28fe", - "properties":{ + "properties":{ "aai-last-mod-ts":1533659209321, "in-maint":false, "aai-uuid":"9c649f2b-7500-4b35-abb8-d51008fb28fe", @@ -263,20 +267,20 @@ The following three events were created in a single bulk request from Gizmo. Not "timestamp":1533659209324 } }, - { - "header":{ + { + "header":{ "event-type":"update-notification", "request-id":"6f7db331-a0b9-4194-917c-7f24124b5d46", "source-name":"SPIKE", "timestamp":"20180807T162714Z" }, - "body":{ + "body":{ "transaction-id":"6f7db331-a0b9-4194-917c-7f24124b5d46", - "vertex":{ + "vertex":{ "schema-version":"V14", "type":"pserver", "key":"ecec281a-c0c0-47af-8ec8-019753edc28c", - "properties":{ + "properties":{ "ptnii-equip-name":"e-name", "aai-last-mod-ts":1533659209637, "equip-type":"server", @@ -298,31 +302,31 @@ The following three events were created in a single bulk request from Gizmo. Not "timestamp":1533659209645 } }, - { - "header":{ + { + "header":{ "event-type":"update-notification", "request-id":"54f0f573-eb22-4ce2-b51b-4af0904c9782", "source-name":"SPIKE", "timestamp":"20180807T162714Z" }, - "body":{ + "body":{ "transaction-id":"54f0f573-eb22-4ce2-b51b-4af0904c9782", "database-transaction-id":"d8607c70-e5d6-44d4-bc6e-d8f7af419378", - "relationship":{ - "source":{ + "relationship":{ + "source":{ "type":"vserver", "key":"9c649f2b-7500-4b35-abb8-d51008fb28fe" }, "schema-version":"v14", "type":"tosca.relationships.HostedOn", "key":"410cb65a-1b46-4d23-a5b4-9f57bdc918c1", - "properties":{ + "properties":{ "prevent-delete":"IN", "SVC-INFRA":"OUT", "delete-other-v":"NONE", "contains-other-v":"NONE" }, - "target":{ + "target":{ "type":"pserver", "key":"ecec281a-c0c0-47af-8ec8-019753edc28c" } @@ -334,7 +338,8 @@ The following three events were created in a single bulk request from Gizmo. Not ] ### Echo Service -The Spike micro service supports the standard echo service to allow it to be 'pinged' to verify that the service is up and responding. +The Spike micro service supports the standard echo service to allow it +to be 'pinged' to verify that the service is up and responding. The echo service is reachable via the following REST end point: |