Chapter 6. Building a Distributed Task CorDapp
In this chapter, we’re going to dig deeper into the essential components of a full CorDapp. To do so, we’ll build a distributed to-do management CorDapp, called ToDoDist, that will expose us to the key concepts of states, transactions, and flows, the three major components that lie at the heart of any real-world CorDapp. The other two major components are commands and constraints, which we’ll cover in Chapter 7. States provide us with a conceptual model to work with data on a Corda ledger, while transactions manage how those states, and thus data, change over time. Flows define and manage businesses processes, including processes spanning multiple independent parties and nodes, orchestrating changes to states via transactions and digital signatures. States, transactions, and flows are woven together to create fully working CorDapps for real-world use cases.
Before we begin to code, we’ll cover each of these three concepts in detail and then see them in action in our ToDoDist application. In the first part of this chapter, we’ll build a foundation in understanding what states are and how they work in Corda, then look at transactions, and then finally expand our understanding of flows. We’ll build on the knowledge of flow that began in Chapter 3 with a deeper investigation of flows. The first few sections will focus on these concepts from a theoretical or computer science-y point of view and then shift into looking at how Corda employs ...
Get Mastering Corda now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.