3 ms·
I don’t get it, then any db can be classic serverless if they run in the same computer as the app?
by m3kw9 7y ago
I don’t get it, then any db can be classic serverless if they run in the same computer as the app?
- flatline 7y agoNo, there’s still some form of IPC going on then. SQLite is an embedded database - everything happens in the memory space of the same application. Of course you can still throw a web front-end in front of your application but there’s still no extra hop to the database, per se.
- jasode 7y ago>any db can be classic serverless if they run in the _same computer_ as the app? Not just the "same computer" ... it's the same process id (PID). Extract of relevant text from that webpage: >Classic Serverless: The database engine runs within the same process, thread, and address space as the application. There is no message passing or network activity. In other words, when you compile and link "sqlite.c" into your own executable, the same PID (process) that handles text input and paints pixels on the screen -- is the same PID that writes to the sqlite database file. It's all the same process. That's what they mean by "classic serverless". In contrast, if you make a Go executable that writes to MySQL/PostgreSQL db and make them both run on the same physical computer, that's not "classic serverless". It's because when you enter "ps -aux" to list all running processes, you see separate PIDs for the Go executable and the MySQL db engine. Other jargon used might be "in-process" vs "out-of-process" or "embedded" vs "external". SQLite is sometimes characterized as "in-process embedded database" but MySQL is an "out-of-process" db.
- l34ch 7y agoNope, only SQLite doesn't use another process as an intermediary to read/write to the DB.
- manigandham 7y agoYes, technically, although they make the distinction is that it's in the same process. It's a bad definition. I would stick with the terms "embedded" or "in-process" which have been around for decades and are well-understood.