Skip to content

Commit a6cd6c8

Browse files
authored
Merge pull request #7 from pubky/chore/review
feat: clearing concepts for hackweek
2 parents b3138aa + 9407076 commit a6cd6c8

28 files changed

+103
-31
lines changed

.obsidian/workspace.json

+36-18
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,26 @@
1313
"state": {
1414
"type": "markdown",
1515
"state": {
16-
"file": "readme.md",
16+
"file": "App Architectures/2. Client - Homeserver.md",
17+
"mode": "source",
18+
"source": false
19+
}
20+
}
21+
},
22+
{
23+
"id": "eaab76dfc5b558e5",
24+
"type": "leaf",
25+
"state": {
26+
"type": "markdown",
27+
"state": {
28+
"file": "App Architectures/4. Custom Backend.md",
1729
"mode": "source",
1830
"source": false
1931
}
2032
}
2133
}
22-
]
34+
],
35+
"currentTab": 1
2336
}
2437
],
2538
"direction": "vertical"
@@ -85,7 +98,7 @@
8598
"state": {
8699
"type": "backlink",
87100
"state": {
88-
"file": "readme.md",
101+
"file": "App Architectures/4. Custom Backend.md",
89102
"collapseAll": false,
90103
"extraContext": false,
91104
"sortOrder": "alphabetical",
@@ -102,7 +115,7 @@
102115
"state": {
103116
"type": "outgoing-link",
104117
"state": {
105-
"file": "readme.md",
118+
"file": "App Architectures/4. Custom Backend.md",
106119
"linksCollapsed": false,
107120
"unlinkedCollapsed": true
108121
}
@@ -125,7 +138,7 @@
125138
"state": {
126139
"type": "outline",
127140
"state": {
128-
"file": "readme.md"
141+
"file": "App Architectures/4. Custom Backend.md"
129142
}
130143
}
131144
}
@@ -147,8 +160,24 @@
147160
"hide-folders:Show hidden folders": false
148161
}
149162
},
150-
"active": "8fd5812ca70f0ab7",
163+
"active": "eaab76dfc5b558e5",
151164
"lastOpenFiles": [
165+
"Pubky App/Introduction.md",
166+
"App Architectures/4. Custom Backend.md",
167+
"Pubky Core/Introduction.md",
168+
"App Architectures/1. Introduction.md",
169+
"Pubky Applications.md",
170+
"App Architectures/5. Complex - Custom Aggregator.md",
171+
"App Architectures/2. Client - Homeserver.md",
172+
"App Architectures/3. Global Aggregators.md",
173+
"Pubky Core.md",
174+
"images/complex_custom_aggregator.png",
175+
"images/global_aggregator.png",
176+
"images/global-aggregator.png",
177+
"images/custom_backend.png",
178+
"images/client-homeserver.png",
179+
"images/custom-backend.png",
180+
"readme.md",
152181
"index.md",
153182
"ELI5.md",
154183
"Technologies/Paykit.md",
@@ -158,24 +187,14 @@
158187
"Technologies/DoH.md",
159188
"Technologies/DNS.md",
160189
"Technologies/DHT.md",
161-
"Pubky Core/Introduction.md",
162190
"Pubky Core/Data Stores.md",
163191
"Pubky Core/Pkarr/4.Architecture.md",
164192
"Pubky Core/Pkarr/3.Expectations.md",
165193
"Pubky Core/Pkarr/2.Getting Started with Pkarr.md",
166194
"Pubky Core/Pkarr/1.Why Pkarr?.md",
167195
"Pubky Core/Pkarr/0.Introduction.md",
168196
"Pubky Core/notes/3.Protocols.md",
169-
"Pubky Core/notes/2.Incentives.md",
170-
"Pubky Core/notes/1.Adoption.md",
171-
"PubKy App/Introduction.md",
172-
"PubKy App/Client/Introduction.md",
173-
"PubKy App/Backend/Web Server.md",
174-
"PubKy App/Backend/Introduction.md",
175-
"PubKy App/Backend/Indexer.md",
176-
"PubKy App/Backend/Aggregator.md",
177197
"images/obsidian.png",
178-
"Concepts/3.Credible Exit.md",
179198
"quartz/public/404.html",
180199
"quartz/public/static/og-image.png",
181200
"quartz/public/static/icon.png",
@@ -188,7 +207,6 @@
188207
"quartz/public/index.html",
189208
"quartz/public/Technologies/index.html",
190209
"quartz/public/Technologies/Paykit.html",
191-
"quartz/public/quartz/quartz/static/og-image.png",
192-
"quartz/public/quartz/quartz/static/icon.png"
210+
"quartz/public/quartz/quartz/static/og-image.png"
193211
]
194212
}

