Categories:
Aura bridge architecture
Description of Aura bridge general architecture at the level of components
Introduction
aura-bridge architecture is designed based on three fundamental components:
-
aura-bridge: It is identified as the core component of the aura-bridge. It is in charge of starting the basic functionality modules, loading the plugins and starting the expressjs server.
-
aura-bridge-common: It can be defined as an SDK (Software Development Kit) to be able to develop a plugin.
-
aura-bridge-plugin. Component that provides functionality to aura-bridge. This component works the same way as a service in an architecture oriented to microservices (isolated, small and self-contained).

Aura bridge
As mentioned above, it is the core of the system and can work without the need for any plugin.
Source code structure
src
├── cache # Two level cache module
├── config # Configuration manager module
├── controllers # Generic and metric controllers (oastool)
├── make # Aura bridge make up
├── message-sync # Queue management system
├── middlewares # Express middlewares
├── modules # Bridge modules: behavior-manager, plugin-manager
└── utils # Bridge utilities: prometheus-utils
Aura bridge common
aura-bridge-common contains all the necessary utilities in order to develop a new aura-bridge plugin and the models used in these utilities.
Aura bridge plugin
Base class to develop an aura-bridge client.
To implement a new client, it is only necessary to extend the class AuraBridgeClient and implement the sendMessage method.
export class TestClient extends AuraBridgeClient {
public async sendMessage(message: TestMessage, options: SendMessageOptions): Promise<any> {
...
}
}
If the new aura-bridge client needs to use the OAuth protocol, it is possible to extend the class AuraBridgeClientOAuthTokens and indicate the configuration of OAuth clients, passing the parameter authClients in constructor. In this way, the tokens will be updated automatically.
export class TestOauthClient extends AuraBridgeClientOAuthTokens {
...
}
aura-bridge-flow
AuraBridgeFlow allows the generation of a “processor” type plugin in a quickly and standardized way: control of errors, logs, metrics, client retry policies, etc.
As a rule, a “processor” type plugin receives, converts and sends a message to a destination. In case of error, it can send messages to another list of destinations.
sequenceDiagram
Origin->>+Processor Plugin: Message
Processor Plugin->>+Processor Plugin: Convert message
alt ok
Processor Plugin->>+Destination: Converted message
end
opt Extra response
Processor Plugin->>+Error destination (1): Error message (1)
Processor Plugin->>+Error destination (2): Error message (2)
end
aura-bridge-utils
AuraBridgeUtils contains utilities for request information, get generic errors, etc.
aura-bridge plugins
A plugin is a module/component that provides aura-bridge with new functionality and works independently without affecting other existing functionality in the system.
📃 Find here detailed descriptive documentation about aura-bridge plugins.
📃 Find here the guidelines for the generation of a plugin and activation in aura-bridge.