This implementation classifies persistence data into two broad categories: data collected during performance-sensitive operations, and all other data.
Data collected during performance-sensitive operations is limited to the data required to facilitate the ILPv4 packet flow. In general, this type of data is limited to balance tracking information, and this implementation supports both Redis and Postgres for this use-case.
All other data, such as non-balance account configuration, runtime configuration, and more is stored into one of several supported RDBMS datastores. This implementation currently supports Posgresql, MS-SQL, MySQL, and Oracle.
This section details how to use Postgresql as the underlying Connector datastore.
To generate the DDL for the Connector database, execute the following commands:
mvn -DskipTests clean package -P liquibase-pg-sql liquibase:updateSQL
This will emit a file
/target/liquibase/migrate.sql that can be used to populate your database.
As an alternative during development, you can utilize the liquibase-maven-plugin to directly connect to Postgres and initialize the database for you.
However, for this to work, you first need to update the
pom.xml file in the
ilpv4-connector-persistence module to conform to your connection parameters by setting the
configuration.url to a value for your environment, like this:
Once the liquibase-maven-plugin is configured properly, the following commands will update the database directly:
cd ./java-ilpv4-connector/ilpv4-connector-persistencemvn -DskipTests clean package -P liquibase-pg-sql liquibase:update
If you want to reinitialize the database, for example during development, the following commands can be used:
mvn -DskipTests clean package -P liquibase-pg-sql liquibase:dropAllmvn -DskipTests clean package -P liquibase-pg-sql liquibase:update
Redis is only used for balance tracking, so outside of configuring runtime configuration properties, no further initialization is required.