by oblib · 6y ago · 0 comments
My son was there working as volunteer, and so was his ex-girlfriend, who's still a close family friend. I was chatting with them both throughout the evening and into the wee hours this morning.
They worked different locations in the Des Moines metro area and the results they reported to me were pretty close to the same in both.
I'll say this about it, it's hard to imagine that less than 4500 calls to a server over the course of an hour or two would "crash" it, or even ten times that number. And that I think an SQL db is a poor choice for an app like that.
CouchDB, or most any open source "nosql" db, would've been a better choice and, really, so would a dead simple flat file db to store the data for each precinct in and those are both very easy to build for something as simple as this.
And they didn't even need an "app" per se. All they needed was a password protected web page with a dead simple form.
What happened makes it a bit difficult to avoid pondering if the delays weren't deliberate. Whatever the case may be, the DNC is who ended up taking it on the chin.
The data being submitted is so simple that using an SQL db adds a layer of unnecessary complexity.
So did their decisions for authentication, which appears to be where things got stuck.
Or 1678 password protected databases with one or more human readable files in them and let CouchDB handle user auth, which CouchDB makes really easy.
You could do the same thing with a simple flat file database using directories and files and system level user access, and it'd be very fast too.
This is pretty much the kind of thing CouchDB is designed for though and has tools built-in to make it easy.
This is exactly the kind of thing that SQL database is shine at and noSQL databases do poorly.
No, I've not. I just never liked the way it worked so I have to honest and open about my prejudice.
> This is exactly the kind of thing that [...] noSQL databases do poorly.
That's really not true. I've built web apps that do pretty much exactly what that voting apps does and I use CouchDB to do it because it was built specifically for this kind of thing, and it makes it very easy.
That's not the same as saying SQL won't work. Or even that it's a bad choice by design if it's what you're familiar with and good at using it.
How much time have you spent with CouchDB?
I do know that those coming from a long history of using SQL dbs often have a hard time using CouchDB. I had a hard time with SQL, so maybe it's a right brain/left brain kind of thing. Or maybe it's just not really wanting to learn a different way to do what you already know how to do with a different tool.
I chose to use a hand rolled flat file database early on (around 2000) as a backend for my web apps. When CouchDB hit v1.4 I switched to it because it worked very much the same as my db and offered a lot of advantages. It's gotten a lot better over the years since too.
So yeah, my view comes from a different perspective.
What happens when two people share authentication (which will happen!) and access the app at the same time. Maybe you are going to try and implement file-locking, yourself, badly?
SQL has literally been used for this kind of app since the 1980s. It's simple to use, and easy to find developers who use it.
If they both come from a different district and log into CouchDB they'll either only write to their file (one db, multi-user) or write to a file (or files) in their db (db per user).
If two users write to same file in same the db at the same time the DB will note the conflict and decide which data gets stored in the file.
https://docs.couchdb.org/en/stable/replication/conflicts.htm...
This should fall on the IDP (Iowa Democratic Party) as they commissioned the app...