-
Notifications
You must be signed in to change notification settings - Fork 27
Key Concepts
CorDapps are packaged in a single .jar
file called CorDapp Package Installer (CPI) containing all the pieces required to join and participate in an application network:
- The location of the network operator.
- A list of membership requirements.
- Third party dependencies.
- CorDapp logic.
The building blocks of these applications are a new file format called CorDapp Packages (.cpk
s). This includes workflow and contract packages, additional metadata, a dependency tree and version information. You can independently version .cpk
s. Each .cpk
runs in its own sandbox, isolated from other CPKs. This prevents dependency clashes and facilitates faster CorDapp development.
The application publisher brings the individual .cpk
files together to make a single CorDapp Package Bundle (.cpb
). The application publisher is a single entity that coordinates multiple parties to create a single application bundle for a network. When multiple firms compose CorDapps together, it creates a strong technical dependency that facilitates development, distribution, and upgrades.
The application publisher adds the information about the network and the file becomes a CorDapp Package Installer (.cpi
), which can be distributed to new members to begin onboarding and to existing members to perform upgrades.
The only difference between a development and a production CPI is the network information, so you can use the same software for testing environments.
A virtual node represents a Corda identity, a person or business that wants to interact with other people or businesses using Corda. The virtual node also contains everything needed to communicate and transact on Corda: keys, certificates, and storage. This lets the holder of the identity join application networks, where they can interact with other group members according to the terms set by the Membership Group Manager (MGM). You can join multiple application networks from one physical node infrastructure using virtual nodes.
Virtual nodes can be:
- Multi-tenant. You can host multiple virtual nodes on one deployment of Corda, at no additional cost.
- Portable. You can move a virtual node from one host to another.
- Highly available. If you configure your node to be highly available, if it goes down, an identical one takes its place instantly.
Nothing—it's virtual! You can think of a virtual node as an environment that lets the processor locate a specific Installer file and the flows and contracts associated with that Installer. The Installer includes:
The information a virtual node needs to join a membership group.
CorDapp packages (CPKs), which are bundles of CorDapps—distributed applications that solve specific problems using Corda. The virtual node needs to install a specific set of CorDapps to join application networks.
The flows associated with the CPI let the virtual node communicate with others. The contracts define that virtual node's rules for verifying transactions.
To get a node ready to interact with others on application networks, it must be onboarded. The virtual node creates a sandbox can exist in isolation, meaning it can't see any other tenants on the host deployment, and the other tenants can't see it. It associates that sandbox with a Corda identity and gets its keys, certificates, and storage.
Virtual nodes are built on several processes, which run independently and scale up and down based on need. These are called workers and can include the crypto worker, database worker, flow worker and persistence worker, depending on the topology of a specific deployment.
The processes communicate with each other using a message bus, Kafka. This makes sure the information ends up in the right place at the right time. The message bus:
Captures blobs of data, called events, that the processes generate.
Interprets the data and stores it until the moment it becomes relevant.
Delivers the message to the recipient process when the recipient process requires the information, preventing bottlenecks of information.
Virtual nodes communicate using flows. The message bus that links the processes supporting the virtual node also communicates with the Corda gateway. The gateway sends flows between virtual nodes through a secure HTTPS link.
You can use remote procedure calls (RPC). This functionality is exposed by the HTTPS REST API.
You can use RPC to interact with the virtual node using:
- A command line interface (CLI).
- curl commands.
Virtual nodes generate a dynamic OpenAPI specification. You can locate this specification to get details of your virtual node's RPC functionality, including the endpoints, operations, operation parameters, and authentication methods.