NoSQL

Schemaless data for gunslingers. Heavily focused on databases such as MongoDB, as well as hosting said databases as cloud instances.
Flask
27 May 2019

Managing Flask Session Variables

Using Flask-Session and Flask-Redis to store user session variables.
Managing Flask Session Variables

When building we build applications that handle users, a lot of functionality depends on storing session variables for users. Consider a typical checkout cart: it's quite often that an abandoned cart on any e-commerce website will retain its contents long after a user abandons. Carts sometimes even have their contents persist across devices! To build such functionality, we cannot rely on Flask's default method of storing session variables, which happens via locally stored browser cookies. Instead, we can use a cloud key/value store such as Redis, and leverage a plugin called Flask-Session.

Flask-Session is a Flask plugin which enables

Continue Reading
NoSQL
05 Jan 2019

Using Redis to Store Information in Python Applications

A temporary data store for everything from session variables to chat queues.
Using Redis to Store Information in Python Applications

We’re hacking into the new year here at Hackers and Slackers, and in the process, we’ve received plenty of new gifts to play with. Nevermind how Santa manages to fit physically non-existent SaaS products under the Christmas tree. We ask for abstract enterprise software every year, and this time we happened to get a little red box.

If you've never personally used Redis, the name probably sounds familiar as you've been bombarded with obscure technology brand names in places like the Heroku marketplace, or your unacceptably nerdy Twitter account (I assure you, mine is worse). So what is

Continue Reading
NoSQL
14 Dec 2018

Complex Features in MongoDB Cloud: Add Image Tags with AI

Using functions, webhooks, and values to utilize external APIs.
Complex Features in MongoDB Cloud: Add Image Tags with AI

Friends, family, and most importantly, strangers: I approach you today with a tale of renewed inspiration. After loudly broadcasting my own confusion and mediocre ability to actually implement an effective cloud via MongoDB Stitch, my ineptitude has been answered with an early Christmas gift.

My incessant complaining gained some acknowledgement from a couple of folks over at MongoDB. Perhaps the timing is simply by chance, but since then I've begun noticing something some subtleties in the Stitch documentation; namely that if you look hard enough, some of it begins to make sense. Either way, I'm chalking this one up as

Continue Reading
NoSQL
26 Nov 2018

MongoDB Stitch Serverless Functions

A crash course in MongoDB Stitch serverless functions: the bread and butter of MongoDB Cloud.
MongoDB Stitch Serverless Functions

At times, I've found my opinion of MongoDB Atlas and MongoDB Stitch to waver between two extremes. Sometimes I'm struck by the allure of a cloud which fundamentally disregards schemas (wooo no schema party!). Other times, such as when Mongo decides to upgrade to a new version and you find all your production instances broken, I like the ecosystem a bit less.

My biggest qualm with MongoDB is poor documentation. The "tutorials" and sample code seems hacked-together, unmaintained, and worst of all, inconsistent with itself. Reading through the docs seems to always end up with Mongo forcing Twilio down my

Continue Reading
NoSQL
23 Nov 2018

Stitch's “Query Anywhere”: Executing Business Logic via Frontend

MongoDB Stitch vs the impossible: secure database queries via frontend JS.
Stitch's “Query Anywhere”: Executing Business Logic via Frontend

Some tools are simply the right tool for the job. I imagine this must have been the thinking behind the wave of JSON-like NoSQL databases at their peak, and even so today. If we figure we’ll be passing information as JSON to an endpoint, to then have it structured into a schema, only to be promptly broken down again for our request seconds later, if you will, it’s fair to question the cost-benefit of schemas in some cases. A lot of those cases cover the apps we build for ourselves: ones that let us do stupid things like

Continue Reading
NoSQL
15 Nov 2018

MongoDB Cloud: "Backend as a Service" with Atlas & Stitch

MongoDB's silent transformation from an open-source database to enterprise cloud provider.
MongoDB Cloud: "Backend as a Service" with Atlas & Stitch

You may have heard me drone on here and there about MongoDB Atlas and MongoDB Stitch. Previously, I hacked together an awful workflow that somehow utilized Tableau as an ETL tool to feed JIRA information into Mongo. I'd like to formally apologize for that entire series: I can't imagine there's a single soul on this planet interested in learning about all of those things simultaneously. Such hobbies reserved for masochists with blogging addictions. I apologize. Let's start over.

This is not a tutorial on how to use MongoDB: the database. I have zero interest cluttering the internet by reiterating what

Continue Reading
Flask
31 Jul 2018

Using MongoDB Atlas as your Flask Database

Since you prefer using Python and Flask, I’ll assume we both prefer enjoyable dev.
Using MongoDB Atlas as your Flask Database

It's been roughly a year since MongoDB launched their Stitch: a "back-end as a service" cloud offering. I've been tinkering with Mongo on the cloud ever since... Alright fine, "tinkering with" may better be described as  "accidentally became dependent on it after developing new features in production environments," but I can't really complain thus-far. If you're not familiar, MongoDB Atlas is MongoDB's cloud-hosted database offering; that is to say, the same as any other MongoDB database, except very expensive.

The jury is still out on how MongoDB Atlas and its counterpart Stitch will fit into the picture of next generation

Continue Reading