MongoDb, The Ninja, and Glorified JSON…

Since back towards the end of 2020 I have been learning MongoDb. I haven’t blogged about it because as it turns out you can either learn a technology or write about it 🙂

I’m just kidding. Kinda.

I was raised on SQL databases – first MySQL and SQL Server and later Postgresql. I even have a cert for that… But working on the Google Firebase platform, which provides Cloud Firestore ( yep, another db cert ), gave me a start with NoSQL databases.

MongoDb

I have come to appreciate the glorified JSON as a database concept…

However even after learning how to make indexes on Firestore I still ran into some things that made me say – if it was MySQL I would just….

That brings us to MongoDb. MongoDb is more of a full fledged database system than Firestore is – in the way that us old people think of databases anyway.

Quick, true, aside: Once I sheepishly admitted to the Ninja that back when I was first self learning everything computer, maybe 1995 or 96 I created a banner ad network. It grew large enough to need its own pair of dedicated servers and eventually I sold it lock, stock, and barrel. The cringe part was that at first I didn’t even know about databases – but I knew I had to store data. Version 0.1 of that database was flat files. I would add, remove, count, etc. 0’s and 1’s in a text file.

I thought the Ninja would berate me for being such a clueless noob, but he thought it was genius. I needed it, so I built it. Then I learned a better way and re-built it. Really not much has changed…

— Short Story Long…

That brings us to today and me re-building a number of my web apps and transitioning them from Google Firestore to MongoDb. I have a number of reasons for the change. The main one is performance – Firestore itself is very fast but the Google Firebase stack is BIG! It is easily the largest part of HEADLIN3S for instance.

MongoDb Open Source Database

Mongo has a open source community version you can install locally or on your web server. Getting a bare metal Linux box and installing only what I need and using Mongo for the db my build is MUCH smaller. Smaller means faster and faster in web dev is key.

So my re-built web apps are smaller, faster, and are now easy to move. All I need is a Linux server, a root account, and ssh… In fact the lovely Teresa Gail had me learning Docker and Kubernetes – so now I have my apps in a container and went straight dev-ops on’em.

So it seems that I still create things the way I always have. Hopefully the final product is better 25 years later…

Leave a comment

Your email address will not be published. Required fields are marked *