News for hackers. Stuff that matters.
Re:SQLite Is Serverless by oldgradstudent on Sunday January 26, 2020 @05:35AM (#22151431)
> 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.

Re:SQLite Is Serverless by buckminster on Sunday January 26, 2020 @10:02AM (#22152350)
This was a standard feature of flat file databases in the early 90s. There were many products. They often had an ODBC driver, which provided a SQL front end. dBase .dbf files were often used for storage. The arcane file locking in Windows is intended for exactly this kind of application.

Apart from quality (!), SQLite's main advantage over these products is broad platform support. And continued existence.

Re:SQLite Is Serverless by specialbat on Sunday January 26, 2020 @01:17PM (#22153629)
We still have a multi user desktop application that uses the Borland database engine and dbf files over a windows file server. The BDE is no longer supported but it still works
Re:SQLite Is Serverless by swiley on Sunday January 26, 2020 @03:50PM (#22154695)
Unix like operating systems also allow locking files for on disk databases (like mbox files) it’s just not what every application does by default.
Re:SQLite Is Serverless by tootie on Sunday January 26, 2020 @07:29PM (#22155909)
Used to love dbm files. 1980s serverless NoSQL. They're still totally usable although we have LevelDB nowadays too.
Re:SQLite Is Serverless by squarefoot on Sunday January 26, 2020 @10:08AM (#22152375)
In the old days of DOS I could do that with Clipper 5.2. Two or more PCs using Netbios shared directories could work on the same database, provided that they wouldn't write to the same record. That wasn't a problem because the environment (can't recall for sure if it was Clipper or an external library) allowed single record locking, so I enclosed the lock attempt into a timed spinlock-like block which attempted once per second for 10 or 15 seconds before obtaining the lock or failing with a record busy error. No SQL involved however, and indexes had to be rebuilt by hand like twice a day to be safe. But those were the days when a 486 could crunch a 100.000 records db with multiple indexes very easily.
Re:SQLite Is Serverless by matt2000 on Sunday January 26, 2020 @11:52AM (#22153067)
This is the first time I've heard Clipper mentioned in a looong time. I was just talking the other day how useful it was in those days that there were tools that included the database and UI all in one. Everything was a bit easier because the language assumed a database, rather than just using a library to interface with one.
Re:SQLite Is Serverless by int_19h on Monday January 27, 2020 @12:16AM (#22156991)
Pretty much all dBase derivatives had both file-based and record-based locking, that was specifically designed to work in a networked environment with file shares (although NetWare was much more common than NetBIOS back in the day). RLOCK() was the function you had to use for records.
Re:SQLite Is Serverless by wenc on Sunday January 26, 2020 @09:53AM (#22152321)
MS Access “allowed” it but depending on the version it could be quite problematic. We had a use case where Tableau connected to an Access file read only (but which another program used as a data store and wrote to it often) on an Windows file share, and once in a while the lock files would get screwy and we would have to manually delete the lock files to get things working again. Deleting lock files could be a huge chore because you have to figure out stuck processes and kill them. Task Manager wasn’t up to the task, so had to use SysInternal tools to help with that.

Access is really meant for single-user scenarios I feel. Maybe the locking mechanism has gotten better but for multiuser access I tell people to use a real SQL database.

Re:SQLite Is Serverless by m0xte on Sunday January 26, 2020 @11:20AM (#22152814)
It was ok pre-windows 2000. I had access 97 it on 9 workstations on NT with never a problem! Moment office 2000 and windows 2000 came out it went to hell. Moved to SQL Server then. I am not sure what changed.

It was quite frankly the most productive custom business software package I have ever used. Literally would take 10 people a week to do something custom you could do in an afternoon with 1 person in Access. I suspect the same is true now.

Re:SQLite Is Serverless by JasonFruit on Sunday January 26, 2020 @01:27PM (#22153700)
We had a much heavier multiuser setup on Access 97, and it worked fine. We had the same breakdown as you did, and had to do a registry edit on all users' machines to keep it limping along until we could move to SQL Server, which was the right thing to do anyway.
Re:SQLite Is Serverless by m0xte on Sunday January 26, 2020 @05:05PM (#22155116)
Interesting. Nice to know it wasn't just me. There was no one to talk to about it back then so you had to think on your toes.

SQL Server was a crap load easier to back up reliably

Re:SQLite Is Serverless by slfnflctd on Sunday January 26, 2020 @10:25AM (#22152457)
> Access is really meant for single-user scenarios

In a lot of cases, I've found it to be the best tool for a temporary or one-off (preferably smaller scale) data mining/massaging project. The query-building interface was the way I originally learned the basics of relational databases, and it also helped me get a better grasp of SQL-- the ability to flip back & forth from the GUI query builder to the SQL it generates is nice.

On the multiuser side, however, I have found a couple workarounds in the past. If you have everyone operate locally and space out their central database connections to intermittent, automated burst queries, you can get more concurrent users than you might expect. It helps to have fewer users per table, as well, and of course it really helps if they don't need to see the most recent adds/changes in real time.

Re:SQLite Is Serverless by bshipp on Sunday January 26, 2020 @02:00PM (#22153939)
My recollection was that the automated wizard loved to nest statements and it was a huge chore to manually massage stuff after the fact; almost incomprehensible to parse. but I agree that it was a real godsend for people trying to branch out from the limitations of excel.
Re:SQLite Is Serverless by velox_io on Sunday January 26, 2020 @10:25AM (#22152456)
Yeah, Access' Jet Engine and many of its issues are very well known.

[https://en.wikipedia.org/wiki/Microsoft_Jet_Database_Engine]

Re:SQLite Is Serverless by pjmlp on Sunday January 26, 2020 @10:08AM (#22152377)
And all xBase based programming languages, Clipper, FoxPro, Visual Assist, and their competition Paradox.

I loved the Clipper 5 OOP capabilities, sadly Visual Objects tried to be too much like Visual Basic and some of the easiness was lost.

Re:SQLite Is Serverless by blattimwind on Sunday January 26, 2020 @12:33PM (#22153361)
Since Access 97 or so it could actually use MS SQL as a backend which largely removed those issues; the Access "database" was then merely a VBS GUI for SQL Server. This works pretty well.
Re:SQLite Is Serverless by pklee on Sunday January 26, 2020 @09:08AM (#22152119)
I am not sure about MS Access. From what little I know 2 people opening from network drive would mostly result in database being corrupt.
Re:SQLite Is Serverless by sidewndr46 on Sunday January 26, 2020 @09:14AM (#22152150)
MS Access "allowed" it. SQLite actually works.
Re:SQLite Is Serverless by tenant on Sunday January 26, 2020 @09:20AM (#22152173)
Access is actually designed to work in a multiuser situation over a LAN for concurrent read and write. SQLite isn't afaik. As long as the LAN was cabled I never saw any issues. The only reason it was necessary to move to a server type database was because people were insisting on wifi networking.
Re:SQLite Is Serverless by paulie_a on Sunday January 26, 2020 @10:20AM (#22152429)
It might have been designed for it. It was poorly designed for it. It was a clustfuck of corruption when actually utilized
Re:SQLite Is Serverless by slfnflctd on Sunday January 26, 2020 @10:34AM (#22152509)
You basically had to engineer around the corruption risks for anything actually in production. Data redundancy, old-school 'Save' buttons (your work isn't properly saved until you click it, because it sends copies of that work to multiple backends) and isolating users as much as possible to their own 'shards' was part of how I saw it kludged through in the real world.

There was still a lot of weird behavior, though, and while you could reduce data loss you couldn't eliminate it.

Re:SQLite Is Serverless by paulie_a on Sunday January 26, 2020 @11:41AM (#22152974)
Penny wise pound foolish. I had a president waste two to three hours a day instead of using a 40 dollar service to take care of the incredibly simple and repetitive task. Eventually when I was planning to leave anyways I asked him what his time was with per hour. I guess it was less than minimum wage at the time. (5.25 an hour)

I'm probably going to have nightmares filled with screens of the access database corruption dialogs

Re:SQLite Is Serverless by tenant on Sunday January 26, 2020 @03:09PM (#22154405)
What's anyone's time worth? Might have kept him from doing something foolish.
Re:SQLite Is Serverless by paulie_a on Sunday January 26, 2020 @04:04PM (#22154782)
Valid point. He did defraud the federal government for 600k. If he had more time on his calendar he could have fucked over the American taxpayers ever more.
Re:SQLite Is Serverless by tenant on Sunday January 26, 2020 @02:44PM (#22154245)
It depended. It suited a small cabled office with 10 to 15 computers fine. I saw such setups work fine for 12 years without corruption. But when wifi came along people started connecting that way, sometimes unintentionally, and corruption became an issue. So then we bit the bullet and moved the backend to a server database. Not a single database corruption since.
Re:SQLite Is Serverless by afiori on Sunday January 26, 2020 @03:39PM (#22154632)
But this is the difference between supporting concurrent access or not. The fact that the feature relied so much on network reliability means that race conditions still existed.
Re:SQLite Is Serverless by tenant on Monday January 27, 2020 @02:56PM (#22163134)
I'm not arguing with you but the fact remains that unlike SQLite, Access doesn't lock the database file so that only one user can write at a particular moment, it's more granular than that. It's also the fact that this worked very well for databases on small cabled LANs where no more than a dozen-ish computers might be interacting with the database at any one time. It was never designed for use over the internet (having said which I have maintained a forum running an Access mdb file as its backend since forever without a hitch the forum software process does the database edits so it's like a database server process in a way I suppose).
Re:SQLite Is Serverless by klez on Sunday January 26, 2020 @09:29AM (#22152211)
I'm not sure I understand what the physical transport has to do with this. Can you please expand a bit?
Re:SQLite Is Serverless by wolf550e on Sunday January 26, 2020 @09:34AM (#22152225)
Maybe disconnect and reconnect cause windows network share to lose locks or something like that.
Re:SQLite Is Serverless by tenant on Sunday January 26, 2020 @10:11AM (#22152389)
Yes, for Access (and sqlite?) it is the client computers that do the edits directly to the database file, rather than via a mediating server side process, so they are particularly vulnerable to network interruptions while in the middle of an edit. Cable is far more reliable than wifi and so far fewer interruptions. I think that's it.
Re:SQLite Is Serverless by makapuf on Sunday January 26, 2020 @03:19PM (#22154469)
Ok but you cant really say you support network access if you rely on it to be flawless. Working fast, maybe but not reliably working if your network is not super reliable is not really support.
Re:SQLite Is Serverless by tenant on Sunday January 26, 2020 @03:38PM (#22154624)
It was a different time.
Re:SQLite Is Serverless by aksss on Monday January 27, 2020 @03:35AM (#22157748)
Back in the day, which was a Wednesday
Re:SQLite Is Serverless by im3w1l on Sunday January 26, 2020 @10:01AM (#22152348)
Race conditions not triggering when the transport is fast enough?
Re:SQLite Is Serverless by pklee on Sunday January 26, 2020 @09:16AM (#22152159)
I understand the distinction now :), thank you. Funny.
Re:SQLite Is Serverless by lxgr on Sunday January 26, 2020 @05:47AM (#22151472)
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 by ComodoHacker on Sunday January 26, 2020 @10:28AM (#22152483)
Yes, MS Access supports both SQL and non-SQL API, and not mentioning it isn't very professional from the author.
Re:SQLite Is Serverless by derision on Sunday January 26, 2020 @11:07AM (#22152711)
Is there anyone actually choosing MS Access for new projects in 2020?
Re:SQLite Is Serverless by oldgradstudent on Sunday January 26, 2020 @06:29AM (#22151588)
They were indeed referring to SQL servers. The paragraph starts with

> Most SQL database engines are client/server based.

I skipped it for brevity.

Re:SQLite Is Serverless by paulie_a on Sunday January 26, 2020 @10:18AM (#22152419)
It did allow it but getting it running reliably was basically getting punched in the face on a daily basis. Act! Was similar except they included getting kicked in the balls two to three times a week.

The reason access was popular was it made any middle manager that could wield an Excel spreadsheet think they could build a database.

Re:SQLite Is Serverless by bsenftner on Sunday January 26, 2020 @10:21AM (#22152439)
I have a sales guy buddy with a 50K contact database in Act! that runs a Win95 VM to maintain access to this data. I've tried to figure out how to migrate it, but it is more than a few hours and who has that kind of time?
Re:SQLite Is Serverless by sethev on Sunday January 26, 2020 @10:55AM (#22152637)
Didn't prevent it is closer to my recollection. My first job was on a system that used this idea pretty heavily - what a nightmare! We only got that code stabilized once we removed any sharing (and later removed Access completely).
Re:SQLite Is Serverless by tyingq on Sunday January 26, 2020 @09:57AM (#22152335)
Not open source, but Raima supports multiple processes on a single db file as well. https://raima.com/
Re:SQLite Is Serverless by mikestew on Sunday January 26, 2020 @05:03PM (#22155097)
FoxPro/Foxbase as well. In the Foxbase days predating FoxPro, there was even a “multi-user” version that, unsurprisingly, cost more than the standard single user.

And plenty of other file-based DBs such as Borland’s Paradox and the db engine, dBase; pretty sure FileMaker, too.

Re:SQLite Is Serverless by flatline on Sunday January 26, 2020 @11:17AM (#22152796)
HSQL does too I believe.
Re:SQLite Is Serverless by celticmusic on Sunday January 26, 2020 @03:13PM (#22154431)
JET database are what MS Access used underneath, and attempting multiple concurrent usage on JET databases is a good way to corrupt them.
Re:SQLite Is Serverless by EGreg on Sunday January 26, 2020 @05:42AM (#22151454)
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 by m-p-3 on Sunday January 26, 2020 @08:53AM (#22152064)
Serverless in this situation means that you don't really have to provision or setup an actual server to handle the database, the client itself just need the ability to read and write an SQLite file.
Re:SQLite Is Serverless by EGreg on Sunday January 26, 2020 @10:47PM (#22156731)
Because many of the locking things are outsourced to the file system which acts as server for concurrent threads.

A server is something that listens for commands from various clients and executes them.

Re:SQLite Is Serverless by idclip on Sunday January 26, 2020 @09:28AM (#22152202)
That just circle jerk. There is an agreed upon def of serverless.

If we reduce things to the absurd we stop being able to reason about things.

https://en.m.wikipedia.org/wiki/Serverless_computing

Re:SQLite Is Serverless by finnthehuman on Sunday January 26, 2020 @10:01AM (#22152346)
>There is an agreed upon def of serverless.

Sorta but not really. The fact people have worked backwards from marketing names to try and constructively define inherently self-contradictory branding (rather than create a descriptive category into which we place questionable names and ignore them) is an embarrassment for everyone except the marketing departments.

Re:SQLite Is Serverless by idclip on Sunday January 26, 2020 @02:43PM (#22154238)
I honestly too dislike all this naming fad and feel the internet’s been taken over by the management and marketting folk .. but still, i try not to hyperbole about it - too bad, but its sorta ok, and it ultimately irrelevant for the job, dbConnection is simply remote.
Re:SQLite Is Serverless by aikah on Sunday January 26, 2020 @11:30AM (#22152882)
It's called a buzzword, nothing more nothing less, it's like "cloud computing", eventually it becomes meaningless.
Re:SQLite Is Serverless by idclip on Sunday January 26, 2020 @04:00PM (#22154751)
We now have kubernetes tho, and openshift. And i actually believe in docker swarms and compose battalions.

Ill give u that its hard to discern when a thing is a real change and when it isnt, as the titans of industry try to peacock around.

Id just examine what they actually mean, for good measure. Theyre trying to sell things they have no idea about - but thats why the hierarchy of commerce is.

Re:SQLite Is Serverless by nickthemagicman on Sunday January 26, 2020 @12:33PM (#22153356)
Thank you for saying this. People seem to argue semantics to appear clever and it really pollutes communication and reasoning.
Re:SQLite Is Serverless by filleduchaos on Sunday January 26, 2020 @12:31PM (#22153337)
That is not the definition of serverless in question.
Re:SQLite Is Serverless by idclip on Sunday January 26, 2020 @04:08PM (#22154813)
If you examine it closely, youll see that they have alot incommon, and that the author defined the term neo-serverless to attempt to adress this - both definitions share the fact that multiple applications (in clientless form) can access the database. He even gives amazon S3 as an example. For neo serverless.

I agree with you that it take a bit to marry both, but the stretch isnt far.

Im also avoiding criticising the Author for not sticking to the main def, since id then be red-herringing the post.

Re:SQLite Is Serverless by filleduchaos on Sunday January 26, 2020 @05:33PM (#22155297)
> both definitions share the fact that multiple applications (in clientless form) can access the database

That is like the least relevant thing on that entire page, to be frank. "SQLite is Serverless" is specifically referring to SQLite being an embeddable library that runs in the same process (and same thread, even) as your application vs. the client-server architecture (database in another process, with communication via a port) that DBMSes like MySQL and co have.

> Im also avoiding criticising the Author for not sticking to the main def

The "main definition" (i.e. the web dev buzzword) came into being years after this post was written.

Re:SQLite Is Serverless by idclip on Monday January 27, 2020 @01:48AM (#22157304)
You are right
Re:SQLite Is Serverless by simias on Sunday January 26, 2020 @08:49AM (#22152046)
Well you effectively report some of the workload normally handled by the server to the OS's filesystem layer, that's true. In particular you rely heavily on the FS locking working correctly. Calling the FS a "server" is a bit of a stretch though.