Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ekzyis/booger

 
 

Repository files navigation

booger

booger

A nostr relay

🚨 breaking changes incoming

i'm changing the code a lot in a backwards incompatible way ... this probably isn't ready for prod yet until it has defenses either

what booger does

  • supports many NIPs: 1, 2, 4, 9, 11, 12, 15, 16, 20, 26, 28, 33, 40
  • suitable for horizontally scaling websocket layer with a load balancer

what booger doesn't do (yet)

  • defend itself: no rate limits, spam prevention, payments
    • i'd like to provide these via some plugin mechanism (workers, maybe?)
  • use postgres read replicas

booger in words

  • deno serves websockets
  • filters are stored in a sqlite in memory database and mapped to a websocket
  • events are persisted in postgres
  • when an event is persisted (or an ephemeral event is received) a postgres NOTIFY event, <event json> is broadcast
  • all booger processes in the cluster LISTEN event and when notified check sqlite for matching filters and send to corresponding websockets

booger in pictures

booger cluster

booger cluster

booger process

booger process

how to run (locally)

  1. install postgres and run it (welcome to app programming)
  2. insall deno (welcome to deno)
  3. clone booger
  4. configure env in .env.defaults
  5. deno task dev

what booger wants

simplicity, ease of use, extensibility, scalability, performance, security

thanks to

  1. camari's nostream - heavily inspired booger's validation and integration tests
  2. everyone working on nostr
  3. my cat dona, meow

About

A nostr relay

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 95.0%
  • PLpgSQL 5.0%