Lesson 1: Daml Application Infrastructure
Nothing is loaded from YouTube until you press play, and then without tracking cookies.
About this video
At the end of this lesson, the learner will be able to analyze the underlying infrastructure required to run and use Daml applications on the Canton Network.
For a better learning experience, sign up and enroll in this free course at: daml.talentlms.com/plus/catalog/courses/161
Transcript
965 wordsCaptions as YouTube publishes them, usually machine-generated, so names such as Daml and Canton can be misheard.
- 0:03
dandel applications run on the Canton Network infrastructure and thus provide the benefits of distributed Ledger technology as well as data sovereignty and privacy in this lesson we will review the components that make up this infrastructure by the end of this lesson you will be able to analyze the underlying infrastructure required to run a DMO application on the Canon Network the Canton Network
- 0:26
infrastructure consists of two types of components participant nodes and synchronizers as you may recall from the course on damel apps design and architecture in the daml philosophy certification participant nodes collectively Store the app State each participant node stores its own view of the overall app state in the database known as private contract store or PCS in the diagram the colored boxes inside the PCS represent demo contracts and illustrate that each PCS Only Stores
- 0:59
those contracts where at least one party hosted on the participant node is a stakeholder the overall app state is the combined set of active contracts from each participant nodes PCS the synchronizers are used to commit changes to this state as atomic transactions Canton synchronizer is a total order reliable multicast system that ensures consistent message ordering and delivery of data across components of a distributed Ledger a synchronizer consists of a
- 1:29
sequencer and a mediator the sequencer provides ordering of the transactions and the mediator provides consensus for transaction confirmation participant nodes never communicate with each other directly they only communicate with the synchronizer for most daml apps the synchronizer is operated by the app provider this is the default option to consider when designing a daml app other
- 1:55
options and their considerations are discussed in the last lesson in this course Canon protocol is implemented using grpc the sends are handled via normal grpc calls that return a single response message the reads are handled via grpc calls that return a streaming response both sends and reads are always initiated from participant nodes to the sequencer therefore to enable required communication between infrastructure components the sequencer must permit
- 2:26
inbound gr orpc connectivity whereas participant know must permit outbound grpc the mediator communicates with the sequencer using the same mechanism the mediator subscribes to streaming messages from the sequencer however unlike the participant node and the sequencer which are likely to run in different administrated domains the sequencer and the mediator run within the same admin domain so the
- 2:51
communication between them is not a concern from the security perspective the minimum infrastructure required to run a daml app consists of a single synchronizer for all the app's workflows and a separate participant node for each organization involved in the workflows of the app note that the synchronizer does not have to be used exclusively for one app multiple dable apps may share the same synchronizer the participant nodes must all be connected to the synchronizer each organization should
- 3:23
have administrative control over its participant node this can be achieved by either deploying the participant node within the administrative domain of the organization or by using a managed participant node from a third party for example Danel Hub when each organization operates its own participant node all changes by the app provider or any app user to the application data are signed and submitted by the participant node under that entity's control this
- 3:52
provides two crucial benefits the first one is non-repudiation The Ledger records cryptographic evidence of the workflow steps taken by both the app provider and the app users thus none of them can effectively repudiate or deny their steps in shared workflows for example an app user cannot deny to the app provider that they submitted a buy order nor can the app provider deny to the user that they
- 4:18
wrongfully canel an order submitted by an app user non-repudiation applies to both the app provider and the app users the second benefit is self- sovereignty over app data for app users app users get a copy of all their app data that is synchronized in real time with the provider's copy of that data and the copies of other stakeholders of that data this copy empowers app users
- 4:41
to build custom Integrations of their application data with their internal systems at will this copy also implies that the data is still accessible even in case the provider loses it for example as a result of a ransomware attack the app users's participant no will validate all changes to the app users Data before they are committed the validation checks themselves are specified in the applications Dar files
- 5:06
uploaded to the user's participant node for example if the application's DAR file specifies that the app user must authorize all asset transfers then the users's participant node will ensure that this is the case thereby protecting the records from tampering by Third parties including the app provider while it's technically possible to have the architecture where the app provider has access to an app user's
- 5:31
participant node such architecture would necessarily result in the loss of non-repudiation property and is therefore an anti-pattern each organization should use its own IM am to control access to its participant node this way organizations can maintain control over their data and the system can achieve non-repudiation property to summarize in this lesson we have learned that the Canton Network infrastructure consists of two types of components participant nodes and
- 6:02
synchronizers the minimum infrastructure required to run a Dalal app includes one synchronizer for the whole app and a separate participant node for each organization involved in the workflows of the app the app provider and each app user should use a participant node under their own control each organization should use its own IM am to control access to its participant node