<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Luke Chavers on Medium]]></title>
        <description><![CDATA[Stories by Luke Chavers on Medium]]></description>
        <link>https://medium.com/@vmadman?source=rss-2bbac31137fe------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*AeyqNqg6bCHEpQPn.</url>
            <title>Stories by Luke Chavers on Medium</title>
            <link>https://medium.com/@vmadman?source=rss-2bbac31137fe------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 11:37:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vmadman/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Random Errors: A Good Sign]]></title>
            <link>https://medium.com/develup/random-errors-a-good-sign-a112ae2211f4?source=rss-2bbac31137fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/a112ae2211f4</guid>
            <dc:creator><![CDATA[Luke Chavers]]></dc:creator>
            <pubDate>Sat, 31 Mar 2018 12:38:10 GMT</pubDate>
            <atom:updated>2018-03-31T12:38:10.101Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o7TmvDSNtgFvsWMz4g6Ucg.png" /></figure><p>If you’re needing reassurance that Skynet is still a ways out, here you go.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a112ae2211f4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/develup/random-errors-a-good-sign-a112ae2211f4">Random Errors: A Good Sign</a> was originally published in <a href="https://medium.com/develup">DevelUp</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DevelUp.js : Async and Await]]></title>
            <link>https://medium.com/develup/develup-js-async-and-await-a51d5479f8f6?source=rss-2bbac31137fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/a51d5479f8f6</guid>
            <category><![CDATA[es2017]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[await]]></category>
            <dc:creator><![CDATA[Luke Chavers]]></dc:creator>
            <pubDate>Wed, 08 Feb 2017 06:11:44 GMT</pubDate>
            <atom:updated>2017-02-08T07:09:57.053Z</atom:updated>
            <content:encoded><![CDATA[<p>A colleague recently turned me on to an ES2017 feature called “<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await">await</a>”, which extends upon ES2015’s introduction of <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise">native promises</a> by providing a synchronous-like syntax to JavaScript’s underlying, asynchronous, processing model.</p><p>Along with introducing me to the concept, that same colleague pointed me to a <a href="http://rossboucher.com/await">fantastic presentation</a>, from <a href="https://twitter.com/boucher">Ross Boucher</a>, that does a great job of explaining the “await” and “async” keywords in a way that I could easily digest. I highly recommend that you check it out.</p><h3>My Take</h3><p>Although <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await">await</a> does a lot to advance the asynchronous model by reducing the complexity of code structures, as an extension of the progress that promises have made, there is a cost that we should, at least, acknowledge.</p><p>A parallel can be drawn, here, with the ES2015 introduction of <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes">native classes</a>, which simplify fundamental prototype manipulation.</p><p>In both cases, the cost is an obfuscation of the underlying mechanisms of the platform (and the libraries that extend it) which, inevitably, remove an amount of control from the developer. In losing that control, developers also tend to lose opportunities to form deep understandings.</p><p>A developer who is learning asynchronous methodologies for the first time may not be motivated to gain a core understanding if “async” and “await” are available, since they make asynchronous code look a heck of a lot like synchronous code.</p><p>I’ve taught a lot of people to code, or to get better at coding, and one of the more common hurtles that I face when explaining any concept is their lack of “background information” about some mechanism. Those I’ve taught about promises, for example, usually grasp it more quickly if I teach them about “callback hell”, first.</p><p>With that said, this is not necessarily a bad trade, especially if developers learn when, and when not, to use these new language features. After all, one could argue that we lost an amount of control when we began compiling source code into assembly, but it would be hard to make a case for compilers as being a bad thing, overall.</p><p>Often, access to the underlying mechanisms of a platform just isn’t needed, especially if the adoption of a new feature is done in a comprehensive way, whereby the implementer learns to augment his or her broader approach to solving problems. As long as you try to develop a mastery of a new feature, by understanding how it works and why it exists, rather than simply gaining a surface understanding, then you can [usually] overcome the pitfalls and side-step the “gotchas” that come with it.</p><p>Overall, I think the new <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await">await</a> and <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function">async</a> keywords are awesome and I am excited to see where they take us as they gain <a href="http://caniuse.com/#search=await">wider adoption</a>.</p><h3>Further Reading</h3><ul><li>“<a href="http://rossboucher.com/await">ES7 Async/Await</a>” by <a href="https://twitter.com/boucher">Ross Boucher</a></li><li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await">MDN: Await Operator</a></li><li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function">MDN: Async Statement</a></li><li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise">MDN: Promises</a></li><li><a href="http://caniuse.com/#search=await">Caniuse: Async Functions</a></li><li><a href="https://tc39.github.io/ecma262/#sec-async-function-definitions">ES2017 Draft: Async Functions</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a51d5479f8f6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/develup/develup-js-async-and-await-a51d5479f8f6">DevelUp.js : Async and Await</a> was originally published in <a href="https://medium.com/develup">DevelUp</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Key Words: Transient]]></title>
            <link>https://medium.com/develup/key-words-transient-21c2d07bc1c4?source=rss-2bbac31137fe------2</link>
            <guid isPermaLink="false">https://medium.com/p/21c2d07bc1c4</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[keywords]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Luke Chavers]]></dc:creator>
            <pubDate>Mon, 16 Jan 2017 13:55:00 GMT</pubDate>
            <atom:updated>2017-01-16T14:45:09.527Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>adj. lasting only a short time; existing briefly; temporary: (<a href="http://www.dictionary.com/browse/transient">dictionary.com</a>)</blockquote><h3>In a Nutshell</h3><p>Transient means “temporary” or “non-permanent”. For our purposes, the opposite of “transient” is “persistent”. Anything that is meant to exist for a short time can be considered to be “transient”.</p><h4>Why it Matters</h4><p>Understanding the difference between transient and persistent data (and data stores) allows technicians to mitigate workloads by trading RAM for CPU and disk read/writes (collectively “ops” or “iops”). This can be leveraged to speed your applications up, dramatically, and lead to higher application performance and reduced infrastructure costs.</p><p>The trends towards containers also mandate fundamental changes in how we approach problems, making it hard for anyone to achieve success without first developing a mastery of the term.</p><h3>About the “Key Words” Series</h3><p>Being an autodidact definitely has a major downside: those of us who learned to code on the hard streets of IRC often miss out on some extremely fundamental terms and concepts. I’ve found that very few ideas are truly original, and often my eyes are opened the moment that I learn what something is called.</p><p>So, in hoping to save others a bit of grief, this 101/102 series attempts to tackle some of the most useful words in modern web development and outline some of their common usages.</p><h3>CS Usage: Transient Memory</h3><p>In computer science, the most obvious example of the word “transient” is in basic computer hardware. Virtually all CS/IT professionals understand how RAM and CPU cache (transient) differs from hard drives (persistent).</p><p>Data written to RAM rarely survives a full [user] session and never survives a reboot. Conversely, data written to a hard disk usually stays there until it is explicitly removed (or the disk fails).</p><p>CPU Cache (L1, L2, and L3) is even less permanent than RAM and is usually recycled and replaced <em>very</em> rapidly as the CPU cycles.</p><h3>Dev Usage: Transient Data Stores</h3><p>The most common usage of “transient” for developers is in reference to “data stores” (<em>anywhere</em> that you can store data).</p><p>As you may have guessed, development concepts are often extensions of basic computer science concepts, and therefore, closely related. Transient data stores almost always refer to data stores that exist in “transient memory” (RAM) and are sometimes referred to as “[in] memory stores”.</p><h4>Variables</h4><p>As developers, we leverage transient data stores constantly and without realizing that we’re doing it; every time you define a variable, you’re allocating space in RAM and every time you set the value of a variable, you’re storing data to RAM.</p><p>All variables, unless and until they are persisted, are transient.</p><h4>Transient Databases</h4><p>Perhaps less known to developers is the concept of “transient databases”, which are applications dedicated to the storage and retrieval of transient data.</p><p>Transient databases work in a similar way that variables work and usually have simple interfaces, such as “key/value”. Of course, they cannot be as fast as variables because of the overhead involved in communicating with them, but they have the added benefit of allowing multiple applications to “share” transient data and are still extremely fast when compared to traditional, persistent, databases (<a href="https://www.mysql.com/">MySQL</a>, <a href="https://www.mongodb.com/">MongoDB</a>).</p><p>Transient databases are fast because they store all (or most) of their data in RAM. The downside, of course, is that data is often at risk of being discarded or lost.</p><p>Many transient databases offer some form of persistence, but developers should be skeptical of such things. Data persistence has an unavoidable cost and as reliability increases, efficiency and speed, inevitably, decrease.</p><p>If you want to get the most out of transient databases you should disable persistence and only store data into them if you can afford to lose that data (because you can rebuild it, even if doing so requires extra work).</p><p>I’m sure that dozens of transient databases exist but the two that stand out the most, to me, are <a href="https://redis.io/">Redis</a> and <a href="https://memcached.org/">Memcached</a>.</p><h4>Caches</h4><p>Although it is a broad term, a cache is almost always a transient data store that allows persistent data to be served rapidly from transient memory (such as RAM).</p><p>Within the context of web development, a “cache” (aka “caching layer”, “forward cache”, “caching proxy” or “CDN”) is a middle-man apparatus that exists between an application and a persistent data store. They often store the responses from “read” operations, in RAM, from persistent data stores for a finite amount of time.</p><p><strong>Cache Example 1: CDNs<br></strong><a href="https://aws.amazon.com/cloudfront/">AWS CloudFront</a>, is a CDN (“content distribution network”) service that sits in front of your web site. Whenever a user requests a unique resource it will check to see if that resource is in its cache. If so, it will not contact your web site but will, instead, send the cached data to the user (this is called a “cache hit”). If not, it requests the resource from your website, forwards the response to the user, and then caches (stores) the resource/response for a predefined period of time (this is called a “cache miss”).</p><p>In this way, CDNs leverage transient data to trade reduced consistency (how up-to-date the resources your users receive are) for compute workload (CPU and disk ops) at your origin (in this case, your website).</p><p>In extreme cases you might be able to reduce the workload of your dynamic website, thus the size of your infrastructure, by as much as 95% by allowing your website content to be just a few minutes old for any given viewer.</p><p>CDNs usually have the added benefit of being geographically dispersed (hence the “N” in “CDN”). Often, CDNs will include multiple caching servers (called “edge servers”) and will route users to the closest one. By doing so, “cache hits” will further improve the response time of your website by, effectively, moving your website closer to your users.</p><p><strong>Cache Example 2: Query Caches</strong><br>Another example of caching persistent data is <a href="https://dev.mysql.com/doc/refman/5.5/en/query-cache.html">MySQL’s query cache</a>. In short, MySQL allows you to cache (store) the response to some (or all) queries in RAM, so that subsequent requests for the same data can be sent much, much, more quickly.</p><p>Although it can be difficult to do, properly configuring your DBMS and its internal caching mechanisms can radically reduce the compute burden on your DBMS, especially if a significant portion of the queries to your database are identical.</p><p>Query caching, being at the database level, usually has the added benefit of being able to automatically “invalidate” (clear) stale data whenever the data is changed within the database, which means you don’t even need to trade consistency for the speed and efficiency boost (though, you may still need a <em>lot</em> of RAM).</p><h3>DevOps Usage: Containers</h3><p>Although linux containers (LXC) have existed since 2008, they really caught their stride in 2013 thanks to <a href="https://www.docker.com/">Docker</a>.</p><p>Containers, led by Docker, are revolutionizing systems and devops, for many reasons, but they come with a catch: in order to use them as intended and reap all of their benefits, technicians and teams have to fundamentally change the way they build application environments.</p><p>In short, the most important thing that we all have to embrace, is the transient nature of containers and the environments (and data) within.</p><p>Of course, there are ways to persist data from and within containers, but all of those ways go against the grain, to at least some degree. If you want to save yourself a <em>lot</em> of hardship, you won’t try to fight it, except in the narrow subset of cases that you absolutely must.</p><p>I’ll save the container “deep dive” for future articles, but I should, at least, explain the fundamentals of their transient nature for the sake of being comprehensive.</p><h4>The Transient Nature of Containers</h4><p>Containers exist at rest as “images”. From the outside you can execute applications (usually, exactly one application) within the file system of an image.</p><p>Whenever you execute an application within an image, that image becomes instantiated, and an instantiated image is referred to as a “container”. If you’re following best-practices, containers are deleted, entirely, as soon as the application stops.</p><p>This means that, like bare-metal machines and virtual machines, containers lose their RAM whenever they stop. Unlike machines and VMs, though, they also lose any changes made to their file system since instantiation. In this way, containers can be thought of as transient virtual-machines.</p><p>Fully coming to terms with the transient nature of containers can be quite a struggle, but it really just boils down to the primary application being unable to persist anything to disk.</p><p>You can still pre-bake the disk with persistent data during the image “build” process and communicate with external data stores. So, you’ll be happy to know that almost every problem can be mitigated, with a bit of refactoring, and after doing the work, you’ll realize that you’re much better off, for many reasons that extend beyond containers.</p><h3>Conclusion and The Rise of Transience</h3><p>Computer science has been trending toward transience for quite a while, maybe since the utterance of the term “computer science”, and, so, its not a trend that is likely to go away anytime soon.</p><p>You might be familiar with other concepts, such as “commodity hardware” and “disposability”, both of which paved the way to the modern trend towards transient environments and infrastructures; the modern state of the art should not be surprising to anyone that has been following along.</p><p>Virtual machines came onto the scene and were probably, initially, praised for the advancements in resource isolation that came with them. However, as nerds learned to automate VM image builds and cloud services brought the “commodity hardware” advantage to the masses, the disposable nature of the VM started to lend itself to dynamic, and increasingly transient, infrastructures.</p><p>Containers just take the next, obvious, step, by removing the overhead that comes with turning a computer on and waiting for it to boot up.</p><p>A pleasant side-effect of this is that containers are making micro-service architectures more practical and now we’re seeing more of those explode onto the scene.</p><p>Coincidentally, persistent databases have been learning to trade CPU and disk ops for RAM by ramping up their internal caching capabilities, such as with <a href="http://dev.mysql.com/doc/refman/5.7/en/query-cache.html">MySQL’s query cache</a> and similar DBMS trends towards index and full-on data caching.</p><p>Likewise, most compute-heavy web applications are learning to use forward caches, such as <a href="https://varnish-cache.org/">Varnish</a>, and IaaS CDNs such as AWS CloudFront, to leverage transient data as a way of reducing compute workload and disk ops, in exchange for slightly reduced consistency (see also: <a href="https://en.wikipedia.org/wiki/CAP_theorem">CAP</a> and <a href="https://en.wikipedia.org/wiki/PACELC_theorem">PACELC</a>).</p><p>Because of these trends, its important that all CS/IT professionals understand how transient data and, by extension, transient data stores, databases, and infrastructures, are facilitating advancements throughout the industry.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=21c2d07bc1c4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/develup/key-words-transient-21c2d07bc1c4">Key Words: Transient</a> was originally published in <a href="https://medium.com/develup">DevelUp</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>