Please describe your proposed solution.
We propose to implement a Decentralized Web Node as specified by DIF. Over and above the standard features of Record storage and Hooks, this implementation will serves as a "Decentralized Service Bus" for building modular DApp's allowing developers to achieve High Cohesion and Loose Coupling.
It will facilitate the creation and execution of business process workflows that utilises:
- Autonomous Decentralised Identities (DID) that provides Authentication, Authorisation and Non-repudiation to Individuals (SSI), Organisations (DAOs) and Things (IoT)
- Secure Asynchronous Communication using DIDComm
- Tokenisation of assets based a standardised taxonomy that provides a composable blockchain agnostic token framework work creation and transfer of tokenised assets, commodities and attestations.
- Stateful orchestration of workflows, expressed as Coloured Petri-Nets
How does your proposed solution address the challenge and what benefits will this bring to the Cardano ecosystem?
It will provide an integration platform between Prism, Lace and Cardano DApps, through an orchestration layer for long running concurrent and asynchronous transactions. The above environments for Identity, Tokens and Smart contracts are siloed and operate in a mostly synchronous modes. To facilitate better integration will require a state engine to track the interactions of peers in a multi-party dApp, comprised of multi-step processes flows incorporating wallets, smart contracts and personal data.
Coloured Petri Nets will be used a tool to design and implement custom protocols for decentralised web nodes according to application specifications. It provides well structured approach with a rigorous foundation for understanding and reasoning about the behaviour of the protocol, ensuring that it exhibits the desired properties and operates correctly in a concurrent environment.
- Requirement analysis: Start by gathering and documenting the requirements of your custom protocol. This includes understanding the desired functionality, performance goals, security measures, and any other relevant aspects.
- Petri Net modelling: Develop a Petri Net model (or a Coloured Petri Net model, if data types are involved) that captures the behaviour of your custom protocol. Model the states, transitions, and arcs to represent the protocol's operations, data flows, and control flows. This step will help you to visually and formally describe the concurrent processes involved in your protocol.
- Protocol validation: Analyse the Petri Net model to ensure that it meets the desired properties, such as liveness, boundedness, and reachability. This analysis will help you identify potential issues or inefficiencies in your protocol design, allowing you to refine the model as needed.
- Protocol implementation: Once the Petri Net model is validated, use it as a blueprint for implementing your custom protocol. Translate the model's components (places, transitions, and arcs) into appropriate data structures, algorithms, and functions in your chosen programming language. Ensure that the implementation follows the concurrency rules and data flow constraints defined in the Petri Net model.
- Testing and verification: Test your implemented protocol against various scenarios and edge cases to ensure that it behaves as expected. You can also use formal verification techniques to prove the correctness of your implementation, especially in critical systems where reliability is crucial.
- Deployment and integration: Deploy your custom protocol within the decentralised web nodes and integrate it with the other components of your system. Monitor the performance and behaviour of your protocol in real-world conditions to ensure that it meets the requirements and expectations.
Petri Nets are more concise than other process flow descriptions (like UML or BPMN) in that they have an exact mathematical definition of their execution semantics, with a well-developed mathematical theory for process analysis. Bounded Petri Nets exhibits Categorical Semantics in the way that concatenable processes as strict Monoidal categories, model Net computations.
How do you intend to measure the success of your project?
- A business analyst should create a dApp Protocol specification by providing a Coloured Petri Net joining Places (States) and Transitions with Arcs specifying the flow of the dApp - i.e. describing a flow that requires Verifiable Credentials provided by Prism, Ada and tokens from Lace and execution of Smart Contract on Cardano.
- The Peri Net is encoded as a JSON/HOCON configuration a provided to the DWN instances that will implement the protocol
- The DWN instance will programmatically create REST and GRPC endpoints for a specific instance of a dApp for invocation by a transacting peer.
- The State of each P@P interaction will be maintained for the duration of the dApp execution (asynchronous and long running)
- Verification of dApp flow can be done by rendering the JSON/HOCON configuration back as a Petri Net, which in turn can be validated in terms of in terms of Liveness, Boundedness and Reachability
Please describe your plans to share the outputs and results of your project?
Decentralized Web Nodes has become a vital component of the Web3 /Web5 ecosystem along with Token Wallets - Lace, Identity Wallets - Prism, Decentralized Exchanges and Smart Contracts. It aims to provide data storage beyond what is provided by wallets, along with Hooks (Async Messaging Queue for Pub/Sub), Secure Communication (DIDComm) and Access Control (Authentication and Authorisation). It is also extendable by adding custom interfaces that allows a runtime for DApps, from simple sharing of contacts, events and playlist to more complex peer to peer trading in a Decentralized Marketplace. DIDx has an implementation of a DWN - aptly called D@WN in which we shall provide the runtime for orchestration as described above allowing the project to be tested against a POC scenario (workflow).