Has anyone considered making an ephemeral-message relay based on Redis/Valkey? I could see it being a good data store architecture for large group chats, message passing servers, and other applications that require only transient storage of notes.

Reply to this note

Please Login to reply.

Discussion

Or... vncache :)

Message queue kind of sounds like what you're suggesting. To be fair existing relays with embedded/memory DBs would likely be more performant and less complex infra, as an application than redis as a separate server

Yeah you're probably right. Redis is really designed for smaller bits of data than most Nostr notes are.

I was thinking about the advantages of fast in-memory databases for ephemeral data. A memory DB designed for larger chunks of data might ultimately be better, but I don't know what that space looks like all that well.

Smaller bits of data that are more expensive to retrieve than a TCP round trip minimum. I also build optional teired LRU cache into my client libraries.

At my day job I recently set up a tiered local/remote cache for a server that uses local memory first, then Valkey as a remote. The Valkey makes sharing across Docker image instances easy.

Im working on setting up memory mapped files for sharing local cache tier between nodes as we speak.

Ill have to bookmark valkey. I support redis in vnlib, and like to add support for other commercial tools.

Valkey implements the same API as Valkey, plus some of its own features/interfaces as extra. It's a drop-in replacement for Redis.

I saved one that was written in .NET that was also supposedly a drop-in for Redis.

Client library or server library?

Server application.

And Elasticsearch.

I considered it. It’s on the maybe-someday list. 😁