0
1
3

so, i am progressing in my understanding of how to program key value stores i had a scheme set up, where for a second level caching scheme, there was an access counter record with also the size of the event itself, and i was zeroing that size as well as flipping the event record for its ID this turned out to be a problem somehow, i can't quite figure out how, but eventually the mark step of the garbage collection code was marking already deleted events and for several days i have been fighting with this and got one small victory yesterday when i slimmed it down a bit i just was deleting the counter record, then it wasn't found in the mark step and voila, no more sweeps of already swept items so, i've learned something here, that is a reflection of other learning about simplicity every key in a key value store should be simple, one key, one value it is a code smell when your value is composite, but divisible, ie, in my example, the access timestamp AND the storage size of the event so, tomorrow i'm revising the code so the access counter is just a timestamp, and the event itself signifies having been pushed out to a second level store by flipping the whole event for the event id (hash) just as previously, removing the counter event solved the problem, i expect this will solve the problem, as now the access counter only does one thing: update it every time it comes up in a query and the event itself is the primary source of "is this now pushed out to the level 2 store?" some time in the future i am going to write a go-native style key value store wrapper around badger that lets you abstract out all the codec parts of the code so you just store keys that are based on structs and define them with simple encoders that turn things like hashes into 8 byte prefix codes and such don't have the time to build out the nice clean interface for now but i've learned something in the last week of pain, and i will definitely be using this hard won knowledge in the future #devstr #golang #keyvalue #deardiary #programming #nostr

0
0
3

0
0
3

1
1
3

0
0
3

0
0
3

0
0
3

1
0
3

0
0
3

dd664 - 13d

0
0
3

0
0
3

there is soooo much work yet to be done, and so much polish on what work has been done so far.... i've been focusing on what matters to me, the #golang libraries and relay implementations from the fiatjaf because they are the most complete of all of any language and because they are in my preferred language, and the language you will also prefer eventually (partly because pretty soon they are gonna be the hottest, fastest, and sleekest implementations of nostr protocol that exists, and you're welcome... i am funded via a company that is working on making decentralised competitors for matrix, discord, telegram, gdocs, proton, and so on and we get our funds from whoever we can see a strategic relationship that links to the work we want to deploy devs, managers of various kinds and artists on working on... my current project is being funded by dfinity, the builders of internet computer protocol, and maybe we will get funding from arweave soon to build out advanced full text search capability in clients and relays (and arweave smart contracts of course) we are nearly 15 months in since inception and maybe in 3 months time we will finally have a decent reference implementation for full text search of text in events i'm sure that there will be more outside funding going forward but it may take some dirty work for me, to build in #golang but to be funded by shitcoins is a zero sum, so it's all about the benefit of being able to help advance the tech behind #nostr there will be more people coming into this in a similar way as me but i think our fearless leader, who is a fan of nostr, has been very early on this and sees the benefit of an interoperable protocol for competitors for the incumbent business collaboration systems, and a means to unifying these systems to become a seamless internet of collab systems, which hopefully his enterprise will pay off well enough to keep him moving forwards towards such worthwhile goals looking forward to first release, won't be long, another 3 weeks we'll kick this beast out the door had a really hard problem with the database interface i have been building from (fiatjaf's eventstore/badger) to add storage management capabilities but pretty soon it's gonna have full capability to both manage a badger store alone, or to combine it with an external distributed database (ICP in this case but it shouldn't take much to be blossom or ipfs or mongo or redis)

0
0
3

0
0
3

2
0
3

0
1
3

0
0
3

0
0
3

1
0
3

0
0
3

1
0
3

Showing page 1 of 5 pages