Architecture

Capabilities

The SDC Distribution client is a library that applications can use to simplify the handling of distribution related notifications from/to SDC and to download artifacts from SDC based on those notification.

Note

As of version 2.0.0, the client uses kafka as it’s message bus to publish/subscribe to/from the relevant SDC distribution topics.

All previous releases of the client use DMaaP Message Router as it’s message bus.

Usage Scenarios

  • Get Distribution Notification event

    The client polls the relevant NOTIFICATION topic for distribution events sent from SDC.

  • Get Deployment Artifact from SDC

    Once a new notification event is received, the client will download the relevant artifacts that it has defined as part of it configuration.

  • Send Distribution Status event

    As part of the processing of the downloaded artifacts, the client will publish it’s progress to SDC via the relevant STATUS topic. Once the download has ben successfully completed, the client must publish it’s final response COMPONENT_DONE_OK to the STATUS topic.

Interactions

Kafka

The client uses kafka as it’s messaging bus to publish and subscribe to the relevant SDC topics.

SDC

The client interacts with the following SDC apis on initialization:

  • /sdc/v1/artifactTypes

    Get the current artifact types from SDC to validate against the clients configured list.

    See SDCE-6 Swagger api for more details

  • /sdc/v1/distributionKafkaData

    Get the kafka distribution config from SDC to be used during publish and subscribe

    See SDCE-6 Swagger api for more details

../_images/sdc_client_init.png

The client interacts with the following SDC apis during distribution:

  • /sdc/v1/catalog/services/{serviceName}/{serviceVersion}/resourceInstances/{resourceInstanceName}/artifacts/{artifactName}

    Get the artifact for a particular resource instance defined in the artifactUrl of the notification event

    See SDCE-7 Swagger api for more details

  • /sdc/v1/catalog/services/{serviceName}/{serviceVersion}/artifacts/{artifactName}

    Get the artifact defined in the artifactUrl of the notification event

    See SDCE-7 Swagger api for more details

../_images/sdc_distrib_flow.png