Re:Building a highly-available web service without a database
by endorphine on Saturday August 10, 2024 @12:51AM
(#41207393)
HN does not use a database?! Can you expand on that? It's very surprising to me.
[ Parent
| on HN ]
Re:Building a highly-available web service without a database
by exe34 on Saturday August 10, 2024 @01:47AM
(#41207603)
probably uses the filesystem as the backing store
Re:Building a highly-available web service without a database
by szundi on Saturday August 10, 2024 @04:18AM
(#41208105)
Filesystems these days are like dbs
Re:Building a highly-available web service without a database
by ahoka on Saturday August 10, 2024 @11:17AM
(#41210118)
Good luck transactionally writing files to a random FS, but especially without access to native OS APIs.
Re:Building a highly-available web service without a database
by worthless-trash on Sunday August 18, 2024 @10:04PM
(#41287166)
What do you mean "without access to native OS API's"?
To be able to read and write you need native os apis, aka read() and write() otherwise how do you do it ?
Re:Building a highly-available web service without a database
by 1oooqooq on Saturday August 10, 2024 @07:00AM
(#41208658)
if pg is still stuck in the 90s lisp, if bet it's just a single process with the site in ram, using make-object-persistent and loading as needed (kinda like python pickle).
that was all the rave for prototypes back then.
Re:Building a highly-available web service without a database
by Zak on Saturday August 10, 2024 @07:15AM
(#41208718)
It just persists its in-memory data structures to disk. Here's the source of an old version; note uses of `diskvar` and `disktable`. A "table" here is just a hashtable.
Re:Building a highly-available web service without a database
by tim333 on Saturday August 10, 2024 @06:03PM
(#41212572)
I think the structure is very simple. It's just a lot of items like your comment is item 41207393 as in https://news.ycombinator.com/item?id=41207393
I think that is just written to disk as something like file41207393 when you click reply.
When the system needs an item it sees if it's cached in memeory and otherwise reads it from disk and I think that is pretty much the whole memory system. Some other stuff like user id that works in the same sort of way.