Message bus architecture
The core of Auron Omni is its message bus. To get the most out of Auron Omni it helps to understand the basics of the message bus.
The message bus is further optimized for maximum responsiveness by the notification broker. Find message states and state transitions in more detail here.
This is a schematic representation of the message bus:
As you can see there are 3 main parts to it. The following sections describe them.
The channels
The channels are communication channels to the outside world. They can either send or receive or do both. Channels operate in their own context. This means that each instance of a channel lives in its own process and, while managed by Auron Omni, they function independently. This has a number of advantages:
- Channels operate asynchronously. This is an important benefit for performance;
- Channels are extremely reliable. A problem with one channel does not affect the rest of the system;
- Add or remove channels dynamically. Stopping or starting channels does not affect the operation of Auron Omni;
Channels are instances of a channel type, for example an SMPP channel to connect to an SMPP provider or a GSM channel to connect to a GSM device. You can create multiple instances of the same channel type. In the schematic it shows 3 different channels for 3 different message types. However, it is possible to have as many channels as required and to use multiple channels for the same message type.
Find out more on how to configure channels here.
Router and Queue
The message queue is where messages are received, processed, and sent from. In this case it is a table in the server database. Having the message queue as a table in the database has some practical advantages:
- Accessibility. It is easy to inspect, read from, or write to the queue directly from your integration;
- Concurrency. The database handles concurrency in a uniform and well defined way;
- Scalability. You can use database tools to scale performance and reliability in a transparent way, for example by using a cloud based or clustered database;
To ensure consistent performance you can archive messages to keep the message queue small. However, performance should remain consistent for up to several hundred thousand or even millions of records, depending on your database server.
If an outgoing message does not specify a channel the router chooses one. This is done by applying predefined routing rules and blocking rules. These are easy to set up since routing and blocking conditions can be simple SQL expressions.
You can add messages directly to the queue to send them automatically. Find out more about this here. Find out more about message states and state transitions here.
Triggers
Triggers are actions that run when a message reaches a predefined state. A trigger has two properties:
- The trigger condition. This SQL expression determines whether a trigger runs;
- The trigger script. This script runs when a message matches the trigger condition;
Trigger scripts can be either VBScript, JavaScript, or SQL Script. This depends on what you are most comfortable with.
Trigger scripts can:
- Create new messages;
- Change existing message properties;
- Run applications;
- Connect to external databases;
- Make HTTP or HTTPS API calls;
- Use COM objects;
- Read, modify, or create Excel or other data files;
- And much more;
You have full freedom to do anything in a trigger script. You can use this API to manipulate messages in Auron Omni from your trigger. A trigger script has these properties:
- Multiple triggers run in order, synchronously;
- Global variables are kept between message handling. The trigger only reloads on a change or when restarting the service;
- With overlapping conditions you can chain triggers together;
- By setting a message status to ‘Processed’ you can prevent subsequent triggers from executing on that message;
Find out more on how to configure triggers here.
The Auron Omni setup contains both a local API and an HTTP REST API. Trigger scripts use the local API to manipulate messages. You can use the API to create external programs and scripts as well.
The HTTP REST API is an excellent way to integrate with Auron Omni from a website or Linux based server.
The setup package of Auron Omni contains a large number of working examples that show how to use both APIs. The API works with most Windows based development environments, including C# .NET, ASP.NET, PHP, Delphi, and more.
All of the examples are also available on GitHub.
