> For the complete documentation index, see [llms.txt](https://docs.dpsn.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dpsn.org/understanding-topics.md).

# Understanding Topics

**Topics are backbone of any messaging pub/sub infrastructure that enables routing of messages from publishers to subscribers and any pub/sub messaging infrastructure main goal is to make them happen efficiently with thre required traits of the infrastructure.**

Our core focus is to provide a decentralised Pub/Sub infrastructure to the world that is as fast and reliable as any other messaging infrastructure that exists today like AWS's SQS / SNS / Kinesis etc., Google's Firebase Cloud Messaging / GCM, Azure Service Bus along with added advantages of decentralised infrastructure like privacy, security and censorship resistance.

**Topics in DPSN are essentially named channels or feeds of messages.** Similar to other pub/sub systems, they serve as a way to categorize and distribute data to interested subscribers.

#### Key Characteristics of Topics in DPSN

* **Decentralized Ownership:** Unlike traditional pub/sub systems, topics in DPSN have owners who control access and publishing rights.
* **Transferable:** Topic ownership can be transferred between users, enabling a dynamic marketplace for topics.
* **Hierarchical Structure:** Topics can be organized in a hierarchical structure, allowing for granular categorization.
* **FHE Compatibility:** DPSN supports fully homomorphic encryption, enabling privacy-preserving data sharing through topics.

#### Example: A Financial Data Platform ( following topics and subtopics are just example and not real topics of data streams)&#x20;

A financial data platform might use DPSN topics in the following way:

* **Primary Topic:** "ogtest-73803f8d5e"
* **Sub-topics:**
  * ogtest-73803f8d5e/cryptocurrency &#x20;
  * ogtest-73803f8d5e/stocks&#x20;
  * ogtest-73803f8d5e/forex

Within these sub-topics, more specific topics can be created:

* ogtest-73803f8d5e/cryptocurrency/bitcoin/pric&#x65;**:** Real-time Bitcoin price data
* ogtest-73803f8d5e/cryptocurrency/bitcoin/volum&#x65;**:** Real-time Bitcoin volume data
* ogtest-73803f8d5e/cryptocurrency/ethereum/pric&#x65;**:** Real-time Ethereum price data
* ogtest-73803f8d5e/stocks/nasdaq/AAPL/pric&#x65;**:** Apple stock price data from Nasdaq

**Subscribers** can then subscribe to these topics to receive the specific data they are interested in. For instance, a trader system might subscribe to the "ogtest-73803f8d5e/cryptocurrency/bitcoin/price" topic to get real-time Bitcoin price updates. A trader system who is interested in volumes of all currencies can subscribe to wildcard topic "ogtest-73803f8d5e/cryptocurrency/bitcoin/volume"*. Similarly, a trader system interested in all stocks data can subscribe to* ogtest-73803f8d5e/stock&#x73;*.*

Topics in DPSN are a fundamental building block for organizing and distributing data. Their decentralized nature, combined with the support for FHE, makes DPSN a powerful platform for secure and efficient data sharing.
