-
Notifications
You must be signed in to change notification settings - Fork 0
Eventhos Concepts: System
This is only a draft version.
Eventhos is an open source system/platform that applies event based architecture principles to let an average user choreography the diverse systems, SaaS or microservice that an enterprise uses, interconnecting them.
- Key Concepts
- Key Eventhos Concepts
- Eventhos Rules & Recommendations
- UX Design
- Technologies Used
- Future Features
Key concepts necessary to understand how does Eventhos's works.
A EDA lets us have a real-time iteration with all of the systems of our enterprise. This is done by events that events that pass for a message broker (some sort of delivery middleware
) and then get delivered to the subscribed services. Some of the advantages of an EDA are:
- Hight Scalability
- Faster data delivery.
- Reduces the time to implement a new service.
All of the interesting things done by an enterprise are an event. For example the creation of a new user
, the service that emits this event will be called Producer^1.
A subscriber is system that decides to listen a certain event^2.
In his most basic form is middleware that makes sure that a event arrives to all of his subscribers^1.
Key concepts that Eventhos uses.
A system that the enterprise uses.
To register a system an user should put a name, type, description and a client id of the client that was created using the /auth/client
end point craeted by the oauth2-starter library. The identifier will be auto-generated.
The system can be a producer, a subscriber or both:
A producer could be any system that the enterprise uses (Microservice, ERP, SPA, etc). He will emit an event to the eventhos system. Each producer will have a api key to access eventhos. This api key should be send in the url. A producer should also send an identifier in the same way as the api key.
The subscriber receives the events and will do something with that received event. Much like a producer it could be any system that the enterprise uses, an special subscriber will be the atlas data base.
Events need to be communicated to the rest of the systems of the enterprise, usually a simple event broker would do the event routing, in this case Eventhos is in charge to distribute all of the events. To communicate an event to the Eventhos system is necessary the use of webhooks that should be integrated in one the system of the enterprise or a in a SaaS.
A user should use the Eventhos platform to register the events in the eventhos system, the user will give the name of the event, a description, the operation type (select, new, update, delete, process) and the producer
The actions are processes that will be execute in either a service or in the Atlas Data Base. Eventhos has the responsibility to "ingate" those actions and while the ingate is asynchronous Eventhos will keep track of the result using reactive programming (RXJS)^3.
A user should use the Eventhos platform to register the action in the eventhos system, the user will give the name of the event, a description, the operation type and the subscriber who will execute this action. Additionally using a postman's like interface the user will give the action the desired behavior, this will be send to the subscriber using axios configuration request https://axios-http.com/docs/req_config .
Once everything else is in place create a contract is easy. A contract describes a relationship between an event and an action.
If a contract is linked to a process event then the flow is:
WHEN IN <serviceX> THIS HAPPENS <eventX> THEN IN <serviceY> DO THIS <process-action>
.
A user should use the Eventhos platform to sign a contract, indicating one of the previously mentioned flows.
Contracts can also be chained to create a deferred execution.
Once eventhos receives an event it will try to execute all of the contract where this particular event is present. The execution of contract can either be in progress, success or failed. If it is a failure eventhos will retry a determinate amount of times, to do this the body and header of the request event will be stored in a database. All of the response information from the subscriber will also be stored.
Is a global data base for the whole enterprise where all of the globally relevant data will be stored. In principle this data base is agnostic (can use whatever is needed).
The rules and recommendations that must be follow to guarantee the correct WorkFlow of Eventhos.
-
Rules
- One event should have only one service origin.
- The api key should be send in the url.
-
Recommendations
- One event should be only emitted one time.
-
Rules
-
Recommendations
- An action name should be descriptive.
- If using oauth2 or similar security use the spec.
- Use RESTFUL
This part is under construction. To take a look to the mockup go to: https://github.com/usil/eventhos-mockup/tree/snapshot
Column | Data type | Attributes | Default | Description |
---|---|---|---|---|
id |
INT | PRIMARY, Auto increments, Not null, Unique | The Id For The Producer | |
identifier |
VARCHAR(75) | Not null, Unique | Auto generated column, lower case name | |
name |
VARCHAR(45) | Not null | The name of the system | |
type |
VARCHAR(45) | Not null | What type of producer it is? (Microservice, ERP, CRM, CRS, etc) | |
client_id |
INT | Not null | The id of a client | |
description |
TINYTEXT | Not null | A short description for the producer | |
deleted |
Not null | 0 |
||
created_at |
TIMESTAMP | Not null | CURRENT_TIMESTAMP |
|
updated_at |
TIMESTAMP | Not null | CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP |
Name | Columns | Type |
---|---|---|
PRIMARY | id |
PRIMARY |
idProducer_UNIQUE | id |
UNIQUE |
indifier_UNIQUE | identifier |
UNIQUE |
Column | Data type | Attributes | Default | Description |
---|---|---|---|---|
id |
INT | PRIMARY, Auto increments, Not null, Unique | The id for the event | |
system_id |
INT | Not null |
foreign key to column id on table system . |
|
identifier |
VARCHAR(75) | Not null, Unique | Auto generated column, lower case name and the operation generated by the back end | |
name |
VARCHAR(45) | Not null | A name for the event | |
operation |
VARCHAR(25) | Not null | What operation does the event represents (select, new,update, delete, process) | |
description |
TINYTEXT | Not null | A short description for the event | |
deleted |
Not null | 0 |
||
created_at |
TIMESTAMP | Not null | CURRENT_TIMESTAMP |
|
updated_at |
TIMESTAMP | Not null | CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP |
Name | Columns | Type |
---|---|---|
PRIMARY | id |
PRIMARY |
idProducer_Event_UNIQUE | id |
UNIQUE |
identifier_UNIQUE | identifier |
UNIQUE |
fk_event_system1_idx | system_id |
INDEX |
Column | Data type | Attributes | Default | Description |
---|---|---|---|---|
id |
INT | PRIMARY, Auto increments, Not null | ||
system_id |
INT | Not null |
foreign key to column id on table system . |
|
identifier |
VARCHAR(75) | Not null, Unique | Auto generated column, lower case name and the operation generated by the back end | |
name |
VARCHAR(45) | Not null | A name for the action | |
http_configuration |
JSON | Not null | An http configuration that should resamblace axios config | |
operation |
VARCHAR(25) | Not null | What operation does the action represents (select, new,update, delete, process) | |
description |
TINYTEXT | Not null | A short description for the action | |
deleted |
Not null | 0 |
||
created_at |
TIMESTAMP | Not null | CURRENT_TIMESTAMP |
|
updated_at |
TIMESTAMP | Not null | CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP |
Name | Columns | Type |
---|---|---|
PRIMARY | id |
PRIMARY |
identifier_UNIQUE | identifier |
UNIQUE |
fk_action_system1_idx | system_id |
INDEX |
Column | Data type | Attributes | Default | Description |
---|---|---|---|---|
id |
INT | PRIMARY, Auto increments, Not null, Unique | ||
id_action |
INT | Not null, Unique | The id of the action foreign key to column id on table action . |
|
type |
VARCHAR(45) | Not null | What type of security does the action has | |
http_configuration |
JSON | An http configuration that should resamblace axios config for oauth2 spec. | ||
json_path_exp |
VARCHAR(75) | A JSON path expression for extracting the acces_key | ||
updated_at |
TIMESTAMP | Not null | CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP |
Name | Columns | Type |
---|---|---|
PRIMARY | id |
PRIMARY |
idAction_Security_UNIQUE | id |
UNIQUE |
fk_Action_Security_Actions1_idx | id_action |
INDEX |
id_action_UNIQUE | id_action |
UNIQUE |
Column | Data type | Attributes | Default | Description |
---|---|---|---|---|
id |
INT | PRIMARY, Auto increments, Not null, Unique | ||
action_id |
INT | Not null | The id of the action to execute foreign key to column id on table action . |
|
event_id |
INT | Not null | The id of the event that the contract is listening foreign key to column id on table event . |
|
identifier |
VARCHAR(75) | Not null, Unique | Auto generated column, lower case name and the operation generated by the back end | |
name |
VARCHAR(45) | Not null | A name for the contract | |
active |
Not null | 1 |
Is the contract currently active? | |
deleted |
0 |
|||
created_at |
TIMESTAMP | CURRENT_TIMESTAMP |
||
updated_at |
TIMESTAMP | CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP |
Name | Columns | Type |
---|---|---|
PRIMARY | id |
PRIMARY |
id_UNIQUE | id |
UNIQUE |
fk_contract_action1_idx | action_id |
INDEX |
fk_contract_event1_idx | event_id |
INDEX |
identifier_UNIQUE | identifier |
UNIQUE |
Column | Data type | Attributes | Default | Description |
---|---|---|---|---|
id |
INT | PRIMARY, Auto increments, Not null, Unique | ||
key |
VARCHAR(300) | Not null | ||
name |
VARCHAR(45) | Not null | ||
created_at |
TIMESTAMP | Not null | CURRENT_TIMESTAMP |
|
updated_at |
TIMESTAMP | Not null | CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP |
Name | Columns | Type |
---|---|---|
PRIMARY | id |
PRIMARY |
id_UNIQUE | id |
UNIQUE |
Column | Data type | Attributes | Default | Description |
---|---|---|---|---|
id |
INT | PRIMARY, Auto increments, Not null, Unique | The id for the event | |
event_id |
INT | Not null | The id of the event foreign key to column id on table event . |
|
header |
JSON | Not null | The header of the request event | |
body |
JSON | The body of the request event | ||
recived_at |
TIMESTAMP | Not null | CURRENT_TIMESTAMP |
When was the event recived |
Name | Columns | Type |
---|---|---|
PRIMARY | id |
PRIMARY |
id_UNIQUE | id |
UNIQUE |
fk_recived_event_event1_idx | event_id |
INDEX |
Column | Data type | Attributes | Default | Description |
---|---|---|---|---|
id |
INT | PRIMARY, Auto increments, Not null, Unique | The id for the event | |
contract_id |
INT | Not null |
foreign key to column id on table contract . |
|
recived_event_id |
INT | Not null |
foreign key to column id on table recived_event . |
|
state |
VARCHAR(15) | Not null | What satate the contract is at? (ERROR, PROCESSING, COMPLETED) |
Name | Columns | Type |
---|---|---|
PRIMARY | id |
PRIMARY |
id_UNIQUE | id |
UNIQUE |
fk_contract_exc_detail_recived_event1_idx | recived_event_id |
INDEX |
fk_contract_exc_detail_contract1_idx | contract_id |
INDEX |
Column | Data type | Attributes | Default | Description |
---|---|---|---|---|
id |
INT | PRIMARY, Auto increments, Not null, Unique | ||
contract_exc_detail_id |
INT | Not null |
foreign key to column id on table contract_exc_detail . |
|
state |
VARCHAR(15) | Not null | What satate the contract is at? (ERROR, PROCESSING, COMPLETED) | |
header |
JSON | Not null | The header of the contact response | |
body |
JSON | The response body of the contract | ||
executed_at |
TIMESTAMP | Not null | CURRENT_TIMESTAMP |
When was the contract executed |
finished_at |
TIMESTAMP | When did the contract finished, either in success or with an error |
Name | Columns | Type |
---|---|---|
PRIMARY | id |
PRIMARY |
id_UNIQUE | id |
UNIQUE |
fk_contract_exc_try_contract_exc_detail1_idx | contract_exc_detail_id |
INDEX |
- Nodejs 14
- Angular 13
- Home
- Acknowledgments
- Architecture Diagrams
- Database
- Deployment
- Dev Guide
- Eventhos Concepts
- Key Concepts
- Quality Assurance
- Settings
- Showcase
- Tutorials
- User Guide