pubky / pubky-nexus

The Nexus between Pubky homeservers and Pubky-App social features.
MIT License
10 stars 1 forks source link

Feat: light-weight mode #190

Open SHAcollision opened 2 weeks ago

SHAcollision commented 2 weeks ago

Feature Request: Light-weight Mode for Nexus Indexer

Nexus currently functions as a full-content indexer, reshaping and serving every object in /pubky.app to facilitate building pubky.app clients and enhance UX and latency.

Problem Statement

There are strong use cases for a "light-weight" mode in Nexus. A Nexus in light-weight mode will be serving only URIs to homeservers, leaving clients to fetch data directly from the source. As a light-weight Nexus would consume less memory, storage, and overall resources, running a home indexer would become more feasible. This will further help decentralisation. In addition, light-clients avoid the legal hazard in some jurisdictions of serving other parties' data.

Proposed Solution

Introduce a new setting to switch Nexus between two modes:

  1. Full-content mode (current functionality)
  2. Light-weight mode - serves URIs only

Alternative Option

Consider a "pruned" Nexus that holds no content/files but only serves URIs. Additionally, we could add an option to each API endpoint, lightweight=true, allowing:

Note: Light-weight clients will be "fat", more akin to Nostr clients. A lightweight indexer would require more processing on the client's end.