English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

YaCy.Uno Design Plan: A Cross-Platform P2P Search Engine Built on Uno Platform and .NET 9

Forum topic · ✨步子哥 · 2026-02-17

Summary

YaCy.Uno is a proposed C#/.NET 9 implementation of the YaCy decentralized P2P search engine, built on Uno Platform 5.x and fully compatible with the YaCy P2P protocol (network: freeworld), interoperating with the Java and Go versions. The design specifies SQLite FTS5 for full-text indexing with BM25 ranking plus title, link, freshness, and language factors; a polite multi-threaded web crawler with robots.txt compliance and incremental fetching; a DHT with 256 partitions and redundancy factor 3; and full implementation of YaCy protocol endpoints such as /yacy/hello, /yacy/search, and /yacy/transferRWI. The stack uses ASP.NET Core Kestrel (ports 8900/8943), AngleSharp, PdfPig, Open XML SDK/NPOI, jieba.NET for Chinese tokenization, Serilog, and CommunityToolkit.Mvvm. It targets Windows, macOS, Linux, WebAssembly, iOS, and Android, with a Material Design 3 UI, a Spectre.Console TUI client, REST/SSE/SignalR APIs, Docker deployment, and Apache 2.0 licensing. The document includes the full project structure, module designs, API surface, UI pages, security (TLS, JWT, RSA 2048 peer keys), and internationalization plans.

YaCy.Uno Design Plan (Uno Platform / .NET 9 P2P Search Engine)

YaCy.Uno is a proposed C# reimplementation of the YaCy decentralized peer-to-peer search engine, based on Uno Platform 5.x + .NET 9. It aims for full compatibility with the YaCy P2P protocol (network: freeworld), interoperation with the Java and Go YaCy nodes, and deployment on Windows, macOS, Linux, WebAssembly, iOS, and Android. Default ports: 8900 (HTTP) / 8943 (HTTPS).

Key points

  • Positioning: Full YaCy P2P Protocol v1 compatibility; Material Design 3 UI; multi-target (Desktop / WASM / Mobile / CLI / Docker); Apache 2.0 license.
  • Search stack: SQLite FTS5 full-text index (tokenize = 'unicode61 porter') over a documents metadata table (EF Core 9), with a pipeline of QueryParser → FTS5 BM25 match → parallel P2P remote search → merged ranking → FTS5 highlight snippets → SSE/SignalR streaming.
  • Ranking factors: BM25 relevance 40%, title match 20%, inbound links 15%, URL depth 10%, freshness 10%, language match 5%.
  • Crawler: parallel workers via Channel<T> + Tasks, per-domain rate limiting, robots.txt/meta robots and sitemap support, incremental crawling (If-Modified-Since / ETag), persistent SQLite URL queue, live status via SignalR/SSE.
  • P2P/DHT: implements YaCy endpoints /yacy/hello, /yacy/search, /yacy/seedlist, /yacy/transferRWI, /yacy/transferURL, /yacy/crawlReceipt, /yacy/query, /yacy/profile, /yacy/idx.json, /yacy/message. DHT: 256 partitions, redundancy factor 3, background index distribution. Peer types: virgin / junior / senior / principal.
  • Parsers: IDocumentParser interface with 30+ formats — HTML (AngleSharp), PDF (PdfPig), Office (Open XML SDK / NPOI), RSS/Atom, XML/SVG, JSON, plain text, image EXIF. Chinese full-text search via jieba.NET segmenter applied before FTS ingestion.
  • Technology choices: ASP.NET Core Kestrel (Web API), Serilog, Polly (retry/circuit breaker), CommunityToolkit.Mvvm, LiveChartsCore, Spectre.Console TUI, xUnit / NSubstitute / BenchmarkDotNet for testing.
  • Architecture

    Layered design:

    1. Presentation — Uno XAML UI (Desktop/WASM/Mobile), ASP.NET Core Web API (REST/SSE/WebSocket), Spectre.Console TUI. 2. Application services — Search, Crawl, P2P/DHT, and Index services. 3. Core engine — SQLite FTS5 index, document parsers, YaCy-compatible protocol layer. 4. Storage — unified SQLite (EF Core + FTS5) holding documents, FTS virtual table, RWI reverse word index (rwi_terms), seeds, crawl queue/profiles, bookmarks, blacklist, config; plus filesystem for DB file, logs, and exports.

    Project layout: YaCy.Uno.Core (engine library), YaCy.Uno.Server (ASP.NET Core API + background services + SignalR hubs), YaCy.Uno.App (Uno UI with Views/ViewModels/Themes), YaCy.Uno.Cli (TUI), plus tests, docs, and Docker files.

    API design

    REST endpoints mirror the YaCy-Go API for ecosystem compatibility:

  • Search: GET /api/search, GET /api/search/stream (SSE), GET /api/suggest
  • Crawl: POST /api/crawl, status/history/pause/resume/abort
  • Peers: GET /api/peers, POST /api/peers/connect
  • DHT: GET /api/dht/stats, distribution stats
  • Admin: stats, config read/update, index browse/export/import
  • Realtime via SSE (streaming search results), SignalR (crawl/P2P events), WebSocket as WASM-compatible fallback.

    UI and deployment

  • Design: Material Design 3, blue-violet gradient primary (#667eea → #764ba2), light/dark themes with system follow; desktop sidebar navigation, mobile bottom tab bar; pages for Hero (search), Search, Crawl, Peers, DHT, Stats, Config, Help. i18n via .resw (English, zh-CN initially).
  • Run modes: Desktop (embedded Kestrel), headless server, WASM, mobile (remote API), CLI, Docker (multi-stage build on mcr.microsoft.com/dotnet/aspnet:9.0).
  • Requirements: .NET 9 runtime, 256MB RAM minimum (1GB recommended), 100MB disk, Windows 10+ / macOS 12+ / Linux (glibc 2.17+).
  • Security: Kestrel TLS, Basic Auth + JWT for admin, RSA 2048 peer identity keys (YaCy-compatible), rate limiting, configurable CORS, input validation.
Note: the SQL sample defines the FTS5 virtual table with a url_hash column marked "UNSAFE not indexed"; per the FTS5 DDL shown, all listed columns are indexed — the comment appears inconsistent with the snippet.

Tags

#yacy#uno-platform#dotnet-9#p2p-search-engine#sqlite-fts5#distributed-hash-table#web-crawler#cross-platform

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/176922802