README and doc updates

This commit is contained in:
Mike Dilger committed 2024-02-17 16:36:21 +13:00
1 parent 9d7ab53e50
commit 4122014ff7
4 files changed
+104 -85

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
# Performance
At the time of this writing, I don't know if chorus is fast or not. It has not been
profiled or optimized yet. It has only been designed for performance.
Here are the design choices made in order to help achieve eventual high performance:
- Rust language: low level language runs as fast as your hardware with no runtime and no overhead.
- Asynchronous multithreading: maximizes the utilization of each and every CPU core available.
- Memory mapped storage: Accessing persistent storage is usually just as fast as accessing main
memory (once swapped in). This is achieved via a custom memory map for events and LMDB for indices.
- The event memory map is append-only making it almost lock-free (limited to one writer at a time, but unlimited readers who can read while writes are happening)
- Direct indexing: indices yield the memory offset of the event, not an ID that requires yet another b-tree lookup to fetch the actual event data.
- Events and filters are custom binary structures with in-place zero-copy field access.
- Events and filters have custom JSON parsing that uses very little (usually no) memory allocation.
+30
View File
@@ -0,0 +1,30 @@
# Personal Relay
A personal relay is a relay that serves as an OUTBOX and an INBOX for a small set of
users, perhaps just yourself.
It hosts your own events and makes them available to the public.
It accepts events that tag your users, but doesn't allow the public to read them back. Only
your users (after being authenticated) can see them.
One nice thing about a personal relay is that you are in control, and you have a record
of your events in your possession.
Another nice thing is that you don't have to moderate content, since the only content
that is served to the public is content that your trusted users created.
## The Dark Side
There is a dark side to running a personal relay. If lots of people do this, nostr will
become more difficult for clients, especially clients running on mobile phones. Because
they will need to setup SSL connections to far too many relays.
It may be better for others if people were to use a smaller number of larger relay services.
But who am I to say? You are the sovereign. Here is your personal relay.
## Incompleteness
At the time of this writing, chorus is not yet complete. It doesn't even do AUTH, and it
accepts and serves events from and to anybody.