Live data from Hacker News

SQLite Is Serverless

sqlite.org

31–40 of 453 posts

Re: SQLite Is Serverless

#31

> Of those that are serverless, SQLite is the only one known to this author that allows multiple applications to access the same database at the same time. IIRC, MS Access allowed that, which explained a lot of its popularity.

Waaaaait wouldn’t that mean the file system is the server, with some binary API and responsible for handling concurrent access and locks for the entire file? LOL.

Re: SQLite Is Serverless

#32
post #9

Earlier quoted context omitted.

It doesn't say 2007 anywhere, but the page is clearly at least that old. https://web.archive.org/web/20071115173112/https://www.sqlit... I also found material from 2004 with the term. https://www.tcl.tk/community/tcl2004/Presentations/D.Richard... > Regardless it's vague and irrelevant material It's not vague at all, the term makes sense to distinguish "in-process" from client/server models. The page also includes an…

I would love to know who uses "serverless" instead of "in-process". Why add a new term at all? And if the definition has since been muddied, then all the more reason to avoid using it instead of creating even more niche definitions.

> I would love to know who uses "serverless" instead of "in-process". Why add a new term at all?

"In-process" is meaningless to non-IT people, they don't even know what a process is. The SQLite dev probably created the term for marketing purposes, i.e. the exact same reason cloud providers adopted it 10 years later.

> And if the definition has since been muddied, then all the more reason to avoid using it instead of creating even more niche definitions.

I disagree. The term in relation to SQLite is clearly defined and predates the modern version, there's really no need to go back and change it. You're also disregarding the statement made by the SQLite dev by keeping this page and updating it with a clarification.

Re: SQLite Is Serverless

#33
post #24

a bit tangential, but when do you move form using in-application data structures (maps, trees, vector/arrays) to using a database? Is it basically when the data doesn't fit in memory? I've been programming for almost a decade and I've never come across needing a database... (for context, it's ten years without anything web related) I'm interested in them and I'd love to learn SQL but I can't even think of a use case…

Any medium size or greater application either uses SQL or recreates a shitty version of it. You just can't write complex code without relations.

Re: SQLite Is Serverless

#34
post #24

a bit tangential, but when do you move form using in-application data structures (maps, trees, vector/arrays) to using a database? Is it basically when the data doesn't fit in memory? I've been programming for almost a decade and I've never come across needing a database... (for context, it's ten years without anything web related) I'm interested in them and I'd love to learn SQL but I can't even think of a use case…

Anytime you want persistency: sqlite is a replacement for fopen() https://www.sqlite.org/whentouse.html

Re: SQLite Is Serverless

#35
post #24

a bit tangential, but when do you move form using in-application data structures (maps, trees, vector/arrays) to using a database? Is it basically when the data doesn't fit in memory? I've been programming for almost a decade and I've never come across needing a database... (for context, it's ten years without anything web related) I'm interested in them and I'd love to learn SQL but I can't even think of a use case…

Structured transactions between applications is one place.

You can get by with files, but they're slower. A DB is the right choice.

Structured data anytime you're hitting multiuser - web, networked games, collab programs, live maps, etc.

Anything that's massively stateful. A DB hands you a lot of guarantees. The filesystem has some of them, but is much slower.

Re: SQLite Is Serverless

#36

> Of those that are serverless, SQLite is the only one known to this author that allows multiple applications to access the same database at the same time. IIRC, MS Access allowed that, which explained a lot of its popularity.

Good point.

Berkeley DB also supports multiple processes accessing a database concurrently, as far as I know.

I was wondering if the authors were referring to SQL-like databases, but MS Access seems to be one?

Re: SQLite Is Serverless

#39
post #24

a bit tangential, but when do you move form using in-application data structures (maps, trees, vector/arrays) to using a database? Is it basically when the data doesn't fit in memory? I've been programming for almost a decade and I've never come across needing a database... (for context, it's ten years without anything web related) I'm interested in them and I'd love to learn SQL but I can't even think of a use case…

I have found that you can go for a disturbingly-long period of time using primitive schemes like LINQObjectsJSON to persist your business data before things start to get hairy. Personally, I would say 10 megs of persisted data is about the upper limit before I am going to start reaching for SQLite. If you start to get clever with schemes like one file per serialized entity, you could potentially avoid using a 3rd party database indefinitely. I have found that the technical cost of using SQLite from the start is so low that I just start out using it by default even if the file will never exceed 1MB.
Post reply on HN