Nexus adapter

Prev Next

This article describes the details around developing a Nexus adapter.

There are tutorials and code examples if you program in C#.

Purpose

  • Expose system functionality according to capability contracts
  • Hide all system specific models, error handling, etc

Anatomy of the adapter

The adapter should provide a REST API that will be called by the business API. The business API also provides a REST API that the adapter can use for certain tasks.

API methods

One part of the contract is the API methods that needs to be implemented by the adapter. It is important to follow the REST guidelines when responding to the requests.

Business events

The adapter can subscribe to business events. They are delivered as HTTP POST to the REST API. If the adapter responds with an error response that indicates that the error is temporary, the event will be posted again and again for several days, but with longer and longer time span between the retries.

If the adapter is required to send business events, it does so by using a HTTP POST to the business API.

Data synchronization

Adapter requirements

A Nexus adapter must fulfill the following requirements:

  • It must implement the capability contracts that are assigned to it
  • The API of the adapter must follow the REST guidelines
  • Only allow incoming calls from the business API
  • It must be protected with the authentication mechanism provided by the business API
  • Events must be published "as soon as possible" after the time that they actually happened
  • The adapter is responsible for storing the event information until the business API has accepted the event
  • The adapter must send a synchronization event when a master data object has been updated

The adapter must be designed and implemented to handle the following:

  • Events may arrive in another order than they were sent
  • The same event can be received more than once
  • The adapter must act upon the event "as soon as possible"

Developer profile

The main focus for the person developing the adapter will be to integrate with the backend system that the adapter is for. So knowing how to integrate with the system has the highest importance. Without this knowledge, the developer must have access to very good documentation of the matter and/or access to a person with this knowledge.

The developer must know how to create a REST API. If the adapter is going to be written in C#, then much of this knowledge can be found in our documentation and in code templates.