Oddbean new post about | logout
 Here is my new Nostr relay library: https://doc.deno.land/https://gitlab.com/soapbox-pub/nostr-machina/-/raw/main/mod.ts

https://gitlab.com/soapbox-pub/nostr-machina

It's still experimental and doesn't support a pool yet. But it's comprised of a bunch of useful utilities that makes working with WebSockets and Nostr easier. 
 The RelayPool I'm working on is a stripped down pool whose only job is to keep a group of WebSocket connections alive. It does not facilitate messaging. This is the correct abstraction, because you can then pass RelayPool instances into other functions who add the messaging layers on top, allowing you to keep one pool without duplicate connections.

The RelayPool is an EventTarget with "add", "remove", and "reconnect" events, so you can build anything on top of it. 
 Abstractions, abstractions, abstractions, abstractions!