Dax Profile picture
May 19, 2021 15 tweets 4 min read Read on X
It's easy to make the same old jokes about NoSQL but there's a much more important lesson to learn of how it tragically became a punchline in the first place.

Story time...
Back in the early 2010s a PAAS company called 10gen decided to pivot. They were going to narrow their focus and develop a new kind of database that they named MongoDB
At this point most software engineers only had experience building with SQL databases. The cloud was new and exciting with a whole lot of companies being founded. People were open to a paradigm shift.

10gen needed a strategy to position MongoDB at the forefront of this new wave
They decided to deploy a massive marketing campaign evangelizing NoSQL and MongoDB. Suddenly everyone was wearing a MongoDB shirt and attending 10gen sponsored classes and hackathons.

It felt like the next big thing.
The critical mistake they made that echoes to today was focusing the pitch on MongoDB being easier because it was schemaless.

No pesky schema to define before writing data and no columns to add when things change. Maximum flexibility for your fast moving startup. Also web scale
This lead to engineers expecting an easy experience and conflating not having a schema with not having to spend time data modeling. Data was thrown into MongoDB without thinking too hard about it.

And at first, it definitely felt easier...
...but then reality hit.

NoSQL's flexibility actually requires more attention to data and access patterns - not less.

Additionally engineers were not thinking in NoSQL, they were replicating SQL patterns in MongoDB and expecting them to work well.
As these systems grew they created some of the most painful technical problems I have seen in my career.

Everywhere I looked teams were dealing with poor data integrity, deep debt in their data models, and system outages. Not to mention some data loss bugs in Mongo itself
Across the industry, expensive migrations were initiated to get these systems off of Mongo and back to traditional SQL databases. A few of those efforts did not fail.

This era of pain led to Mongo becoming a meme and poisoned the well for NoSQL at large.
The educational failure by 10gen lead to misconceptions that are still repeated today:

1. NoSQL lacks schemas and data integrity
2. NoSQL is for niche non-relational use cases
3. NoSQL is unwisely optimizing for scale most companies won't see
Frankly these misconceptions are coming from those without experience deploying a well designed NoSQL database like @dynamodb. It can handle nearly every use case that a sql database can.

The most that can be said is some things are easier while some things are harder.
Additionally, teams are choosing @dynamodb not because Postgres can't scale to their needs (it definitely usually can) but because of what the scaling experience looks like.
SQL databases require continuous scaling work feature by feature. Tables get too big, queries get too slow, need to manage connections, etc. All manageable

In NoSQL, if you make the mental shift to learn the patterns, features are scalable on day 1 and won't need work on day 100
These are two subjective styles of building comes down to what feels right to you. There is no good vs evil.

If this has rekindled some curiosity around NoSQL I highly recommend watching talks by @houlihan_rick and checking out The DyanmoDB Book by @alexbdebrie
The referenced tweet was deleted so attaching here. It was good natured joking, definitely didn't think it needed to be deleted Image

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Dax

Dax Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @thdxr

Oct 25, 2023
i’ve been using solid every day for the past two years

something has happened in the last few months where it feels like the ecosystem has hit a threshold and is producing some extremely high quality stuff

some highlights in the thread
kobalte is the absolute best ui toolkit i’ve ever used in any framework

it’s unstyled so make it look like whatever you want, the APIs are fantastic and i’ve never ran into any limitations so far, excellent typesafety and accessibility

kobalte.dev/docs/core/over…
you can pair those form elements with modular-forms

checkout this guide - you end up with a full form library that can make use of all your custom elements and represent really complicated data structures

modularforms.dev/solid/guides/k…
Read 5 tweets
Aug 8, 2023
this was a question about implementing multi-tenancy in a single database

basically even though you have many customers, you want to pretend like each customer has their own database

most products get this wrong and then end up missing some useful features

read below https://t.co/vKrIPm2Ph6twitter.com/i/web/status/1…
one way to implement this is to specify a column in every single table - in this case `workspace_id`

every single query you do on behalf of a customer will be filtered `where workspace_id = xxx`

from their point of view it's like only their own data exists in the db
when it comes to indexes for a table like users, todos, etc you can specify it as a compound primary key `(workspace_id, id)`

the order of this key matters! it means the index will be efficiently used when filtering just `workspace_id` or both `workspace_id` + `id`
Read 11 tweets
May 24, 2023
lot of you talking about lambda function warming but i don’t remember authorizing any of you to comment on this

come to papa i’ll lay it out for you

here’s another thread to shove into your empty brains
sorry @lizisraad we’re talking about cold starts again

if you engineer for serverless you select minimal dependencies and keep your code small

these are good practices in general and if you do them in serverless architectures you don’t really have to worry about cold starts
but let’s be practical here, we’re supposed to be engineers

some workloads do experience bad cold starts - might be something that was built without understanding why having a lot of inefficient deps is bad

we can shame them or find a way to get it working
Read 9 tweets
May 1, 2023
alright i can’t resist

everyone is covering the technical details of the @vercel announcement so not gonna comment there

but today marks a major shift in how they’re positioned strategically

have some thoughts

threadboi time
vercel has had a brilliant strategy that makes them different than other hosting providers

they don’t run infra

all of their own bills are usage based

they’re only charged when they’re charging you

and so they don’t have to be over provisioned just in case your app goes viral
they delegate that to hyperscalers like AWS and Cloudflare

those companies operate at such a massive scale that their prices are dirt cheap

they’re also extremely tested and reliable with plenty of room to resell them with a nice markup
Read 9 tweets
Apr 30, 2023
all this auth talk with @ClerkDev surprised no one has brought this up

say you're using github login

one of the best features in clerk is not having to configure a new github app for each one of your development environments

but i have some concerns with the implementation
when logging in you can see that you're not authorizing your app specifically - you're authorizing Clerk as a whole Image
this can be confirmed by setting up two different clerk apps and looking at the `client_id` parameter in the URL - it's always 456274a3f3e4821d16e4

this is how they provide the feature - clerk sets up this flow once and tracks on their end which apps should have access
Read 8 tweets
Apr 27, 2023
lots of talk about auth being easy to roll yourself

i’ve tried to use every managed auth provider i could find and i always ended up doing my own thing

and it has nothing to do with it being easier or even cost

there’s an entirely different problem

thread boi time
when you look at these auth solutions they typically will handle three things

1. handshakes with third party IDPs (login with google, etc)
2. session management
3. user storage

1+2 are boring and i’m 100% down to offload it to someone else

the problem is #3
every managed auth provider eventually wants to store your users for you

reason being solving 1+2 isn’t a sticky pitch and can be done by an open source library

but if you’re doing user storage you can start to offer all kinds of attractive features

but there’s a trade off
Read 9 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(