Wiki source code of Federation & Decentralization

Last modified by Robert Schaub on 2026/02/08 08:26

Hide last authors
Robert Schaub 1.1 1 = Federation & Decentralization =
2
3 FactHarbor is designed to operate as a **federated network of nodes** rather than a single central server.
4
5 Decentralization provides:
Robert Schaub 2.4 6
Robert Schaub 1.1 7 * **Resilience** against censorship or political pressure
8 * **Autonomy** for local governance and moderation
9 * **Scalability** across many independent communities
10 * **Trust** without centralized control
11 * **Domain specialization** (health-focused nodes, energy-focused nodes, etc.)
12
13 FactHarbor draws inspiration from the Fediverse but uses stronger structure, versioning, and integrity guarantees.
14
15
16 == 1. Federation Architecture Diagram ==
17
18 The following diagram shows the complete federated architecture with node components and communication layers.
19
Robert Schaub 2.12 20 {{include reference="Archive.FactHarbor 2026\.01\.20.Specification.Diagrams.Federation Architecture.WebHome"/}}
Robert Schaub 1.1 21
22
23 == 2. Federated FactHarbor Nodes ==
24
25 Each FactHarbor instance ("node") maintains:
Robert Schaub 2.4 26
Robert Schaub 1.1 27 * Its own database
28 * Its own AKEL instance
29 * Its own reviewers, experts, and contributors
30 * Its own governance rules
31
32 Nodes exchange structured information:
Robert Schaub 2.4 33
Robert Schaub 1.1 34 * Claims
35 * Scenarios
36 * Evidence metadata (not necessarily full files)
37 * Verdicts (optional)
38 * Hashes and signatures for integrity
39
40 Nodes choose which external nodes they trust.
41
42
43 == 3. Global Identifiers ==
44
45 Every entity receives a globally unique, linkable identifier.
46
Robert Schaub 2.1 47 **Format**:
Robert Schaub 1.1 48 `factharbor://node_url/type/local_id`
49
Robert Schaub 2.1 50 **Example**:
Robert Schaub 1.1 51 `factharbor://factharbor.energy/claim/CLM-55812`
52
53 **Supported types**:
Robert Schaub 2.4 54
Robert Schaub 1.1 55 * `claim`
56 * `scenario`
57 * `evidence`
58 * `verdict`
59 * `user` (optional)
60 * `cluster`
61
62 **Properties**:
Robert Schaub 2.4 63
Robert Schaub 1.1 64 * Globally consistent
65 * Human-readable
66 * Hash-derived
67 * Independent of database internals
68 * URL-resolvable (future enhancement)
69
70 This allows cross-node references and prevents identifier collisions in federated environments.
71
72
73 == 4. Trust Model ==
74
75 Each node maintains a **trust table** defining relationships with other nodes:
76
77 === 4.1 Trust Levels ===
78
79 **Trusted Nodes**:
Robert Schaub 2.4 80
Robert Schaub 1.1 81 * Claims auto-imported
82 * Scenarios accepted without re-review
83 * Evidence considered valid
84 * Verdicts displayed to users
85 * High synchronization priority
86
87 **Neutral Nodes**:
Robert Schaub 2.4 88
Robert Schaub 1.1 89 * Claims imported but flagged for review
90 * Scenarios require local validation
91 * Evidence requires re-assessment
92 * Verdicts shown with "external node" disclaimer
93 * Normal synchronization priority
94
95 **Untrusted Nodes**:
Robert Schaub 2.4 96
Robert Schaub 1.1 97 * Claims quarantined, manual import only
98 * Scenarios rejected by default
99 * Evidence not accepted
100 * Verdicts not displayed
101 * No automatic synchronization
102
103 === 4.2 Trust Affects ===
104
105 * **Auto-import**: Whether claims/scenarios are automatically added
106 * **Re-review requirements**: Whether local reviewers must validate
107 * **Verdict display**: Whether external verdicts are shown to users
108 * **Synchronization frequency**: How often data is exchanged
109 * **Reputation signals**: How external reputation is interpreted
110
111 === 4.3 Local Trust Authority ===
112
113 Each node's governance team decides:
Robert Schaub 2.4 114
Robert Schaub 1.1 115 * Which nodes to trust
116 * Trust level criteria
117 * Trust escalation/degradation rules
118 * Dispute resolution with partner nodes
119
120 Trust is **local and autonomous** - no global trust registry exists.
121
122
123 == 5. Data Sharing Model ==
124
125 === 5.1 What Nodes Share ===
126
127 **Always shared** (if federation enabled):
Robert Schaub 2.4 128
Robert Schaub 1.1 129 * Claims and claim clusters
130 * Scenario structures
131 * Evidence metadata and content hashes
132 * Integrity signatures
133
134 **Optionally shared**:
Robert Schaub 2.4 135
Robert Schaub 1.1 136 * Full evidence files (large documents)
137 * Verdicts (nodes may choose to keep verdicts local)
138 * Vector embeddings
139 * Scenario templates
140 * AKEL distilled knowledge
141
142 **Never shared**:
Robert Schaub 2.4 143
Robert Schaub 1.1 144 * Internal user lists
145 * Reviewer comments and internal discussions
146 * Governance decisions and meeting notes
147 * Access control data
148 * Private or sensitive content marked as local-only
149
150 === 5.2 Large Evidence Files ===
151
152 Evidence files are:
Robert Schaub 2.4 153
Robert Schaub 1.1 154 * Stored locally by default
155 * Referenced via global content hash
156 * Optionally served through IPFS
157 * Accessible via direct peer-to-peer transfer
158 * Can be stored in S3-compatible object storage
159
160 == 6. Synchronization Protocol ==
161
162 Nodes exchange data using multiple synchronization methods:
163
164 === 6.1 Push-Based Synchronization ===
165
166 **Mechanism**: Webhooks
167
168 When local content changes:
Robert Schaub 2.4 169
Robert Schaub 1.1 170 1. Node builds signed bundle
171 2. Sends webhook notification to subscribed nodes
172 3. Remote nodes fetch bundle
173 4. Remote nodes validate and import
174
175 **Use case**: Real-time updates for trusted partners
176
177 === 6.2 Pull-Based Synchronization ===
178
179 **Mechanism**: Scheduled polling
180
181 Nodes periodically:
Robert Schaub 2.4 182
Robert Schaub 1.1 183 1. Query partner nodes for updates
184 2. Fetch changed entities since last sync
185 3. Validate and import
186 4. Store sync checkpoint
187
188 **Use case**: Regular batch updates, lower trust nodes
189
190 === 6.3 Subscription-Based Synchronization ===
191
192 **Mechanism**: WebSub-like protocol
193
194 Nodes subscribe to:
Robert Schaub 2.4 195
Robert Schaub 1.1 196 * Specific claim clusters
197 * Specific domains (medical, energy, etc.)
198 * Specific scenario types
199 * Verdict updates
200
201 Publisher pushes updates only to subscribers.
202
203 **Use case**: Selective federation, domain specialization
204
205 === 6.4 Large Asset Transfer ===
206
207 For files >10MB:
Robert Schaub 2.4 208
Robert Schaub 1.1 209 * S3-compatible object storage
210 * IPFS (content-addressed)
211 * Direct peer-to-peer transfer
212 * Chunked HTTP transfer with resume support
213
214 == 7. Federation Sync Workflow ==
215
216 Complete synchronization sequence for creating and sharing new content:
217
218 === 7.1 Step 1: Local Node Creates New Versions ===
219
220 User or AKEL creates:
Robert Schaub 2.4 221
Robert Schaub 1.1 222 * New claim version
223 * New scenario version
224 * New evidence version
225 * New verdict version
226
227 All changes tracked with:
Robert Schaub 2.4 228
Robert Schaub 1.1 229 * VersionID
230 * ParentVersionID
231 * AuthorType
232 * Timestamp
233 * JustificationText
234
235 === 7.2 Step 2: Federation Layer Builds Signed Bundle ===
236
237 Federation layer packages:
Robert Schaub 2.4 238
Robert Schaub 1.1 239 * Entity data (claim, scenario, evidence metadata, verdict)
240 * Version lineage (ParentVersionID chain)
241 * Cryptographic signatures
242 * Node provenance information
243 * Trust metadata
244
245 Bundle format:
Robert Schaub 2.4 246
Robert Schaub 1.1 247 * JSON-LD for structured data
248 * Content-addressed hashes
249 * Digital signatures for integrity
250
251 === 7.3 Step 3: Bundle Includes Required Data ===
252
253 Each bundle contains:
Robert Schaub 2.4 254
Robert Schaub 1.1 255 * **Claims**: Full claim text, classification, domain
256 * **Scenarios**: Definitions, assumptions, boundaries
257 * **Evidence metadata**: Source URLs, hashes, reliability scores (not always full files)
258 * **Verdicts**: Likelihood ranges, uncertainty, reasoning chains
259 * **Lineage**: Version history, parent relationships
260 * **Signatures**: Cryptographic proof of origin
261
262 === 7.4 Step 4: Bundle Pushed to Trusted Neighbor Nodes ===
263
264 Based on trust table:
Robert Schaub 2.4 265
Robert Schaub 1.1 266 * Push to **trusted nodes** immediately
267 * Queue for **neutral nodes** (batched)
268 * Skip **untrusted nodes**
269
270 Push methods:
Robert Schaub 2.4 271
Robert Schaub 1.1 272 * Webhook notification
273 * Direct API call
274 * Pub/Sub message queue
275
276 === 7.5 Step 5: Remote Nodes Validate Lineage and Signatures ===
277
278 Receiving node:
Robert Schaub 2.4 279
Robert Schaub 1.1 280 1. Verifies cryptographic signatures
281 2. Validates version lineage (ParentVersionID chain)
282 3. Checks for conflicts with local data
283 4. Validates data structure and required fields
284 5. Applies local trust policies
285
286 Validation failures → reject or quarantine bundle
287
288 === 7.6 Step 6: Accept or Branch Versions ===
289
290 **Accept** (if validation passes):
Robert Schaub 2.4 291
Robert Schaub 1.1 292 * Import new versions
293 * Maintain provenance metadata
294 * Link to local related entities
295 * Update local indices
296
297 **Branch** (if conflict detected):
Robert Schaub 2.4 298
Robert Schaub 1.1 299 * Create parallel version tree
300 * Mark as "external branch"
301 * Allow local reviewers to merge or reject
302 * Preserve both version histories
303
304 **Reject** (if validation fails):
Robert Schaub 2.4 305
Robert Schaub 1.1 306 * Log rejection reason
307 * Notify source node (optional)
308 * Quarantine for manual review (optional)
309
310 === 7.7 Step 7: Local Re-evaluation Runs if Required ===
311
312 After import, local node checks:
Robert Schaub 2.4 313
Robert Schaub 1.1 314 * Does new evidence affect existing verdicts?
315 * Do new scenarios require re-assessment?
316 * Are there contradictions with local content?
317
318 If yes:
Robert Schaub 2.4 319
Robert Schaub 1.1 320 * Trigger AKEL re-evaluation
321 * Queue for reviewer attention
322 * Update affected verdicts
323 * Notify users following related content
324
325 == 8. Cross-Node AI Knowledge Exchange ==
326
327 Each node runs its own AKEL instance and may exchange AI-derived knowledge:
328
329 === 8.1 What Can Be Shared ===
330
331 **Vector embeddings**:
Robert Schaub 2.4 332
Robert Schaub 1.1 333 * For cross-node claim clustering
334 * For semantic search alignment
335 * Never includes training data
336
337 **Canonical claim forms**:
Robert Schaub 2.4 338
Robert Schaub 1.1 339 * Normalized claim text
340 * Standard phrasing templates
341 * Domain-specific formulations
342
343 **Scenario templates**:
Robert Schaub 2.4 344
Robert Schaub 1.1 345 * Reusable scenario structures
346 * Common assumption patterns
347 * Evaluation method templates
348
349 **Contradiction alerts**:
Robert Schaub 2.4 350
Robert Schaub 1.1 351 * Detected conflicts between claims
352 * Evidence conflicts across nodes
353 * Scenario incompatibilities
354
355 **Metadata and insights**:
Robert Schaub 2.4 356
Robert Schaub 1.1 357 * Aggregate quality metrics
358 * Reliability signal extraction
359 * Bubble detection patterns
360
361 === 8.2 What Can NEVER Be Shared ===
362
363 **Model weights**: No sharing of trained model parameters
364
365 **Training data**: No sharing of full training datasets
366
367 **Local governance overrides**: AKEL suggestions can be overridden locally
368
369 **User behavior data**: No cross-node tracking
370
371 **Internal review discussions**: Private content stays private
372
373 === 8.3 Benefits of AI Knowledge Exchange ===
374
375 * Reduced duplication across nodes
376 * Improved claim clustering accuracy
377 * Faster contradiction detection
378 * Shared scenario libraries
379 * Cross-node quality improvements
380
381 === 8.4 Local Control Maintained ===
382
383 * Nodes accept or reject shared AI knowledge
384 * Human reviewers can override any AKEL suggestion
385 * Local governance always has final authority
386 * No external AI control over local content
387 * Privacy-preserving knowledge exchange
388
389 == 9. Decentralized Processing ==
390
391 Each node independently performs:
Robert Schaub 2.4 392
Robert Schaub 1.1 393 * AKEL processing
394 * Scenario drafting and validation
395 * Evidence review
396 * Verdict calculation
397 * Truth landscape summarization
398
399 Nodes can specialize:
Robert Schaub 2.4 400
Robert Schaub 1.1 401 * Health-focused node with medical experts
402 * Energy-focused node with domain knowledge
403 * Small node delegating scenario libraries to partners
404 * Regional node with language/culture specialization
405
406 Optional data sharing includes:
Robert Schaub 2.4 407
Robert Schaub 1.1 408 * Embeddings for clustering
409 * Claim clusters for alignment
410 * Scenario templates for efficiency
411 * Verdict comparison metadata
412
413 == 10. Scaling to Thousands of Users ==
414
415 Nodes scale independently through:
Robert Schaub 2.4 416
Robert Schaub 1.1 417 * Horizontally scalable API servers
418 * Worker pools for AKEL tasks
419 * Hybrid storage (local + S3/IPFS)
420 * Redis caching for performance
421 * Sharded or partitioned databases
422
423 Federation allows effectively unlimited horizontal scaling by adding new nodes.
424
425 Communities may form:
Robert Schaub 2.4 426
Robert Schaub 1.1 427 * Domain-specific nodes (epidemiology, energy, climate)
428 * Language or region-based nodes
429 * NGO or institutional nodes
430 * Private organizational nodes
431 * Academic research nodes
432
433 Nodes cooperate through:
Robert Schaub 2.4 434
Robert Schaub 1.1 435 * Scenario library sharing
436 * Shared or overlapping claim clusters
437 * Expert delegation between nodes
438 * Distributed AKEL task support
439 * Cross-node quality audits
440
441 == 11. Federation and Release 1.0 ==
442
443 **POC**: Single node, optional federation experiments
444
445 **Beta 0**: 2-3 nodes, basic federation protocol
446
447 **Release 1.0**: Full federation support with:
Robert Schaub 2.4 448
Robert Schaub 1.1 449 * Robust synchronization protocol
450 * Trust model implementation
451 * Cross-node AI knowledge exchange
452 * Federated search and discovery
453 * Distributed audit collaboration
454 * Inter-node expert consultation
455
456 == 12. Related Pages ==
457
Robert Schaub 2.9 458 * [[AKEL (AI Knowledge Extraction Layer)>>Archive.FactHarbor 2026\.01\.20.Specification.AI Knowledge Extraction Layer (AKEL).WebHome]]
Robert Schaub 2.11 459 * [[Data Model>>Archive.FactHarbor 2026\.01\.20.Specification.Data Model.WebHome]]
Robert Schaub 2.10 460 * [[Architecture>>Archive.FactHarbor 2026\.01\.20.Specification.Architecture.WebHome]]
Robert Schaub 2.13 461 * [[Workflows>>Archive.FactHarbor 2026\.01\.20.Specification.Workflows.WebHome]]