text
stringlengths
0
1.17k
[1395.52 --> 1401.32] array of undefined that was never we're never getting cleaned right so because of the so you
[1401.32 --> 1408.82] said it was fixed the week of is that right it was fixed about two two weeks before um uh but uh there
[1408.82 --> 1416.06] was some uh some build issue with the uh smart os distribution of the new version of node and so
[1416.06 --> 1422.52] uh we missed a stress test because it was like a few hours late and then after that we were busy with
[1422.52 --> 1428.38] a few other things so we were we ended up putting it uh a week before and uh and crossing our fingers
[1428.38 --> 1432.52] yeah can you really like how easy is it to to test that though to stress test that
[1432.52 --> 1440.06] uh leave your system in production for a day yeah it's uh yeah like my favorite thing about walmart to
[1440.06 --> 1447.48] say is that we're we're too big to stage um yeah and and the reality is that we could not really
[1447.48 --> 1452.10] reproduce it for months um and we still can't reproduce it with the actual system the only way
[1452.10 --> 1457.70] i was able to reproduce it was with with this little script i wrote that was uh creating a very
[1457.70 --> 1465.64] specific scenario of bursts of traffic um to actually stress node in just the right way to to make it
[1465.64 --> 1472.30] happen yeah well so long story short though the the whole thing was a big success big win for you big
[1472.30 --> 1478.74] win for node um let's talk a little bit about you know the actual i mean the implementation of of uh
[1478.74 --> 1483.34] you know what you guys did and then potentially you know get into happy a little bit so it's my
[1483.34 --> 1488.02] understanding that you guys started out um using express as that was really the only option at the
[1488.02 --> 1493.72] time is that right so i i started uh the origins of happy were really uh back at yahoo i was working
[1493.72 --> 1499.54] on a project called slid for about a year so i started when node was uh just 0.2 just came out
[1499.54 --> 1508.72] um so i guess it was november three years ago and and i was building a list making a collaborative
[1508.72 --> 1516.50] list making tool at yahoo and and i used express at the time um it was really the only option um it was
[1516.50 --> 1521.06] really just express and connect those were the only two things uh and express was built on top of it
[1521.06 --> 1527.06] and we used that for a while but what was going on you know in that one year is that i found myself
[1527.06 --> 1532.52] basically building a framework on top of express because express uh gave so little functionality
[1532.52 --> 1538.34] it basically was just a router with a little bit of uh of helpers but it it wasn't really a full
[1538.34 --> 1545.62] web framework that did all the things i want in terms of uh redirect the right way and uh and handle
[1545.62 --> 1552.24] um like rendering views without having to constantly set up the view uh context and um
[1552.24 --> 1559.62] and at the time also the the middleware ecosystem for express was very very uh very young um i mean
[1559.62 --> 1564.74] basically i was finding uh express bugs on a daily basis and just and just iming uh uh tj and saying
[1564.74 --> 1573.12] hey tj another one um and so that that has changed very dramatically but uh when i went to walmart
[1573.12 --> 1579.44] but i did this i basically i took the uh the express um layer that we've built um in in the in the
[1579.44 --> 1585.26] slide project which was open source by yahoo um so that was easy and then um we we kind of like said
[1585.26 --> 1590.86] okay we're going to call this happy and it's going to be basically an express layer that uh that will
[1590.86 --> 1596.72] add all of everything we needed and if you look at what paypal just did uh with their uh um um kraken
[1596.72 --> 1601.00] framework they kind of did the same thing they took express and then they realized express by itself is
[1601.00 --> 1607.44] not really a very useful framework um for a large team so they ended it went and added a bunch of uh
[1607.44 --> 1612.44] of abstraction and layers on top of that right so we did that for a while and it was working well
[1612.44 --> 1619.60] but then we uh we started hitting uh the the limits of of what express can do and the biggest one is
[1619.60 --> 1625.66] the the way the the router is designed in express it's basically just a gigantic array of regular
[1625.66 --> 1630.94] expressions and all it's doing is that whenever a request comes in it's just it just go through the
[1630.94 --> 1636.42] array in the order that you added your routes into the array and it's doing a regex match against each
[1636.42 --> 1642.12] one of them and when it finds a match it calls the function uh that will match it and when you uh and
[1642.12 --> 1647.14] all the middleware stuff is basically just adding a wildcard match into the array there's nothing
[1647.14 --> 1653.62] there's no magic there it's a very very um it's kind of beautiful in how simple the the entire
[1653.62 --> 1658.78] architecture of expresses but when you're working in a in an enterprise environment when you have
[1658.78 --> 1663.98] multiple team working on the same server you're going to uh want the server to take care of for
[1663.98 --> 1669.14] example collisions in your routes you don't want to have to end up with you know two routes with the
[1669.14 --> 1675.42] same path uh two middlewares conflicting on what they're changing um and very fast we got us into
[1675.42 --> 1683.64] um middleware hell which uh i i'm very proud to say that that was a term that i i started um
[1683.64 --> 1688.84] probably being like one of the first people to actually use express in in such a large scale that
[1688.84 --> 1696.84] we experienced it and and it was it was really painful we we wanted the framework to to protect
[1696.84 --> 1702.82] us from from doing stupid things and it wasn't so we switched to uh director from the nojitsu guys
[1702.82 --> 1708.08] and we used no director for a little bit um because director just gives you a router and you can use it
[1708.08 --> 1713.38] as any way you want uh but then we hit limitation there as well because of the way they store the
[1713.38 --> 1720.04] route tree and at that point we felt pretty good about just doing our our own internals um we're
[1720.04 --> 1727.34] talking about you know a year and a half into working on this this environment and um and the other thing
[1727.34 --> 1735.74] is that that when you start to build a real production dependency on on on these things you you kind of
[1735.74 --> 1740.56] require a different level of maturity from the from the modules you're using from the open source stuff
[1740.56 --> 1749.20] you're using and we found ourselves um uh trying our best to use like public open source modules but
[1749.20 --> 1756.16] very slowly but surely moving towards more and more code base that we were we were managing it just
[1756.16 --> 1763.72] because uh the quality was was uh more uh within our our uh criteria and uh if there was a problem we
[1763.72 --> 1769.44] can fix it right away we didn't have to fork um or start playing all those games or trying to find
[1769.44 --> 1776.72] someone on you know twitter to help us uh accept a pull request we've made and so we're still using
[1776.72 --> 1783.12] a significant amount of open source stuff but uh whenever we we hit a wall with a with a module um
[1783.12 --> 1788.66] uh we we are much more trigger happy now to fork it and create our own than than we were a year ago
[1788.66 --> 1793.72] right you guys are much more familiar with the whole environment now as a team and and your your needs in
[1793.72 --> 1800.50] that environment so there's a lot more confidence in that area i would imagine yeah and and we we're
[1800.50 --> 1805.88] also uh uh we we feel like we're you know we're we're giving uh we're giving enough back that uh
[1806.70 --> 1812.84] um like we if you talk to most of the uh the the leader in the node community they're all about you
[1812.84 --> 1819.52] know small tiny modules you know they all hate frameworks um you know and and it's kind of funny
[1819.52 --> 1823.82] whenever they they talk about framework that like you always hear one of them will say yeah there's
[1823.82 --> 1827.70] also you know happy from the from the mall mart guys um which if you're doing large scale stuff
[1827.70 --> 1832.16] that's actually a good solution but you know really you don't need it um it's always this you know
[1832.16 --> 1838.94] qualified love yeah uh coming from from from uh a lot of the the core node people which i respect
[1838.94 --> 1844.12] but at the same time if you work in a large large team um you have a lot of people building stuff you
[1844.12 --> 1849.22] really want to have a a plug-in architecture that people can build their own stuff and then
[1849.22 --> 1853.22] just deploy it together without having to coordinate every change without having that
[1853.22 --> 1860.12] one gigantic scary routing table file everybody has to constantly change uh to get their stuff into
[1860.12 --> 1866.72] the server um so it's those were the the the things we focused on the last year in terms of
[1866.72 --> 1871.46] of the framework so it's interesting then because you guys started so you did your own thing and
[1871.46 --> 1876.08] and with happy you talked about you know how how node the node community loves a bunch of little
[1876.08 --> 1880.80] tiny modules but uh you you briefly mentioned it but you went through a pretty modular approach to
[1880.80 --> 1887.28] how you deal with happy right so um first of all you your uh organization name on github is spumco
[1887.28 --> 1892.90] and uh why don't you real quick tell tell me the story you said about spumco and where that came from
[1892.90 --> 1900.04] so the the first module was called happy which was uh short for http api
[1900.04 --> 1905.96] uh so it was really an acronym but then as soon as uh i wrote it down i was like happy happy
[1905.96 --> 1912.90] joy joy um all my childhood that ran in stimpy days uh just you know came flooding flooding back
[1912.90 --> 1919.50] and so of course the second module we uh we created was called joy and we called it uh j-o-i just to
[1919.50 --> 1926.10] stick with the same spelling um style of happy uh and after that basically every new module we created
[1926.10 --> 1934.62] uh was uh based on some kind of random stimpy character or or episode uh and at some point
[1934.62 --> 1943.56] we were like over 30 um public uh github projects which made uh life on the official warm at labs github
[1943.56 --> 1949.46] account quite miserable because uh github doesn't give you like any way to organize your stuff other than
[1949.46 --> 1955.44] everything is flat right in your in your organization and when you have a couple hundred other people
[1955.44 --> 1960.66] all using the same github uh organization the dashboard becomes useless so we were like okay
[1960.66 --> 1965.44] we need to move our stuff to a new org and what are we going to call it and i was like i don't want
[1965.44 --> 1969.92] to call it another like you know walmart 2 or like let's find let's find something a little more
[1969.92 --> 1977.52] creative so we we chose spunko which is uh uh spunko with a k with a c is the name of the animation
[1977.52 --> 1985.42] studio that created ren and stimpy and so we call our our organization spunko with a k uh as a kind of a
[1985.44 --> 1993.86] homage to uh um to that yeah it's all your all your uh plugins here so uh you guys actually were
[1993.86 --> 1999.88] brave enough to name one poop and that is the plugin for uh or the module for uh kind of like
[1999.88 --> 2005.98] exception error handling is that right well the the proper tagline is uh it's a plugin for taking dumps
[2005.98 --> 2012.56] yeah processing a dump and cleaning up after an uncaught exception uh so that's a little that's funny