i'm not muting you but i don't think realy is stable or functional enough
Discussion
Then we fix it.
It's just a local cache relay.
Was originally using a browser indexedDB, but Badger is better.
probably the http stuff is more reliable but i'm quite sure that there is issues with the way i constructed the database keys, for one thing
as i have been really intimate with the details of the necessary consequences of nostr's design, it's actually a LOT more complicated than it has to be. the json escaping, the websocket states, the complete lack of need for kind when there is tags already, the free form format of tags, the stupid single letter tags, the construction of the filter with its inline omitonly format and arbitrary and pointless use of the # symbol, the automaticsubscriptions on everything, the lack of thought about administrative access requirements, the utter tire fire that is auth.
so that's a long way of saying, good luck, have fun
I am having a lot of fun with it, actually. I love having a relay that I can tinker with.
Also, found a fun use case for SSE. 😊
I'm testing. If I find something dramatic, I'll send you a PR.
well, for one thing, i can definitely say that the database indexes should be using binary.BigEndian not LittleEndian. that will definitely improve the seek performance as bisection scanning will actually work.
but more likely the issues will be related to the complications of access control. clients made this into such a moving target to get working that i finally had enough of trying to make it work. without cooperation from at least one client dev i am wasting my time.
I said that it's the default DB of gitrepublic-web, so that's going to be one social and git client that it should integrate well with.
It's a personal cache relay, but the client also uses the community relays and then syncs between them, on the backend. So, Realy doesn't need to connect to any other client, to be useful.
I'm calling it the "spoke" relay, with the theforest/thecitadel as the "hub" relays.
It's so fucking fast OMG.
I made the client really, really, thin, integrated the API, and just let Realy fly. ✈️
I monitor the network connection and automagicall adjust relays, protocols, image loading, etc.
I que everything, when online and offline, and when someone gets back to a fast network, it speeds up and autosyncs in the background. I've tried it out. User can't tell when it is in which state, unless they're offline for a long time and run out of new events to scroll.
It's medium-fast, if you using a normal localhost relay, but speeds up, if you go full Realy.
it is really fast eh?
i'd make it also not buggy if i had the time and was getting 2k euro a month to just focus on it.
Yeah, I know. You've earned more than me, on Nostr. I haven't gotten a single cent, so far.
Have to work full-time to afford my hobby. 🙈
i was literally being paid to build relays for most of last year, and because i'm a server dev, the going rate for this work is 30-50USD/hr so i can live decently but only work 20h a week, leaving a lot of time for me to do other things.
i really need to get off this island though. european union gulag food is literally killing me. i'm down to eating cod and potato croquettes and occasionally a well cooked egg or three, almost nothing else can be eaten without bad consequences. no fruit juices either, i have GERD, i stopped smoking again because i feel like i'm about to get gangrene in my hands and feet at this point, i'm drinking milk a lot now but i know that this UHT stuff has very damaged proteins in it that are known to cause kidney and liver problems.
so i'm gonna be stacking as hard as i can, so i can get back to the balkans and find a way to have my own little hovel and bunker in the serbian capathians. where all the pyramid and UFO people gather, the tallest mountain in serbia (if you count kosovo as a different country)
That last bit sounds awesome.
i anyway prefer it over there. the serbian carpathians are my favourite place in the world since i first saw them in 2019, visiting Rtanj and climbing to the top of the mountain with the little chapel that was bombed in WW2 on top.
i subsequently visited a town called Despotovac, just a little northwest of Rtanj mountain and had a really good experience with two of the people i met there, one, an old granny driving an old tank of a yugo commie car, and then an autoelectrician who fed me and gave me some beer. was during the lockdowns. was no lockdown outside of the big cities in serbia. even the regional trains were still running as normal.
i know one thing i could do that might maybe dramatically decrease its' bugginess is to completely remove all of the access control stuff, strip it back to a bare, dumb relay that needs a proxy layer to be useful or is fine with no security ie personal LAN realy. remove the nip-42 also. nip-70, and other things
Well, my client could provide that stuff. I could just ask the AI to copy what you built and then you could remove it.
The logic is already there, in the repo. 🤔
Would moving that stuff to Typescript noticeably slow it down?
yeah, that's what i'm saying. break it down so it's just a dumb relay, with all the go-fast bits, and then do like what nostr:npub10npj3gydmv40m70ehemmal6vsdyfl7tewgvz043g54p0x23y0s8qzztl5h did with the sprockets, except do it as a HTTP proxy, for handling auth and access control and etc. then it doesn't matter so much what language you use, because the core engine does all the heavy lifting, the other things are just gate keepers and don't have heavy work to do anyway, just opening and closing gates really.
Ah, okay, that sounds good. I'll work with it, as-is, and if you want to change it, we can do that in a later iteration.
i'll make a stripped down branch now, i'm kinda a bit idling on the fiatmine job at the moment, some last few bugs the front end dev has found, later today hopefully i will zip that all up and fingers crossed nothing more comes up during the next week.
i'm working on something else at the moment too, a yet another re-imagining type thing, simplifying everything, exhaustively. like removing kinds, making tags just k/v and eliminating complex, arbitrary escapings for just \n and \\ and nothing else required. gonna think about how to write the queries too, something also line structured and sentinel based. Go's top level syntax for file structure is inspired by the same principles used in Pascal and Modula/Oberon where a specific reserved word right after a line break indicates a file section, these are called sentinels. they are much faster to parse and simple to write the state machine for them, you can even be lazy and literally just split a file into lines (step one) and then group those lines by when you find sentinels (step two). i mean, if you can slice and dice strings in any language you can do this. unlike shit like json. i mean, look at yaml and toml, both of these work on a similar line structure basis, toml is better, yaml has this retardo fucking python whitespace syntax shit.
i started doing that and then it was like, ugh, this is the Wrong Way
the Right Way (tm) is to start from scratch and copy in the bits that are needed and remove the extra bits that aren't needed.
so there will be a new https://min.realy.lol that is a dumb, unprotected, spam hungry beast of fastness and speed
i've had a bit of a rough day with people failing to understand the logic of my server's API, still confusion about it 3 weeks after i raised the point that we probably need another table and endpoint to handle some specific state and only just realised today that this had not been understood, and so much difficult communication in the weeks since that time and still no clarity is dawning.
so i'm feeling pretty ugh right now
and i go and look at this code and it's like, to remove all that auth stuff is a massive job, but i have to do it to fix probably what will be most of the problems with this thing and there will be no auth.
i'm really struggling to find a motivation to actually do this.
but then i'm also quite bored. ok, gonna try anyway. just remove all the auth related stuff, and all the admin stuff that requires auth.
anyhow, if you go to https://realy.lol you will find there is now a branch `minimal` which has all the auth removed. it works, seemingly ok, with nostrudel but jumble doesn't seem to recognise that events are saved for whatever reason.
anyway, point being there is now an ultra bare minimum realy that should not be let outside into the wild internet where it will quickly be laden with gay porn and yodabotspam.
and maybe it needs some fixing with how it's sending back OK messages or something.
it also has the HTTP API there but all the admin stuff has been removed because there is no auth anywhere now.
didn't really take me that long to fix. just remove things, then compiler complains with lists of all the things that are broken, i just go through and remove them and recompile until nothing complains and it runs.
that's probably about it for me building nostr relays tho, unless i can get paid for it. my day job is too much of a pain at the moment and i really need to keep this job and also need to recover my dignity and sense of self worth at this point.
Okay, I can branch and fix that.