Yes. Ditto proves you wrong. Lmbd is way too disk and cpu heavy.
Ditto uses strfry
Not true. It's a custom relay. https://gitlab.com/soapbox-pub/ditto/-/blob/main/src/controllers/nostr/relay.ts
Have you tested it under heavy load ?
Yes, it sucks. But I am not actually sure if it's the relay or Mastodon API causing the problem. It keeps going down and I've been making Prometheus graphs to track the issue. Screenshots in my profile. Postgres itself is very good for the usual queries. Someone is doing something naughty that's choking up my connection pool. But I appreciate verita's enthusiasm for my project. I am determined to make it the best thing ever, and I think it can be.
I did not read this whole thread, just wanted to correct this blatant misinformation.
Oh, I thought you mentioned it ran a strfry instance. I dunno where I saw that. I stand corrected. 🐳
No it isn't. LMDB is so lightweight and fast that I don't need async function calls. I can just assume they return virtually instantly.
It makes a lot of sense if you think about it, once the data is paged in, it’s just a btree data structure in memory. Especially if your data is stored as flatbuffers like strfry and nostrdb. In fact, i doubt you can make something faster than lmdb. It’s pretty much optimal cache wise.
I remember when it came out in 2011 or so, people were agahst and in awe of how fast it was.. like this was impossible. And some smart developers went digging to try to find the "problem" because it must be doing something wrong to get that speed. And what they discovered was that it was simply using several really smart techniques in ways people hadn't put together before, like copy-on-write, b+ trees, mmap returning direct pointers to the data instead of copying it, etc. I also think it is probably at or very near the maximum theoretical performance. Of course unlike you, I don't utilize that performance on my relay. wss://chorus.mikedilger.com:444/ is currently only serving 15 connections.
flatbuffers is great, as are binary blobs that are directly accessible without deserialization (such as my pocket-db) or rust `speedy` (barely any deserialization really, but it does still copy). It is funny how copying something actually makes a performance difference for us. That is how fast we are now. For most people a memory copy (with its concomitant malloc) is trivial and lost in the noise of their real performance bottlenecks.
i have run almost every piece of relay software on the busiest nostr relay, from sqlite to postgres to lmdb, have you? Or do you just like talking out of your ass to sound like you know what you’re talking about.
Why you getting so defensive? You are wrong . I proved you wrong with an actual tangible thing called ditto.
you haven’t proven anything, you just stated another Postgres relay exists, not that it scales.
Of all the things I would argue with Will about, (xmonad sux) how Nostr relays work isn’t one of them. 😏
haha xmonad is a bit cluncky but I have customized it too heavily and its hard to move off it :( I would love to switch to wayland one day but im stuck 🥲
https://codeberg.org/dwl/dwl thank me later
What is this dev magic, and what does it do
basically dwm but on wayland. Same suckless phylosophy, suckless hackability, tons of cuatomizations by codebase patches, same config.h files to customize. Its a bit more bloat and difficult to hack-with because it implements wayland protocol and that means it needs to handle more things windows-compositor-side and sometimes breaks things from a version to another cause protocols changes. But works, its great.
How would you explain dwm to a someone from the cro-magnon era? Asking for a friend
a tiling window manager; a nerdy, minimalistic and hackable way to put things on screen on a linux pc doing keyboard key-combos. Often the time required to get into these things would be better spent doing real things with friends and family, but everyone has his passions I think..😅 For graphical reference, here is dwm or something very similar: nostr:nevent1qqs9d67ryv58jhr863r3gqxvnmthykcctgdd32szdq3njwalustcyaspzamhxue69uhhyetvv9ujumn0wd68ytnzv9hxgtczyqalp33lewf5vdq847t6te0wvnags0gs0mu72kz8938tn24wlfze6qcyqqqqqqgecks8m
Thanks. Makes sense jaffers is into this stuff
the ceo 🙏
Postgres is an academic experiment and every time I've seen someone attempt to scale it, it ends in tears. Salty, salty tears, and massive amounts of un-necessary hardware deployed in an attempt to stop the mysterious bleeding out of its performance under a high rate of queries. Maybe postgres Jesus will join the org and save it somehow, but he never does. Anyway, MySQL is better, and lmdb seems best for what nostr is doing (serving notes directly from a memory mapped cache).
MySQL is better? lol no. Not true at all. NoSQL like Scylla or Cassandra would be the better choice. Sure, LMBD serves a lot from memory mapped cache but for some reason, IO is still way higher than competing technologies. Postgres is much lighter for IO for NOstr's use case.