Persistence
Overview
Atoti Limits supports the ability to persist limit structures, limits, and incidents to an external database. This section describes how to work with persistent data in Atoti Limits.
info
Note that in these sections we will talk about “persistence” in the context of the Atoti datastore. The Atoti datastore is still an in-memory source, but the data it ingests is persisted in CSV files.
Terminology
We use the following terms in this section:
- Database: the external database where the data is persisted. We use this term to refer to the actual external database.
- Datasource: the mapping to a collection of database tables sharing common business logic. We use this term to refer to the connection configuration (i.e. properties) to the external database.
- Datatable: a table in the external database. We use this term to refer to an actual table in the external database.
- Repository: the code equivalent of a datatable in the external database. We use this term to refer to the Java class that maps to the table in the external database.
How it works
Atoti Limits provides a set of services that allow you to manage objects that exist within the application at runtime. These objects may be persisted in an external database. Atoti Limits makes no assumptions about the database being used and aims only to provide a connection to that database. Database management is the user’s responsibility.
As an illustration, please see the following:
In the diagram above:
- the components in blue are involved in persistence with an external database
- the components in green are involved in persistence with the Atoti Datastore
- the components in purple are involved in persistence with an external database and the Atoti Datastore
- the arrows in solid lines indicate the flows of data concerned with the persistence of data
- the arrows in broken lines indicate the flows of data not directly concerned with the persistence of data
Atoti Limits datasources
Atoti Limits can be configured to connect to the following datasources:
The Limits application datasource
This datasource is used to store the tables for limit structures, limits, and incidents. It is
defined using the property prefix limits.application.datasource
.
The Limits workflow datasource
This datasource is used to store the tables required by the workflow-core
module. It is defined
using the property prefix application.datasource
.
The Activiti datasource
This datasource is used to store the tables required by Activiti runtime. It is defined using the
property prefix activiti.datasource
.
The Activiti audit log datasource
This datasource is used to store the tables required by the Activiti audit log. It is defined using
the property prefix audit-log.datasource
.
Extending the persistence services
For more info on extending the persistence services, please see Adding Custom Persistence Services.