What’s New in Next-Gen Corda?

Corda Feb 28 2023 By: Peter Li
Comments

0 Comments

Views

2,190 Views

Peter Li
Peter Li Blockchain Development (Corda Open Source)
Share this post:
Copied

Corda is the leading private, permissioned distributed application platform, powering multi-party workflows in regulated markets. With Corda, decentralized apps can be developed using standard languages and protocols such as Java or Kotlin. In this blog post, we will highlight three new components of Next Gen Corda.

New Architecture for Corda

Corda is known for its strong identity and privacy, high performance and scalability, and enterprise interoperability. With Next Gen Corda, these good characteristics are kept, and we are taking it to another level. We completely redesigned the product architecture and drilled on high availability and horizontal scalability.

Next Gen Corda is designed around a message based, event-driven, architecture that uses Kafka. The primary role of the Kafka cluster is coordinating the different services that power Corda.

The new architecture brings new components and concepts for Next Gen Corda. We are introducing:

1. Event-driven workers
2. Virtual nodes
3. Application Networks

Event-driven workers

In Corda 4, the physical node is running in a JVM and takes care of all of the DLT complexities for you, such as cryptography, peer discovery, key management, etc. It is an aggregated service engine. In Next Gen Corda, we are introducing individual “workers” to take care of the services. We extracted each service from an all-in-one engine and make them into individual processes. The Kafka cluster connects them to each Corda identity whenever a service is required.

In Next Gen Corda, different worker processes are responsible for various aspects of running Corda, e.g., the flow workers execute flows and verify contracts, and the DB workers handles interactions with the cluster database.

Examples of workers
Examples of workers

Next Gen Corda is designed to be horizontally scalable. It relies on cloud native deployment technologies such as containerization (Docker) and container orchestration (Kubernetes). In Next Gen Corda, scalability is achieved by increasing the number of workers in the Corda cluster. Increasing the number of Corda cluster workers will in turn consume more compute resources. This can be addressed by scaling the Kubernetes cluster, increasing the number of Kubernetes nodes (servers) the cluster is running on.

Diagram of horizontal scaling in Next Gen Corda
Horizontal scaling in Next Gen Corda

Virtual Nodes

Multi-tenancy is a new concept in Corda. To allow multi-tenancy, Next Gen Corda introduces virtual nodes (VNodes). With Next Gen Corda, a Corda instance can host multiple virtual nodes. An instance of Corda is composed of a number of processes executing in parallel to perform all of the required operations. Each virtual node would call up the stateless event-driven workers to execute its events. An event is recording a state change in the system. The workers are dismissed once the virtual node goes idle. 

Diagram showing how the Corda Cluster can be scaled based on the aggregate load for all virtual nodes.
VNodes are a CorDapp in context of an identity. The Corda Cluster can be scaled based on the aggregate load for all virtual nodes.

Application Networks

Next Gen Corda is organized in application networks. Each network has a set of applications packaged in a CPB (Corda package bundle). It also has a network ID and a network policy which are bundled with the CPB into a CPI (Corda package installer). An application network membership is managed by an MGM (Membership Group Manager)–which is in itself a Virtual Node.

Diagram showing how a Corda Cluster is network agnostic, i.e., it can support VNodes belonging to different networks.
A Corda Cluster is network agnostic, i.e., it can support VNodes belonging to different networks.

Summary

Next Gen Corda Cluster Overview
Next Gen Corda Cluster Overview

To summarize what’s new in Next Gen Corda, it moves away from the monolith physical node engine architecture and adopts the agile setup where stateless event-driven workers can spawn on demand. By doing so, Corda can maximize the resource utilization for each virtual node. The network management is moved before CorDapp deployment with the help of CPIs, leaving less operational intervention post-deployment.

Peter Li
Peter Li Peter Li is a Developer Evangelist at R3, an enterprise blockchain software firm working with a global ecosystem of more than 350 participants across multiple industries from both the private and public sectors to develop on Corda, its open-source blockchain platform, and Corda Enterprise, a commercial version of Corda for enterprise usage.

Leave a Reply

Subscribe to our newsletter to stay up to date on the latest developer news, tools, and articles.