App Architectures/1. Introduction.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Leveraging the [[Pubky Core/Introduction|Introduction]] protocol as the foundational layer, we can envision app a diverse array of client applications with distinct functionalities. While each app can implement its own unique design patterns and user interfaces, they all share a common underlying architecture: interacting with the distributed data stores, colloquially referred to as [[Data Stores |home servers]], through standardized read and write operations.
2+
3+
The [[Pubky Core/Introduction|Pubky Core protocol]] enables a decentralized approach to data management, facilitating seamless communication between clients and their respective data stores. This architecture promotes data sovereignty and enhances system resilience.
4+
5+
Below, we present several high-level designs that showcase the versatility of this architecture, from simple client (browser) apps that interact directly with one or several homeservers to more complex applications with custom aggregators and backends capable of powerful inference:
6+
7+
- [[2. Client - Homeserver|Client-Homeserver]]
8+
- [[4. Custom Backend|Custom backend]]
9+
- [[3. Global Aggregators|Global aggregators]]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
![[client-homeserver.png]]
2+
3+
In this architecture, we implement a direct communication model between the client application and the home server. This approach minimizes latency and reduces system complexity by establishing a direct data flow pathway.
4+
5+
This design pattern is particularly well-suited for applications with straightforward functionality, especially those that don't require real-time interaction or data normalization. This architectural approach demonstrates optimal performance in use cases characterized by intermittent data operations, where asynchronous read/write cycles are adequate for maintaining data consistency and fulfilling application requirements.
6+
7+
To illustrate the practical applications of this architectural paradigm, consider the following implementation scenarios:
8+
9+
1. Bookmark Management System: A client application designed to store and retrieve user bookmarks directly from the home server.
10+
2. File Synchronization Utility: Similar to the open-source [Syncthing](https://syncthing.net/) project, this type of application would facilitate direct file synchronization between the client and the home server.
11+
3. Text Snippet Repository: A lightweight application for creating, storing, and retrieving short text fragments or code snippets as [pastebin](https://pastebin.com/)
12+
13+
These implementations leverage the Pubky Core protocol to establish secure, efficient, and direct data exchange channels between the client and the home server, while the user remains with ownership of their data.
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
![[global_aggregator.png]]
2+
3+
This architectural pattern implements a distributed system model centered around a global aggregation layer, eliminating the need to fetch data from a multitude (maybe thousands!) of homesevers by the client. The core component of this design is a centralized global aggregator that interfaces with multiple home servers, consuming events from each in a unified manner.
4+
5+
Key features of this architecture include:
6+
7+
1. **Centralized Event Processing:** The global aggregator serves as a single point of convergence for event streams originating from disparate home servers across the network.
8+
2. **Policy-Driven Filtering:** The aggregators can optionally implement a configurable set of policies and filtering rules, allowing for dynamic event processing based on predefined criteria.
9+
3. **Client Flexibility and Aggregator Choice:** Clients consume data from the global aggregator stream. However, if a client finds the enforced rules of one aggregator unsuitable, it retains the flexibility to switch to an alternative global aggregator that better aligns with its requirements or selectively look for the homeservers itself.
10+
4. **Scalable Event Distribution:** By centralizing the aggregation process, this architecture facilitates efficient event distribution to multiple clients, potentially reducing redundant processing and network overhead.
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
![[custom_backend.png]]
2+
3+
This architectural design introduces a more sophisticated data flow model, incorporating an intermediary backend layer between the client application and the home server. This backend functions as a middleware, enhancing the system's flexibility and data processing capabilities.
4+
5+
The backend can be potentially comprised with many components. These components will depend on the client app needs, but these are the main ones
6+
7+
1. __Indexer__: Responsible for data normalization, ensuring consistent data structures and optimizing query performance.
8+
2. __Aggregator__: Implements event filtering logic, allowing for selective data propagation based on predefined criteria.
9+
10+
11+
This architecture supports two distinct data consumption patterns:
12+
13+
a) For scenarios requiring both data normalization and event filtering, the client interacts with the backend layer, as an endpoint. The aggregator processes the event stream from the home servers, applying filtering rules before passing the data to the indexer for normalization.
14+
15+
b) In cases where only data normalization is necessary, the backend can bypass or not implement the aggregator, consuming events directly from the home server via the indexer.
16+
17+
This modular approach allows for fine-grained control over data processing, enabling efficient resource utilization and optimized client-side performance based on specific application requirements.
18+
19+
An example of a complex backend that does aggregation, normalization, indexation, filtering (compliance) and powerful inference is [Pubky-Nexus](https://github.com/pubky/pubky-nexus), the backend that powers the [[Pubky App/Introduction|Pubky App]] social features.
20+
File renamed without changes.
File renamed without changes.

PubKy App/Backend/Introduction.md Pubky App/Backend/Introduction.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ Imagine you're trying to find a specific document in a large library. The backen
88

99
- [[Aggregator|Aggregators]] execute a **data retrieval protocol** to obtain data from **data storage**, initiating a process that retrieves and collects data from various sources.
1010
- [[Indexer|Indexers]] receive aggregated data from the **Aggregators** and initiate a rigorous **data normalization** process, transforming and converting the data into a standardized format to ensure consistency and accuracy.
11-
- [[Web Server|Web servers]] provide the requested data to [[PubKy App/Client/Introduction|Pubky client]]
11+
- [[Web Server|Web servers]] provide the requested data to [[Pubky App/Client/Introduction|Pubky client]]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

PubKy App/Client/Introduction.md Pubky App/Client/Introduction.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
![pubkey-client](../../images/pubky-header.png)
44

5-
The Pubky client will be available as both a desktop application and a hosted website service (standard website) that allows users to interface with the social media layer of [[PubKy App/Backend/Introduction|Pubky Backend]] using [Synonym](https://synonym.to/) hosted services.
5+
The Pubky client will be available as both a desktop application and a hosted website service (standard website) that allows users to interface with the social media layer of [[Pubky App/Backend/Introduction|Pubky Backend]] using [Synonym](https://synonym.to/) hosted services.
66

7-
Using the library analogy again, the Pubky Client is like a personalized research assistant who takes the prepared documents from the librarian ([[PubKy App/Backend/Introduction|backend]]) and creates a customized report just for you. This report is designed to be easy to read and understand, with all the relevant information presented in a clear and concise manner.
7+
Using the library analogy again, the Pubky Client is like a personalized research assistant who takes the prepared documents from the librarian ([[Pubky App/Backend/Introduction|backend]]) and creates a customized report just for you. This report is designed to be easy to read and understand, with all the relevant information presented in a clear and concise manner.
88

99
- Users are able to take control of the data and exit the Synonym hosted services and run their own without hampering discoverability ([[3.Credible Exit|credible exit]]).
1010

PubKy App/Introduction.md Pubky App/Introduction.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![pubkey-app](../images/pubky-app.png)
22

3-
> Synonym will be initially hosting: [[Data Stores|Data stores]] and [[PubKy App/Introduction|Pubky App]]
3+
> Synonym will be initially hosting: [[Data Stores|Data stores]] and [[Pubky App/Introduction|Pubky App]]
44
55
## Overview
66

@@ -13,12 +13,12 @@ Pubky-app's initial focus is building a decentralized social media protocol.
1313
- [[Aggregator|Aggregators]] collecting social graphs
1414
- Feeds of followings' activities
1515
- [[Search|Searching]] profiles and posts
16-
- Notification delivery through [[PubKy App/Backend/Introduction|aplication backends]]
16+
- Notification delivery through [[Pubky App/Backend/Introduction|aplication backends]]
1717
- Distributed moderation through user blocking
1818

1919
## Components
2020

21-
The Pubky App is a complex system that can be broken down into two main components: the [[PubKy App/Backend/Introduction|backend]] and the [[PubKy App/Client/Introduction|client]]. These two pieces work together to provide a seamless user experience.
21+
The Pubky App is a complex system that can be broken down into two main components: the [[Pubky App/Backend/Introduction|backend]] and the [[Pubky App/Client/Introduction|client]]. These two pieces work together to provide a seamless user experience.
2222

2323
##### Backend: The Data Organizer
2424

@@ -33,4 +33,4 @@ It is the part of the Pubky App that you interact with directly. It's responsibl
3333
The early versions of Pubky app take some shortcuts over the [[Pubky Core/Introduction|Pubky Core]] design. The MVP app is centralized, therefore we saved time and complexity by aggregating functionality into fewer components. The main two components are the `Homeserver` and the `Indexer`
3434

3535
- The `Homeserver` fulfils the function of [[Data Stores|data stores]], [[0.Introduction|Pkarr]] republishing for users, identity-provider (Oauth-like sign-in). Users maintain a trust relationship with the `Homeserver`.
36-
- The `Indexer` fulfils the function of the [[PubKy App/Backend/Introduction|backend]] for the Pubky App.
36+
- The `Indexer` fulfils the function of the [[Pubky App/Backend/Introduction|backend]] for the Pubky App.

Pubky Core/Introduction.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ Pubky Core is built on a few core concepts:
1010

1111
Pubky Core's distributed architecture aims to provide user autonomy through [[3.Credible Exit|credible exit]] between interchangeable components.
1212

13+
- **[[1. Introduction|Pubky App Architectures]]** can be very diverse. From simple web client applications that connect to a single [[2. Client - Homeserver|homeserver]] for data storage and retrieval to [[4. Custom Backend| complex backends]] that do aggregation and powerful inference over many homeservers creating abstractions such as social media with [[1.Web of Trust|web of trust]].
14+
1315
## Target Users
1416

1517
Pubky Core is made for developers and builders of internet software products. We will actively work to cultivate a community of builders and startups using our tech.
1618

17-
[[PubKy App/Introduction|Pubky App]] is made for anyone interested in social media and online publishing that wants new ways to control their data and more control over which posts they see.
19+
[[Pubky App/Introduction|Pubky App]] is made for anyone interested in social media and online publishing that wants new ways to control their data and more control over which posts they see.
1820

1921
## Why? What is the reward?
2022

21-
The reward for everyone is a more open, privacy-focused, usable, modular and secure web. The reward for [Synonym](https://synonym.to/) is to be positioned to disrupt Big Tech as an industry, gaining user recognition and reputation through the effort of building a decentralized ecosystem. The ultimate potential is for [Synonym](https://synonym.to/) to become a major player in online publishing & social media, while also monetizing in ways similar to Google, as well as opportunities to introduce new users to our ecosystem of products and services.
23+
The reward for everyone is a more open, privacy-focused, usable, modular and secure web. The reward for [Synonym](https://synonym.to/) as lead of this project is to be positioned to disrupt Big Tech as an industry, gain user recognition and hopefully reputation through the effort of building a decentralized ecosystem. The ultimate potential is for [Synonym](https://synonym.to/) to become a major player in online publishing & social media, while also monetizing in ways similar to Google (e.g., search and aggregation over the web -> search / aggregation and tools for sovereign data stores), as well as opportunities to introduce new users to our ecosystem of products and services (e.g., bitcoin payments infrastructure)

TLDR.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[[PubKy App/Introduction|Pubky App]] is a decentralized alternative to social media platforms like Twitter. It uses a distributed architecture where:
1+
[[Pubky App/Introduction|Pubky App]] is a decentralized alternative to social media platforms like Twitter. It uses a distributed architecture where:
22

33
- Users host their own data on independent [[Data Stores|data stores]]
44
- Services [aggregate](Aggregator.md) data across stores into a unified view

images/client-homeserver.png

43.2 KB
Loading

images/complex_custom_aggregator.png

80.2 KB
Loading

images/custom_backend.png

56.1 KB
Loading

images/global_aggregator.png

63.5 KB
Loading

images/pubky-app.png

-23.9 KB
Loading

index.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Welcome to the Pubky Knowledge Base
22

3-
This is the [[Pubky Core/Introduction|Pubky Core]] and [[PubKy App/Introduction|Pubky App]] knowledge base. Currently these docs are a mix of reality, dreams, visions, technicalities, actuality and plans.
3+
This is the [[Pubky Core/Introduction|Pubky Core]] and [[Pubky App/Introduction|Pubky App]] knowledge base. Currently these docs are a mix of reality, dreams, visions, technicalities, actuality and plans.
44

55
1. Cloud storage with [[3.Credible Exit|credible exit]] (in the current implementation, it is just a web server + [[0.Introduction|pkarr]])
66
2. On top of that we build a [[1.Web of Trust|Web of Trust]]
7-
3. [[PubKy App/Introduction|Pubky App]] is the main demonstration of how should this distributed data be crawled, indexed and searched at scale (albeit at a centralized setup).
7+
3. [[Pubky App/Introduction|Pubky App]] is the main demonstration of how should this distributed data be crawled, indexed and searched at scale (albeit at a centralized setup).
88
4. By decoupling features from centralized control, independent development remains open and vibrant.
99

1010
## Get Started
1111

12-
A good place to start is the [[PubKy App/Introduction|Pubky App]], [[TLDR]] or our pubky-core [[ELI5]]
12+
A good place to start is the [[Pubky App/Introduction|Pubky App]], [[TLDR]] or our pubky-core [[ELI5]]

0 commit comments

Comments
 (0)