Thread

Zero-JS Hypermedia Browser

Relays: 5
Replies: 3
Generated: 15:49:56
Wen String interning? :) Downloading 100,000 WoT events per user means most of the DB is just duplicated event ids and pubkeys. We also need to figure out how what to do with large encrypted payloads (DMs, drafts, etc). Maybe it saves encrypted blobs on a different file. Idk... I also need one shared DB for every app in the phone + a separate DB for each user so that we can save/index the decrypted DM chats, which are unsigned Nostr events.
2025-12-03 18:56:29 from 1 relay(s) ↑ Parent 2 replies ↓
Login to reply

Replies (3)

string interning? i don't know what this means. you mean the pubkey index? that's in there. yes, the pubkeys are encoded as 5 byte long pointers to the pubkey index. IIRC. i remember doing something with this. there is actually a table in there that links pubkey/event/kind together that theoretically should enable index free adjacency (meaning it only iterates one table to find the event or pubkey you seek). haven't implemented it in many places yet but tag queries for e and p tags use it. it's potentially able to add a graph query language to walk that table
2025-12-03 18:59:22 from 1 relay(s) ↑ Parent 2 replies ↓ Reply
i'm implementing the change to a compact event format that exploits the pubkey, p and e tags being references. it also has a "placeholder" code for events that refer to events not yet in the database, these store the whole event id. idk what to do about sharing the access to the relay, i think android has some features that would allow you to bind to the websocket listener and plug it into an IPC interface for other apps to also use, would require you to stipulate that the battery permissions on the app be active, so it could be a standalone service. idk about other users, since that rarely would be needed concurrently it can just be a startup service, like how orbot and wireguard work. i'd put the encryption side of it at the OS level, just encrypt the whole app specific storage in the user's profile. storing drafts i think you could then eliminate the encryption step for when you are using the already encrypted db file storage area as for the DMs storage, probably better to just put that in a separate place inside the encrypted file storage where the database engine reads and writes, so make two subfolders for that.
2025-12-03 19:58:24 from 1 relay(s) ↑ Parent Reply