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.
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
Extending the persistence services
For more info on extending the persistence services, please see Adding Custom Persistence Services.
Terminology
We will 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 the external database in our code. 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.