last week someone asked me what our “stack” is…
A stack is one of those abstract concepts that seems simple, but i wasn’t confident i could speak intelligently about the specifics of “our” stack. so….off to the internet! … where no one could agree on a definition. so… off to the engineering team!!! ….who all gave different answers…
the tl;dr conclusion I reached is that a stack is all the “shit” needed to do a “thing.” And “things,” “needs” and “shit” are open for interpretation.
After failing my OCD in trying to categorize technology types, or find some pattern in how it was being explained, I took the holistic approach and had one of our PI guys walk me end to end through everything that moves when someone clicks a button on our site.
the tl;dr of this next section (yes B, I can put 2 tl;drs in one piece of writing)- is that this is too much to fully grasp in one pass and it’s gonna have to come together slowly over time as I get more exposure. but just for fun (and because I enjoy self-deprecating humor) here’s kartarr’s insane attempt at explaining our back-end path.
********************
H’okay so here’s the user… he clicks the search button on airbnb….then you’re go into HTTP technologies land (which even tho http FEELS like a common word, i’m not sure I could explain how it actually works). something to do with servers and requests and URLs and the things…and omg proxies! which was an Out Like Pluto song… and also TCP, which was Out Like Pluto’s original band name. v important to know before moving on.
k so then because we’re grown ups, we don’t just let the “things” talk to other “things” directly! that would be madness bananas! let’s stick some more technologies in there!! so the…thing… that’s moving… the…request? yeah that! so it goes through a bunch of “things” that other engineers built so the world would be a better place and stacks would become mountains. things like Akamai, which sounds like (some Japanese paper folding video game) it just makes a bunch of copies of a website and stores it on servers closer to wherever the users is and then redirects their browser to the uh….replica?… maybe? how’m i doin? 40% sure some of of that was right (thanks wikipedia for not being a tool for once!) but it’s going downhill from here…
k so then amazon gets involved (cuz in the flowchart there’s an AWS cloud above everything) but I’m not sure what it’s really doing. cloud stuff. which is confusing. and if you think you know, you don’t. or you work for AWS (hai Dan!)
so then there’s a whole bunch of stuff that i’m thinking is internal because google doesn’t have any search results for it. unless we really do use the technology of greek gods and mythical creatures to do whatever “http technologies” things they’re doing. things like … load balancing. obviously, loads should be balanced. if you’ve got unbalanced loads then you can suck a dick. that’s what i always say.
then (THEN!) there’s zookeepers! and synapses! and daemons! (another word i’ve seen a lot and definitely have NO idea what it is, except that it sounds evil), and also rakes, which don’t appear to be part of the rails framework according to the graphs but i don’t understand how it could NOT be? hello? rake routes? (please dear god let these concepts start connecting at some point pleasepleasepleasepleasepleaseplease) But sure, why not? fuck rails. this rake has NOTHING to do with rails rake routes. TOOOOOTALLY DIFFERENT rakes. God, Karen, you’re so STUPID! in fact it’s all part of the unicorn uh… object. (see also- everything is objects! objectsobjectsobjects!) which do some kind of unix magic as far as i can tell… but hey, isn’t all unix magic? :::warm smile next to a fire :::
and then…Finally the path leads us to the ruby code (yaaaaaaaay i know this one!!) which is in the “language” bucket in our “shit” list (ha). and from my entry on routes files, I explained how it goes to the routes file to find the mapping of the URL to the controller + the method, goes to the controller and runs the method… but not before…
(**warning rails magic ahead**)
…it digs through a whole SLEW of built in objects like, testing services and something that caches… uh objects? (double ha)… something about memcache which feels like a redundant name? then and it uses Active Record (which —
side bar– unless I’m missing something, ActiveRecord is a library of ruby functions that lets people use SQL who don’t want to write SQL, which feels cyclical because SQL is kind of a way for non-programmers to not have to learn programming languages to get data so… by that logic… if I wrote a ruby gem that let you write HQL code using a library of functions that called active record functions…. profit?????? )
…k so then it queries the database (in the most annoying inefficient way possible probably) which is a whole NOTHER bucket of shit that I’ll skip because… ugh data infra…
and then FINALLY, **tho not any less confusingly**, it renders the view file using … a whole bunch of front end shit, which appears to be Javascript but there’s a bunch of .js things that appear to have some **relationship** to javascript and kinda feel like a rails to ruby relationship but i’m not sure how it works and why there’s about literally 80 billion of them but everything in the code I can see look pretty much like javascript. which… is not java… totes different. way different, Karen. except they’re related.. kind of… except, no they are. well they were, originally, but not now.
then uh… step 3 WEBSITE!!!
*****************
so in conclusion, just say ruby on rails and if you work in the FBA, there’s an 85% chance you’ll be right. and if someone asks you any follow up, just recite the lyrics to any Kanye song, replace every 5th word with “object”, every 7th, 8th and 9th word with the acronym of those 3 words, pepper in “node” and “script” lightly, and chances are you’ll probably be right accidentally.
the end.