Energy Web Documentation
  • Energy Web Ecosystem
  • Launchpad by Energy Web
  • EWC Validator Documentation
  • Community Ressources
  • Legacy documentation
  • Welcome to Energy Web
  • Glossary
  • Solutions 2023
    • ↔️Data Exchange
      • Data Exchange Overview
      • Data Exchange Architecture
      • Use Cases and Refrence Implementations
        • Digital Spine for Electricity Markets
          • Digital Spine Integration Client Deployment Guide - from Azure marketplace
        • E-Mobility Management
    • 🔌Open Charging Network
      • Create and Manage an OCN Identity
      • Connect an OCPI/OCN Party to a Node
        • 1. Make your backend service OCN-ready
        • 2. Select an OCN Node and register in OCN Registry
        • 3. Manage your Whitelist and Blacklist
        • 4. Connect your service to an OCN Node
      • Run an OCN Node
      • Use the OCN Service Interface
        • Offer an OCN Service
        • Sign up for an OCN Service
      • Develop on the Test Network
      • Develop on the Production Network
      • Open Source Development
        • Maturity Model, Feature Roadmap and Releases
        • Developer Community Calls
      • E-Mobility Dashboard v0.1
  • EW-DOS Technology Components 2023
    • EW-DOS Overview
    • Worker Nodes
      • Worker Node Process Diagrams
      • Worker Node Architecture
      • Worker Node Guides
        • Deploy Worker Nodes
        • Customize Worker Logic
    • Identity and Access Management (IAM)
      • IAM Guides
        • Implement an SSI Hub instance
        • Verifiable Credential API
        • Sign-In with Ethereum
        • Using Switchboard
          • Switchboard Transaction Cost Estimates
      • IAM Patterns
        • Assets as Ownable Smart Contracts
        • Credential Lifecycle
        • Credential Metadata
        • SSI Credential Governance using ENS Domains
      • IAM Libraries
      • SSI Hub
      • Switchboard Application
    • Decentralized Data Hub (DDHub)
      • DDHub Message Broker
      • DDHub Client Gateway
      • DDHub Patterns
        • Channels and Topics
      • DDHub Guides
    • Green Proofs Contracts
    • Energy Web X
    • The Energy Web Chain
      • EWC Overview
      • System Architecture
        • Proof-of-Authority Consensus Mechanism
        • System Contracts
          • Name Registry
          • Holding Contract
          • Block Reward Contract
          • Validator-Set Contracts
        • Validator Node Architecture
      • Energy Web Block Explorer
      • Validator Node Installation Specifications
        • Volta Test Network: Validator Node Installation
      • Energy Web Chain Governance
      • EWC Guides and Tutorials
        • Getting started with Energy Web Chain
        • Developing on the Volta Test Network and Main Network (Energy Web Chain)
        • Run a Local RPC Node
          • Run RPC Node using Nethermind client
        • Deploy a Smart Contract on Volta with Remix
        • Interacting with Smart Contracts in EW-DOS
        • Set up MetaMask to interact with Energy Web Chain
        • Using the Ethereum Name Service
        • Using Oracles
      • Energy Web Token (EWT)
  • 🧠Foundational Concepts
    • Open-Source Software
    • Scaling Access to Grid Flexibility
    • Facilitating Clean Energy Purchases
    • Ethereum
      • Transactions and Transaction Costs
    • Self-Sovereign-Identity
      • Self-Sovereign Use Case Interaction
    • Cryptocurrency Wallets
      • Software cryptocurrency wallets
        • Metamask
        • Mycrypto wallet
      • Hardware cryptocurrency wallets
      • Hierarchical Deterministic (HD) Wallets
Powered by GitBook
On this page
  • Channels
  • Topics
Export as PDF
  1. EW-DOS Technology Components 2023
  2. Decentralized Data Hub (DDHub)
  3. DDHub Patterns

Channels and Topics

In EW Data Exchange, the DDHub Message Broker is analogous to a computer - it is foundational infrastructure upon which participants gain the ability to establish their own “profiles”, exchange messages, and run their own applications. The DDHub Message Broker routes and translates messages between participants. Messages are structured and organised in distinct channels corresponding to specific use cases or business processes, and formatted in topics which define data formats and schemas.

In order to access certain channels and gain permissions to send and/or receive specific message types, participants must acquire roles that reflect their role within the market (or use case), using credentials attached to their self-determined identity. Credentials are granted by a platform governing body and determine the ability to send messages to other participants using channels (what messages are sent and received) and topics (data schemas that define the payload of a message).

Channels

Channels are defined at the client gateway, and are what messages are sent and received on. Participants define a channel as:

  • Type: Publish/Subscribe

  • Topics: Any that the DID has visibility of

  • Restrictions: Who will receive a message on a publish channel, or who I will receive a message from on a sub channel. Channels can be restricted by DID or role

An example of a channel definition object is provided below. In this example, the channel will receive RealTimePricing or DayAheadPricing from any DID with the role: user.roles.internal.apps.operator.iam.ewc and does not specify that payload encryption is required.

// Market Pricing Channel Example
 {
        "fqcn": "pricingtopics.sub",
        "type": "sub",
        "conditions": {
            "topics": [
                {
                    "topicName": "RealTimePricing",
                    "owner": "internal.apps.operator.iam.ewc",
                    "topicId": "62f9b4123bef104db2264f2b",
                    "schemaType": "JSD7"
                },
                {
                    "topicName": "DayAheadPricing",
                    "owner": "internal.apps.operator.iam.ewc",
                    "topicId": "62f9b4644bfe104db22642c0",
                    "schemaType": "JSD7"
                }
            ],
            "dids": [],
            "roles": [
                "user.roles.internal.apps.operator.iam.ewc"
            ],
            "qualifiedDids": [
                "did:ethr:volta:0x135ebb63ab839bef3e292e55dcF4A98Bfe38Ba47A9",
                "did:ethr:volta:0x87795f53b443ece663986f46e6747fb10dbc6745fC"
            ]
        },
        "payloadEncryption": false,
        "createdDate": "2022-08-16T00:03:46.164Z",
        "updatedDate": "2022-09-04T22:33:43.313Z"
    }

Topics

Topics are data schemas that define the payload of a message within a channel. They are grouped under owners that are used as an authorization unit for visibility. Two examples of Topics for publishing and acknowledging a distribution network line constraint are provided below:

// Constraint Publication Example
{
    "participantId": "string",
    "submissionTimestamp": "string",
    "networkConstraints": [
        {
            "meterID": "string:",
            "intervals": [
                {
                    "activePowerExportLimit": 0.0,
                    "activePowerImportLimit": 0.0,
                    "diEndtime": "string",
                    "diStarttime": "string"
                }
            ]
        }
    ]
}
// Constraint Acknowledgement Example
{
    "data": {
        "initiatingMessageId": "string",
        "initiatingTransactionId": "string",
        "systemProcessedDttm": "datetime"
    },
    "acknowledgements": [
        {
            "code": "string",
            "title": "string",
            "detail": "string",
            "source": "string"
        }
    ],
    "errors": [
        {
            "code": "string",
            "title": "string",
            "detail": "string",
            "source": "string"
        }
    ],
    "warnings": [
        {
            "code": "string",
            "title": "string",
            "detail": "string",
            "source": "string"
        }
    ]
}

\

PreviousDDHub PatternsNextDDHub Guides

Last updated 2 years ago