Java Connector
  • Java Connector
  • Concepts
    • Feature Summary
    • Terminology
    • Account Model
    • Packet Switching Fabric
    • Exchange Rates
    • Routing Table Design
    • Destination Address Handling
    • Balance Tracking
    • Settlement
  • Connector Configuration
  • Connector Configuration Properties
  • Persistence Initialization
  • Local STREAM Packet Termination
  • Connector Operation
  • Running with Docker
  • Peering: ILP-over-HTTP
  • Settlement: XRP Ledger
  • Running on GCP
  • Security Guide
    • Connector Crypto
    • test-jwt.io
    • Generating Keys
    • Spring Boot with TLS
  • API References
    • Admin API
  • Tutorials
    • ILP TestNet: Getting Started
  • Contributing
    • Connector Development
    • Project Testing
  • Releases
    • Changelog
Powered by GitBook
On this page
  • Overview
  • Postgresql
  • Generate DDL
  • Direct Initialization via Maven
  • Oracle
  • MySQL
  • MS-SQL
  • Redis

Was this helpful?

Persistence Initialization

This page describes available persistence stores and how to configure the Connector to operate using them.

PreviousConnector Configuration PropertiesNextLocal STREAM Packet Termination

Last updated 5 years ago

Was this helpful?

Overview

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 , , , and .

This page details how to initialize a given persistence store for usage by the Connector. To set connection details and other runtime configuration properties, see instead.

Postgresql

This section details how to use Postgresql as the underlying Connector datastore.

This section assumes that you have created a database named connectorinside of your Postgres installation. Note that this naming is used as an example only -- you can choose any database name.

Generate DDL

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.

Direct Initialization via Maven

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:

ilpv4-connector-persistence/pom.xml
...
<profiles>
    <profile>
      <id>liquibase-pg-sql</id>
      ...
        <configuration>
          <url>jdbc:postgresql://localhost:5432/connector</url>
        </configuration>        
      ...
</profiles>

Once the liquibase-maven-plugin is configured properly, the following commands will update the database directly:

cd ./java-ilpv4-connector/ilpv4-connector-persistence
mvn -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:dropAll
mvn -DskipTests clean package -P liquibase-pg-sql liquibase:update

Oracle

Coming soon.

MySQL

Coming soon.

MS-SQL

Coming soon.

Redis

Redis is only used for balance tracking, so outside of configuring , no further initialization is required.

Posgresql
MS-SQL
MySQL
Oracle
here
runtime configuration properties