What is Nostr?
someone /
npub1nlk…jm9c
2023-01-22 14:58:23

someone on Nostr: --Relay specialization to achieve optimum functionality -Requirements: Noone misses ...

--Relay specialization to achieve optimum functionality

-Requirements:
Noone misses out on any event
Resilient against attacks
Fast
Storing all the events forever


-Proposal:
Noone wants to miss out on events. If I am posting something I want it to go to everywhere. If I am following someone I should make sure I am getting their events. There is no guarantee in current paradigm.

To solve this I am proposing some specialization of relays. There will be like 32 read only servers which specialize in speed, fast queries, high bandwith, each temporarily storing a shard (1/32) of complete set of all events on nostr. The events can be sharded based on their last 5 bits. Storage can be mem only. If someone connects to all these 32 relays they will get all the events.

Secondly, the general purpose read/write servers which specialize in long term storage to make sure the events are saved and noone looses their events. They copy events to the read only servers (above). When a client wants to write, they can do to any of the general purpose servers. The events are then distributed to read only servers based on last bits of their id. There may be hundreds of these servers.

Clients can connect to 32 read only and some read/write servers in order to achieve everything.

We can have a copy of all shards to increase redundancy or resiliency against DoS attacks, or just to increase speed by having a lower ping.

If mobile clients don't mind the traffic, # of shards (32) can be increased even more to 64, 128… If 64 is implemented last 6 bits of the events will be used for sharding purposes.

Read only shards will probably be honey pot for attacks in such case. If shard system cracks there is always general purpose servers who can facilitate relaying to build the next shard infrastructure..

Author Public Key
npub1nlk894teh248w2heuu0x8z6jjg2hyxkwdc8cxgrjtm9lnamlskcsghjm9c