CSL Application Integration

In this section, we present an architectural overview of an application that uses CSL to specify contracts and reports and uses ledger technology to store contracts in a secure verifiable manner. We provide ledger adapters to support the integration of centralized and decentralized ledger technology under a unified programming interface. This section aims to provide an understanding of the software components provided by Deon Digital to integrate CSL programs in the application stack.

Architecture in a Nutshell

The following diagram provides an example of the integration of various software components spanning user application code, Deon Digital software stack, generated code, and external components in an application. Note that in the diagram we assume that the integration is being done in an application that is running on the JVM.

../_images/app-architecture.png

In the above architecture diagram, we have the following software components:

Application Integration Workflow

In a typical CSL application integration, the development workflow resembles the following:

  1. Decide on the contracts and reports to be modeled in the application and specify them using CSL.

  2. Generate the Kotlin specific wrappers for events, contracts, and report types specified in CSL using the code generator for the backend.

  3. Use the generated language specific wrappers together with ledger adapters suited for the DLT employed in the application architecture for performing contract and report management. Usage of generated wrapper code for contract and report management allows type validation of the CSL integration while building the application.

When the contract and report specifications are updated, steps 2 and 3 in the workflow need to be redone.

If you are interested in the supported ledgers and the ledger adapter details, refer to the ledger integration guide.