Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Introductions to  Adaptors Adaptors can be found on the Introduction to YOUnite page and the Adaptors page.

...

  1. Register an Adaptor using the YOUnite API, which will generate the necessary configuration details the Adaptor will need at startup time.
  2. Develop an adaptor in your development environment using a YOUnite Adaptor SDK (see YOUnite Adaptor Guide for Java Developers).
  3. Deploy the adaptor on a server (e.g. on a physical server, virtual server, instance, container, etc.) that has access to the YOUnite message bus.
  4. Connect the adaptor to the native data store or service that it is connect to YOUnite   (e.g. CRM, MIS, SIS, DB, etc.).
  5. Configure the adaptor with the details from the step 1"Register " step above an Adaptor" above. 
  6. Start the adaptor so it can connect to the YOUnite DataHub over the YOUnite Message Bus.
  7. Change an adaptor's state.
    1. Pause
    2. Play
    3. Play Read Only
  8. Manage the adaptor.
    1. Delete an Adaptor
    2. Get new Credentials for an adaptor

The first step is covered in the Step 1 ("Adding an Adaptor" section below. Steps two through four are implementation specific. The remainder of this page covers steps five through eight. 

...

) and steps 5 through 8 are covered on this page, as steps 2 through 4 are implementation-specific.

1. Adding an Adaptor

Adding an adaptor merely informs the data hub that there is an intention to add an adaptor to a zone. Only users with POST /zones/zone-uuid/adaptors permissions can add in adaptor to a zone. By default only the zone data steward Zone Data Steward (ZDS) has this permission.

All An adaptor name is all that is required to POST an adaptor is an adaptor name. If the request succeeds, an adaptor UUID and security credentials are returned. 

...

Code Block
languagejs
{
    "uuid": "3dfcc03d-e5d4-4d57-9e9b-5c5d2db32f9a",
    "zoneUuid": "3c9000a9-3eb6-41fe-a11b-5a5859020c65",
    "clientId": "8c9167a6-bb83-4f77-bdfc-1947a946f77b",
    "clientSecret": "de02e3fa-4b23-46cb-aed6-5665a16e73d3"
}


5. Configuring an Adaptor

On startup an adaptor consults either a properties file (e.g. adaptor.yml) or configuration object (TODO Kevin) for its configuration information. The properties file resides on the same system as the adaptor and the following is a list of . The list below explains the minimum properties needed by an adaptor. Consult the adaptors documentation for a definitive list and property names since they can change from adaptor to adaptor???:

PropertyDescriptionExample Value
classNameTransport implementation class (should be a constant value if using the YOUnite Java SDK).com.younite.adaptor.sdk.transport.amq.AMQConnect
zoneUuidUUID of the zone this adaptor belongs to3c9000a9-3eb6-41fe-a11b-5a5859020c65
adaptorUuidUUID of the adaptor3dfcc03d-e5d4-4d57-9e9b-5c5d2db32f9a
clientIdClientID returned from POST /adaptors used to connect to message broker8c9167a6-bb83-4f77-bdfc-1947a946f77b
clientSecretSecret returned from POST /adaptors used to connect to message brokerde02e3fa-4b23-46cb-aed6-5665a16e73d3
brokerUrlMessage Broker URLnio+ssl://message-broker-uri:61617
oauthServerUrlOAUTH Server to validate adaptor access credentials. YOUnite runs an embedded OAuth server which that your implementation may be using. By default it  it runs on port 8080 so, in this case the value would be http://ip-address-of-the-YOUnite-datahub:8080http://oauth-server-uri

...

Code Block
languagetext
# Configuration
# Transport implementation class
className: com.younite.adaptor.sdk.transport.amq.AMQConnect

# UUID of the zone this adaptor belongs to
zoneUuid: 6ab9380f-d7f2-477c-b93c-3a762e70095e

# Adaptor UUID
adaptorUuid: 3dfcc03d-e5d4-4d57-9e9b-5c5d2db32f9a

# ClientID and Secret to be used by JMS to verify adaptor has valid access to message bus (and API)
clientId: 8c9167a6-bb83-4f77-bdfc-1947a946f77b
clientSecret: de02e3fa-4b23-46cb-aed6-5665a16e73d3

# Message Broker URL
brokerUrl: nio+ssl://192.2.200.25:61617

# OAUTH Server to validate adaptor access credentials
oauthServerUrl: http://192.2.200.15:8080

...


Adaptor States

Once an adaptor is added (step 1, above) it is in the "Posted" state. The adaptors adaptor moves between states as follows:

...

StateDescription
PostedAdaptor is successfully POSTed. An API consumer can make this request or it can be done through the YOUnite UI.
Configured

The adaptors had aadaptor has:

  • Successful connection Connected successfully to the YOUnite Datahub via the message bus/broker
  • Subscribed to the appropriate message broker topics
  • Its Created its message broker queue has been created
PauseThe adaptors adaptor is running but not accepting adaptor (read/write) requests.

Play Read-Only

The adaptor is accepting read requests only.
PlayThe adaptor is accepting read and write requests.


6. Start the Adaptor - Connect to the Hub

Once the adaptor has been added (posted) and configured, it can be launched. It should successfully connect to the hub and move briefly into the "Configured" state and then into the "Play" state unless otherwise configured.

TODO KEVIN: Debugging

7. Change an Adaptor's State

An adaptor state can be changed using the request:

...

Code Block
languagejs
{
	"state": "ADAPTOR_PLAY_RO",
	"changeVersion": 4117664412
}

8. Manage an Adaptor

See the YOUnite API documentation (https://younite.us/api) for more requests that can be made to the adaptors endpoint. A few common requests include:

...