<?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 Matthew Grey on Medium]]></title>
        <description><![CDATA[Stories by Matthew Grey on Medium]]></description>
        <link>https://medium.com/@matthew-g?source=rss-5b9d774599eb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*swNF-1ZWqMmJR52Tp2K1_A.png</url>
            <title>Stories by Matthew Grey on Medium</title>
            <link>https://medium.com/@matthew-g?source=rss-5b9d774599eb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 04:14:39 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@matthew-g/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[Why does everyone hate chatbots?]]></title>
            <link>https://engineering.ferocia.com.au/why-does-everyone-hate-chatbots-2409bd130340?source=rss-5b9d774599eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/2409bd130340</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[customer-service]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[chatbots]]></category>
            <dc:creator><![CDATA[Matthew Grey]]></dc:creator>
            <pubDate>Mon, 28 Jul 2025 00:42:47 GMT</pubDate>
            <atom:updated>2025-07-28T00:42:47.431Z</atom:updated>
            <content:encoded><![CDATA[<h4>Understanding customer service automation</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9HuHQlrKNoP5Pigw" /><figcaption>Photo by <a href="https://unsplash.com/@askkell?utm_source=medium&amp;utm_medium=referral">Andy Kelly</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Up prides itself on its team of human customer support agents working in the same office as the people making the app. In fact as I write this, I can look across the room and spot a good number of them. When you need help, you’ll pop open the app and start talking directly to a human. It’s pretty cool.</p><p>Part of my job is to make tools to give those humans as much power as possible to swiftly help our customers. However, humans are expensive. What about non-human customer service? Machines are cheap, why not get customers to talk directly to machines instead?</p><p>I’ve been thinking about the rationale behind why we shy away from that option in lieu of real humans. Why does everyone hate chatbots?</p><h3>Chatbots</h3><p>I use the word ‘chatbot’ quite liberally in this article. It’s used to encompass all number of automated systems that one must travel through to get a company to do something for you. Be it returning a faulty purchase or summoning a human to complain to. Indulge me for a moment in listing and criticising some of these machines. May it prove cathartic for anyone who has ever had to dispute a bill in the past.</p><blockquote>I made a call one bleak evening. My internet service was ailing, its gateway blinked red. The pit of my stomach dropped. DREAD. My eyelids scrunched tight. FEAR. Air sucked in through gritted teeth. PAIN. Hairs stood on end. TERROR. I howled into the abyss as the phone receiver crackled…</blockquote><blockquote>“For billing, please press one.”</blockquote><h4><strong>Phone trees</strong></h4><p>This is truly the worst of the worst when it comes to machine-based customer service. It can take the form of keypad navigation (press one for accounts), or verbal navigation (Speak the magic words and the machine will obey).</p><blockquote>CUSTOMER.<br><em>Sorry, I couldn’t understand. Could you please repeat that?</em><br>CUST-OH-MER<br><em>Did you mean, Customer?<br></em>YES<em><br></em>Sorry, I couldn’t understand that…<em><br>*screeching*</em></blockquote><p>It takes too long. Provides little to no context for decisions. There’s no backtracking, only starting all over again. After navigating the tree, you may well be dumped onto a call waiting queue anyway.</p><h4><strong>Text chat</strong></h4><p>You’ll see this a lot on websites, a popup clippy-like that you can chat with. The word ‘chat’ really gives it too much credence. The machine has some smarts to pick out keywords or phases and match them to pre-canned responses.</p><p>Frequently the machine can’t actually help you as, after all, it’s a glorified FAQ page. That becomes extra frustrating if this chatbot gates actual human customer service. You know that the bot can’t help you, but alas you have to tango with it before getting onto a human.</p><p>Interestingly, we see this frustration bleed into Up when people start their support request with one word in an attempt to skip the non-existent chatbot: HUMAN. It’s a learned behaviour born from bad interactions with text chatbots.</p><h4><strong>AI</strong></h4><p>Natural language processing has now advanced to the extent that something resembling a conversation is possible. That’s nifty. Chatbots might be helpful now, right? Like many things in technology, it depends on how you use it.</p><p>Bullish applications may allow the bot to execute logic, changing the shipping address on an order for example. <a href="https://arxiv.org/html/2507.13169v1">This can be risky though</a>. You are effectively handing over some control of your business logic to customers. Also, the content that these models generate is probabilistic — there is a non-zero chance that things might go haywire.</p><p>Alright, let’s not allow AI chatbots to execute any logic then. We’ll tune them to impersonate the business’ tone and provide them some context, then put them on our apps and websites. <a href="https://www.forbes.com/sites/marisagarcia/2024/02/19/what-air-canada-lost-in-remarkable-lying-ai-chatbot-case/">This can still be pretty risky though</a>. Additionally, we have now returned to the realm of regular text chat; unhelpful, frustrating, disappointing. The chatbot can’t actually help me, it can only parrot facts. What may actually make this worse than a traditional dumb text chatbot, <em>some of those facts might be hallucinated too.</em></p><p>Alright, now that we’ve cleansed ourselves of frustration. Let’s move on to understanding the why these systems are being used.</p><h3>So why do chatbots exist?</h3><p>The word ‘efficiency’ features heavily in relevant discussion; the balance between how much work can be done and how much effort it requires. In the context of customer service, we can interpret efficiency as the amount of effort required for an agent to service a customer.</p><blockquote>efficiency = customers served / effort spent</blockquote><p>Ergo, to make agents more efficient, you would need to increase the number of customers that they can service for the same amount of effort. Or, lower the amount of effort required to service a customer and you’ll serve more customers!</p><blockquote>So chatbots are the perfect solution right? Zero effort, unlimited customers right?</blockquote><blockquote>Right?…<em> 😬</em></blockquote><p>In an idyllic world, we could employ chatbots to solve customers’ problems without interacting with customer service agents at all. Zero* effort spent! So efficient! Customers get a quick solution and customer service agents are freed up to work on more complex cases. Hooray!</p><p>Now, certain laws of physics disagree with the possibility of a zero effort resolution here — there <em>is</em> an effort requirement, it’s the cost of running the chatbot. Compared to expensive humans, that cost is very low.</p><p>As a result, chatbots are extremely <em>cost</em> efficient.</p><p>If we look back at our definition of efficiency, a low effort cost only tells us half of the story. The chatbots still have to effectively serve customers. So, do they? In a way, yes. In another way… how do you define ‘serve customers’?</p><h3>Why everyone hates chatbots</h3><p>Earlier we broke down why chatbots aren’t conducive to good customer service. Frustrating, unhelpful, wastes of time — from the perspective of a customer, <em>inefficient. </em>They do however succeed in their goal, to reduce the number of customers requiring human interaction. They just do so through means that differ from the intended.</p><p>Bad chatbots introduce friction into the customer service process. Barriers that the customer must overcome before they get the help they need. To some, this friction will prove so cumbersome that they will abandon their search for help entirely. For example, someone that had been on call waiting for two hours had to hang up because they had to go and pick up their kids from school.</p><p>It gets worse too, vulnerable people will be the ones who suffer the most here. They are the ones with the lowest capacity to jump through hoops to get help.</p><blockquote><em>This is </em><strong><em>terrible</em></strong><em>.</em></blockquote><p>Unfortunately, our crude efficiency metric will indicate that the chatbot is a success regardless of the actual outcome. Either the customers’ problems are being solved automagically, or customers are bailing out because they are so sick of dealing with chatbots. In both cases, the customers have been served without reaching a human. Ruthlessly efficient customer service.</p><p>This gets to the very core of why we all hate customer service chatbots.</p><ul><li>We must engage with the chatbot on its terms</li><li>Chatbots are not empowered to solve our problem</li><li>Chatbots interdict human interaction</li><li>We have few other options but to engage with them</li></ul><p>To summarise it all in one phrase:</p><p><strong>We forfeit all agency to the machines</strong></p><p>Bloody hell, that’s grim.</p><h3>Making human-centric processes</h3><p>In a somewhat faustian manner, the high-friction-process dark pattern can be wielded to ‘solve’ the customer service efficiency problem by making it prohibitively difficult to engage with. However if we want to actually help our customers, we should understand this pattern and use it to inform designs for better processes. Ones that are human-centric, outcome-optimised instead of machine-centric, cost-optimised service.</p><p>Technology <em>can</em> provide customer service with gains in efficiency, but it’s a little harder than simply booting up a chatbot. It’s not <em>that much</em> harder though, but it is <em>very much</em> better. It feels silly having to write this but for completion’s sake, here is the blueprint — it couldn’t be simpler:</p><ul><li>Understand the customers’ problems with your products</li><li>Understand your agents’ problems servicing your customers</li><li>Find the obstacles getting in the way of both parties efficiently interacting</li><li>Start building things to remove those obstacles</li></ul><p>To summarise, get technology out of the way of people helping other people. Use technology to make those interactions easier instead.</p><p>While making tools to improve customer service at Up, I have asked myself: “What am I really achieving here?” Further thinking prompted more questions. “Am I trying to automate customer support?”, “Am I trying to abate human interaction?” The answer is (and hopefully always will be) I am optimising the process itself. Removing friction. Giving support agents everything they need to help our customers directly without introducing resistance.</p><p>If people need other people to help them (they do), we should try our hardest to make that as easy as possible.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2409bd130340" width="1" height="1" alt=""><hr><p><a href="https://engineering.ferocia.com.au/why-does-everyone-hate-chatbots-2409bd130340">Why does everyone hate chatbots?</a> was originally published in <a href="https://engineering.ferocia.com.au/">Ferocia Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The most important part of a successful software project]]></title>
            <link>https://medium.com/weareservian/the-most-important-part-of-a-successful-software-project-66ef599adb41?source=rss-5b9d774599eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/66ef599adb41</guid>
            <category><![CDATA[project-management]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[software]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Matthew Grey]]></dc:creator>
            <pubDate>Wed, 30 Jun 2021 03:05:05 GMT</pubDate>
            <atom:updated>2021-07-07T00:31:35.185Z</atom:updated>
            <content:encoded><![CDATA[<h4>Software Development Automation</h4><h3>The Most Important Tool for a Successful Software Project</h3><h4>Speeding up developers, reducing downtime, and lowering project costs with CI/CD</h4><p>Continuous integration &amp; continuous delivery (CICD) is one of the most important aspects of a modern software development project. Without the confidence that a mature, modern CICD suite provides, developers are left blindly hoping that their code holds up as they march towards production.</p><blockquote>Hope is not a strategy.</blockquote><figure><img alt="Old car production line" src="https://cdn-images-1.medium.com/max/1024/0*Z4S1umrHku1iEGzN" /><figcaption>Continuous improvement of engineering processes is not a new concept — Photo by <a href="https://unsplash.com/@birminghammuseumstrust?utm_source=medium&amp;utm_medium=referral">Birmingham Museums Trust</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In a recent project, my team was tasked with a brand new, brown-field cloud uplift project - a fresh start for an existing system. We designed a rough, high-level design, chose our development language and tooling, and planned for the first couple of iterations of the system. The project would create a number of interconnected microservices which meant that we would have many different applications to manage, and the integration between the applications would be key.</p><p>It was clear to me that CICD pipelines would be absolutely critical to the success of the project. Without regularly checking that the codebase is tested, deployable, and healthy, we would be continually adding to a mountain of tech debt, integration problems, and bugs in business logic. The development team discussed and agreed to gating the acceptance of code into the codebase. For code to be accepted, it would have to pass two requirements:</p><blockquote>1. New code must be approved by at least two people</blockquote><blockquote>2. The entire codebase must pass CI</blockquote><p>Such a strict policy may provoke eye-rolling or sarcasm relating to the policy falling by the wayside at the first sign of trouble. However, it held firm and proved to be a massive asset to the project. This is because a CICD suite was built to support this gating policy, and it was created <strong>for the developers, by the developers</strong>.</p><blockquote>These were not requirements forced upon the development team, they were ones that we imposed to keep ourselves honest and to keep our codebase healthy. Technology would be key in assisting us to comply with our own development process.</blockquote><p>It started out as merely running some tests, but evolved into a suite of pipelines that were created to resolve developer frustration - code passing tests failing to be deployed, concerns about dependency vulnerabilities, deployed microservices failing to integrate together, and so on.</p><p>CICD is all about automating away tasks from developers to make their lives easier. They don’t have to worry about their code-breaking deployment, breaking integration layers, degrading the system, etc. They can rely on a CICD system to give them confidence that their code is healthy …or improve the CICD system if it doesn’t give them such reassurance.</p><p>You can’t buy an effective CICD pipeline off the shelf, and there’s by no means a “best pipeline”, or “best CICD platform”. That being said, I’ve been using <a href="http://gitlab/">GitLab</a> a lot lately for my CICD needs and I’m a huge fan of what it can do.</p><blockquote>The best CICD pipeline is the one made by your team, to serve your team.</blockquote><p>To show you the evolution of a simple CICD pipeline - and give you some ideas to mull over - let’s take a look at how the pipeline evolved in the project I mentioned earlier. You’ll see the process of continual improvement that provided developers with more and more confidence in what they were making.</p><h4>Bare basics</h4><p>To start us off we asked the question, what must happen before code is merged into the codebase? The answer was resounding, it must pass tests. The project was in its infancy and few tests were actually written, however stating this requirement early on meant that our codebase would <strong>always</strong> pass tests.</p><p>So long as developers were writing accurate tests then we could make the assumption that any code that was accepted into the codebase had also passed the base-level of quality check provided by the unit tests, integration tests, etc. To provide the assurance that tests were being written, we relied on peer review acceptance (two people must approve a merge) and the controversial ‘code-coverage’ metric (a blog post could be written about the usage of this alone).</p><figure><img alt="Drawing of a CICD pipeline with one element — test" src="https://cdn-images-1.medium.com/max/1024/1*vgButln8JZaQ_HXy8b1U1w.png" /><figcaption>We’ve got our first iteration of the pipeline, code must pass tests</figcaption></figure><h4>Ready to go</h4><p>All code was now being tested against tests that covered the majority of the functionality. The next question was, what do we do with this code? It works, it’s tested a little bit, so what? As part of the process of choosing a coding language, tooling, etc, we decided to containerise the code using Docker so that it could be deployed (almost) anywhere. Each microservice received a Dockerfile to define the container build process and as a developer was working they could at any time test the code in a container on their local machine.</p><p>Now that the CI was live and kicking to enforcing testing, the question was asked again - “what must happen before code is merged into the codebase?”. We like to make sure that the codebase is always able to be built into a container - a great next step to add to our CI pipeline.</p><figure><img alt="Drawing of CICD pipeline with two elements — test, containerise" src="https://cdn-images-1.medium.com/max/1024/1*asK5G20yRFxv1wumN4cLuA.png" /><figcaption>Tested, wrapped up, ready to ship</figcaption></figure><h4>Live and kicking</h4><p>Now that the microservices were being routinely built into containers, deployment of those containers was the next step on the agenda. This could, and was, done manually for a short while and informal scripts were made as the team grew tired of such a repetitive task. Putting this task into the pipeline would be the beginning of us considering what should happen <strong>after</strong> new code was merged into the codebase.</p><p>Thus, a post-merge pipeline was born. If we assume that a new commit into the codebase has passed a base-level of tests and can be built into a container, let’s deploy that container!</p><figure><img alt="Drawing of CICD pipeline with three elements — test, containerise, deploy" src="https://cdn-images-1.medium.com/max/1024/1*F0gYmgZTjM_-cJo7H8ixiQ.png" /><figcaption>The codebase is being deployed regularly!</figcaption></figure><h4>Is it healthy?</h4><p>By this point, a good development cadence had been established. People were reviewing each other’s code in pull requests, code was passing unit testing and every time a change was merged into the codebase, it was deployed to a developer environment. <em>Was it healthy though?</em></p><p>Microservices were passing unit tests and even some newly introduced end-to-end tests to check that ‘expected request = expected reply’ for a given microservice. We were finding that the services, once deployed, may not be acting as expected though. They might be missing an expected environment variable, they need more resources to function, or they are dependent on a missing resource like Redis.</p><p>To alleviate the pain of realising that a microservice has been broken for the last <em>x</em> commits, we introduced a test after deployment to check the health of the service. This could be as simple as it responding with an HTTP 200 when a health-check endpoint is called, or you could go a step further and make a request then check what it replies with.</p><p>Either way, it’s a great addition to the pipeline as we will know that the deployed microservice is acting as we expect.</p><figure><img alt="Drawing of CICD pipeline with four elements — test, containerise, deploy, health check" src="https://cdn-images-1.medium.com/max/1024/1*MTXSTNOHPayqDPC1m6Fciw.png" /><figcaption>Say goodbye to deploying broken services</figcaption></figure><h4>Will it be healthy?</h4><p>The CICD pipeline tells us now if deployment of the codebase is healthy or not, which is great as we get feedback quickly instead of waiting until we try to use the deployed microservice. However, a savage loop develops when merging code into the codebase - the pull request pipeline passes all checks and is merged, then the post-merge pipeline deploys the microservice but it fails the health check. Now the developer has to find and fix the problem, open another pull request, get two people to review it, and merge hoping it will pass health-check.</p><blockquote>What if we could predict if a pull request was going to break the codebase and prevent it from happening in the first place?</blockquote><p>Why not add the deployment &amp; health-check steps to the pre-merge pipeline which gates acceptance into the codebase. That way we can be sure that the code passes all existing tests can be deployed successfully, and that the deployment is healthy.</p><figure><img alt="Drawing of CICD pipeline with four elements — test, containerise, deploy, health check" src="https://cdn-images-1.medium.com/max/1024/1*nAxjxLn90ZHbr2vHEL5X8g.png" /><figcaption>Your developers will thank you</figcaption></figure><h4>Cleaning up</h4><p>The slight problem now, with every pull request we will have a new version of the microservice deployed. We are going to have hundreds of pull requests across all of the microservices, so we are going to have hundreds of versions deployed <em>*screaming internally*</em>.</p><p>Let’s add a step to clean that up. For a pull request pipeline, we’ll deploy the microservice, check its health, and then pull it back down. Pull request deployments are short-lived so they won’t clog up the environment or cost us too much money while retaining the boost of confidence that when the code is merged then the codebase will still be healthy.</p><figure><img alt="Drawing of CICD pipeline with five elements — test, containerise, deploy, health check, pull down" src="https://cdn-images-1.medium.com/max/1024/1*WY8mX_FIAuNOiMtDopZQbw.png" /></figure><h4>Multiply</h4><p>The codebase health is reasonably consistent now, and that means that our deployments are pretty healthy too. We can explore the reusability of both the microservice and our CICD pipeline by recycling or templating our deployment code and deploying it into multiple environments. That’ll prepare us for minting stable releases and deploying them into different environments - testing, pre-production, production, user acceptance testing, etc.</p><figure><img alt="Drawing of CICD pipeline with many elements of: test, containerise, deploy, health check, pull down" src="https://cdn-images-1.medium.com/max/1024/1*9TdMlZr2MJbbiQ5TjN9Ieg.png" /><figcaption>Healthy code, happy dev</figcaption></figure><h4>Only the beginning</h4><p>There is so much you can do with a CICD pipeline beyond the regular process of test &amp; deploy, but this is a great start! You will have seen here how the CICD pipeline grew based on the desires of the developers to:</p><ol><li>Solve problems they were repeatedly encountering</li><li>Make the system as a whole more stable and deployments more consistent</li></ol><p>You could take this pipeline in so many different directions from here based on the interests of your team, your stakeholders…everyone directly involved in the project. Here are some ideas to get you started:</p><ul><li>Non-blocking security jobs to monitor application &amp; container dependency vulnerabilities</li><li>Jobs to deploy multiple microservices and test that they integrate with each other as expected</li><li>Automatically create, test, and publish release candidates every fortnight from the last known stable version of a microservice</li><li>Deploy the entire system in a temporary environment for end-to-end testing, then pulldown after testing</li><li>Automatically document the outcomes of tests in a knowledge-base</li></ul><p><strong><em>That’s all for now, thanks for reading!</em></strong></p><p><strong>Stay tuned for more </strong><a href="https://matthew-g.medium.com/"><strong>posts on CICD, Data, and the Cloud</strong></a></p><h3>About the author</h3><p><strong>Matthew Grey</strong> is a principal technology engineering consultant at Servian specialising in Google Cloud.</p><p>You can reach him on <a href="https://www.linkedin.com/in/matthew-grey/">LinkedIn</a> or check out his other posts <a href="https://matthew-g.medium.com/">here on Medium</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=66ef599adb41" width="1" height="1" alt=""><hr><p><a href="https://medium.com/weareservian/the-most-important-part-of-a-successful-software-project-66ef599adb41">The most important part of a successful software project</a> was originally published in <a href="https://medium.com/weareservian">Cognizant Servian</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Automating Document Comprehension in One Week]]></title>
            <link>https://medium.com/weareservian/automating-document-comprehension-in-one-week-22f47b3dc50d?source=rss-5b9d774599eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/22f47b3dc50d</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[writing]]></category>
            <category><![CDATA[automation]]></category>
            <dc:creator><![CDATA[Matthew Grey]]></dc:creator>
            <pubDate>Mon, 27 Apr 2020 05:20:08 GMT</pubDate>
            <atom:updated>2021-07-07T00:32:10.739Z</atom:updated>
            <content:encoded><![CDATA[<h4>Natural Language Automation</h4><h4>How to quickly and easily experiment with advanced NLP in the cloud with Google Cloud and Machine Learning</h4><figure><img alt="A library bookshelf" src="https://cdn-images-1.medium.com/max/1024/1*PpvYTXsVy9vPZSkzlZ6QcQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@alfonsmc10?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Alfons Morales</a> on <a href="https://unsplash.com/s/photos/library?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>In the past week <em>(and a few days)</em> a team and I ventured down the path of legal document analysis as part of a research project. The idea was to explore and prove an approach to analysing documents using a machine instead of a subject matter expert. This started off as a simple natural language processing (NLP) task but lead us down a path into more and more advanced text analysis. It pushed our NLP skills to the limit as we entered into the wonderful world of transformers.</p><figure><img alt="A robot figurine holding up its hand in a high-five" src="https://cdn-images-1.medium.com/max/1024/1*rNL6KYwbHpjyD05XjVvipA.jpeg" /><figcaption>Not that kind of transformer. (Photo by <a href="https://unsplash.com/@samule?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Samule Sun</a> on <a href="https://unsplash.com/s/photos/robot?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a>)</figcaption></figure><p>The problem we had to solve came down to this: reading and retaining information from long-form PDF documents is an absolute pain, can’t someone else do this for me?</p><blockquote>We endeavoured to answer this question by providing some<strong><em>thing</em></strong> to comprehend the document, instead of some<strong><em>one</em></strong>.</blockquote><p>Our targets of choice were two versions of a regulatory guideline document (published at different times) from a set of guidelines created by the Australian Securities and Investments Commission (ASIC). These PDF documents (<a href="https://asic.gov.au/regulatory-resources/find-a-document/regulatory-guides/">link</a>) are long, full of legal-ese, and require a good amount of domain knowledge to make odds and ends of them. They are designed to set guidelines for banks to follow as they go about their daily business.</p><p>If you go and have a look at these documents, you will see that they are not the most compelling read. It would be quite a task reading through hundreds of them in full, and parsing the information into actions or recommendations to a bank.</p><figure><img alt="Columns of small, complex text" src="https://cdn-images-1.medium.com/max/1024/1*xT18KPAGXNGSrPabG_WNKA.png" /><figcaption>The content of these documents is exactly what you think it is — long and wordy.</figcaption></figure><h3>So…what was our goal?</h3><p>ASIC regulatory guide documents are segmented into regulatory guidelines (we called them RGs for short). This made our job a little easier as we could use an RG as a way to segment the document into units. Once we determined this, we set out some goals.</p><p>We wanted to be able to:</p><ul><li><strong>Crawl</strong> the ASIC website for regulatory guide documents, and store them</li><li><strong>Extract</strong> all RGs from a given regulatory guide document</li><li><strong>Summarise</strong> the<strong> </strong>RGs into a format readable by non-subject-matter-experts</li><li><strong>Tag</strong> the RGs with labels according to their related products, subject matter, pieces of legislation, etc</li></ul><p>All in an automated pipeline…all in a week <em>(and a bit).</em></p><figure><img alt="Photo of the top of a sweating face with eyes looking left" src="https://cdn-images-1.medium.com/max/1024/1*Z1CQiNWzESA_qA2wfv7xoQ.jpeg" /><figcaption>We keep our goals pretty lofty around these parts. (Photo by <a href="https://unsplash.com/@hansreniers?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Hans Reniers</a> on <a href="https://unsplash.com/s/photos/sweat?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a>)</figcaption></figure><h3>Finding a document and tearing it apart</h3><p>Scraping things off the internet is a tale as old as…well the internet itself. Often scraping can be fiddly, but sometimes things line up perfectly and from the get-go we got a nice win from ASIC. They publish a listing of their documents in JSON. This made scraping for regulatory guide documents an absolute breeze - just a python script that gets this JSON list and downloads every document that’s a regulatory guide.</p><p>Once we had a document, there was a fork in the road as to how we parsed this unstructured data - a PDF full of formatting, headers, footers, and so on - into a nice, structured CSV of RGs. We could use a Document Understanding AI approach (<a href="https://cloud.google.com/solutions/document-ai">Google have a handy framework for this</a>) or we could use more traditional methods of text extraction using <a href="https://tika.apache.org/">Apache Tika</a> and good old fashioned regex. We chose the latter due to time restrictions and the fact that we had a bit of a regex whizz on the team.</p><p>After a good amount of swearing at regex patterns, we had our RG extracts:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fb98436ea4a0e619a13471cbe6150b1f/href">https://medium.com/media/fb98436ea4a0e619a13471cbe6150b1f/href</a></iframe><p>Outstanding. Now that we have structured data, we can move onto the more interesting stuff.</p><h3>BART</h3><p>The NLP world was left with its head spinning a few years ago with a breakthrough model from Google, <em>Bidirectional Encoder Representations from Transformers</em> (BERT). This began a new wave of sequence to sequence (Seq2Seq) machine learning models in the world of NLP. Old approaches broke a sentence into its component words, processing them irrespective of their placement in a sentence. The new, massive, multifunction transformer models instead process a word <em>and its context</em>, with the goal of turning one sequence of words into another (such as translating a sentence from one language to another).</p><blockquote>This heralded a new era of NLP - offering a leap forward in state-of-the-art performance on an array of natural language understanding tasks.</blockquote><p>One of these Seq2Seq models that is available open source is <a href="https://arxiv.org/pdf/1910.13461.pdf">Bidirectional and Auto-Regressive Transformers</a> (BART) which was developed by Facebook. This proved to be a fantastic model to use for text summarisation in python due to the hard work of <a href="https://huggingface.co/transformers/">HuggingFace</a>, which provides pyTorch and TensorFlow wrappers for a number transformer models. We pushed a few of our extracted RGs into a stock-standard BART large model to see what would happen without any tuning.</p><figure><img alt="A regulatory guideline specification and a machine-made summary" src="https://cdn-images-1.medium.com/max/1024/1*y0PnyFIPZLMG4ZmcscRRGA.png" /><figcaption>It worked an absolute treat.</figcaption></figure><p>When I first came across Seq2Seq transformer models I was completely blown away with their performance, and in this little project, they have continued to deliver in spades. Gone were the redundancies, examples, and boilerplate legal terms in the text. The model gave us the important parts of the RG, and even abridged some sentences as well.</p><p>Given more time, we would have loved to have created a domain-specific vocabulary for more accurate summaries, and used transfer learning to train a model to mimic the kind of results we were seeing from BART. Alas, we had to keep moving to deliver the project on time.</p><h3>Named Entity Recognition - enter Google Cloud</h3><p>We had ticked off the first three analysis requirements, now we needed to tag the RGs according to their contents. Keyword extraction methods have been around in the NLP world for yonks, like Term Frequency - Inverse Document Frequency (TF-IDF). We had used the <a href="https://cloud.google.com/natural-language">Google Cloud Natural Language API</a> in the past and found that it did a decent job of entity recognition, so we decided to use it on our summaries to tag the RG.</p><figure><img alt="A regulatory guideline specification, a summary, and entity tags" src="https://cdn-images-1.medium.com/max/1024/1*7FH1sXsLJTYakHGdY5-WCw.png" /><figcaption>Don’t you know, it just worked</figcaption></figure><p>Wonderful. Like clockwork, each summary that we fed into the API came back with a list of entities that offered a fair representation of tag we could use to label the RG.</p><p>We now had accomplished all that we set out to do in terms of natural language processing, but it was a mess of python scripts, java jars, model tars, and CSVs. We needed to bring it all together and create some automation to run all of this for us.</p><h3>Where do we put all of this?</h3><p>The three of us had worked largely in isolation on different components of this pipeline, and so now we had to try and stitch all of our scripts together to form a nice pipeline. Each component was inputting and outputting CSV files which would feed into the next step.</p><p>We considered using a VM and managing the component scripts ourselves, but this looked like a fiddly headache.</p><p>We considered an orchestration tool like Apache Airflow, but this would be overkill for such a small project (<a href="https://medium.com/weareservian/confessions-of-an-airflow-user-f2a3c4774356">shameless plug to a blog I wrote about rethinking Airflow</a>).</p><p>Cloud Build, the oft overlooked gem of Google Cloud, was the definitive answer our orchestration problems. Sure, it is designed to be a container building service, a CI service, or a CD service. What is it really doing though? Orchestrating steps in a process. I’ve used Cloud Build to run all sorts of step-based tasks; from data ingestion pipelines, to Optical Character Recognition analysis suites.</p><figure><img alt="A diagram of the 4 components that form a document comprehension pipeline" src="https://cdn-images-1.medium.com/max/1024/1*12EyHun8TjqoWRgleb3s3w.jpeg" /><figcaption>Our experimental pipelines in Cloud Build broke the document analysis into four components.</figcaption></figure><p>I really can’t sing the praises of Cloud Build enough. It’s pipelines allowed us to quickly and easily create logical flows in Google Cloud with minimal custom code. When we had to move around files in Cloud Storage, we could just use the gsutil CLI instead of writing scripts just to do simple uploads or copies in Cloud Storage. Similarly, if we were to use BigQuery to store our resultant data, we could use the bq CLI to ingest CSVs instead of having to write custom scripts.</p><p>We had to run a Java jar for a PDF parsing server (<a href="https://tika.apache.org/">Apache Tika</a>) alongside our python document parsing script. Some environments would have struggled with this mix of languages and dependencies, not Cloud Build. This wasn’t a problem at all because we simply made a Docker container that encapsulates the requirements of our environment and used that as a step inside our pipeline. You can see below how lean the entirety of the automation code for the parsing pipeline is:</p><pre>steps:<br>    <strong># Create local data directory</strong><br>    - name: &#39;gcr.io/cloud-builders/gcloud&#39;<br>      entrypoint: &quot;/bin/bash&quot;<br>      args:<br>          - &quot;-c&quot;<br>          - &quot;mkdir /workspace/data&quot;<br><br>    <strong># Pull data from GCS to local workspace</strong><br>    - name: &#39;gcr.io/cloud-builders/gcloud&#39;<br>      entrypoint: &quot;/bin/bash&quot;<br>      args:<br>          - &quot;-c&quot;<br>          - &quot;gsutil cp gs://${_BUCKET}/processing_documents/*.pdf /workspace/data&quot;<br>      <br>    <strong># Use custom image to parse PDFs into CSVs</strong><br>    - name: &#39;gcr.io/xxxxxxxxxxxxxxxxxx/pdf-parser:0.3&#39;<br>      args:<br>          - &quot;--dir=/workspace/data&quot;</pre><pre>substitutions:<br>    _BUCKET: &quot;xxxxxxxxxxxxxxxx&quot;<br>  <br><strong># Publish the parsed CSVs as artifacts of the pipeline</strong><br>artifacts:<br>    objects:<br>        location: &#39;gs://${_BUCKET}/parsed_guidelines/&#39;<br>        paths: [&#39;/workspace/data/*.csv&#39;]</pre><p>Even the colossal BART model itself was running inside of our Cloud Build pipeline on a 32 CPU virtual machine. When we had a good sized batch of parsed RGs, we could run a summarisation job that would spin up BART, feed in the RGs to be summarised, and then terminate. This was a cheap, fantastic way to repeatedly run experiments in the cloud.</p><blockquote>The flexibility of Cloud Build was really key to making this project more than a jumble of python scripts.</blockquote><h3>Job done…what now?</h3><p>In the space of about a week, we had achieved our goal of an automated PDF parsing pipeline that does a great job at extracting information and augmenting it with the latest in hot NLP tech. We’ve proven that this approach is valid but how could it be improved?</p><ul><li>Expand the sample set to support more PDFs</li><li>Explore using OCR instead of regex for PDF parsing</li><li>Tune BART to give even better summaries by using a custom vocabulary</li><li>Use transfer learning to train a model to imitate BART’s results at a fraction of the model size</li><li>Combining RGs according to tags and summarising them for more comprehensive summaries</li><li>Explore how best to surface the parsed and/or combined RGs to non-subject-matter-experts</li></ul><p><strong>That’s all for now, thanks for reading!</strong></p><h3>About the author</h3><p><strong>Matthew Grey</strong> is a principal technology engineering consultant at Servian specialising in Google Cloud. <a href="https://www.servian.com/">Servian</a> is a technology consulting company specialising in big data, analytics, AI, cybersecurity, cloud infrastructure, and application development.</p><p>You can reach me on <a href="https://www.linkedin.com/in/matthew-grey/">LinkedIn</a> or check out my other posts <a href="https://matthew-g.medium.com/">here on Medium</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22f47b3dc50d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/weareservian/automating-document-comprehension-in-one-week-22f47b3dc50d">Automating Document Comprehension in One Week</a> was originally published in <a href="https://medium.com/weareservian">Cognizant Servian</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Mentally Healthy Workplace — Part 1: The Problem]]></title>
            <link>https://matthew-g.medium.com/building-a-mentally-healthy-workplace-part-1-the-problem-c8b0008c95cf?source=rss-5b9d774599eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/c8b0008c95cf</guid>
            <category><![CDATA[personal-growth]]></category>
            <category><![CDATA[health]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[mental-health]]></category>
            <category><![CDATA[wellbeing]]></category>
            <dc:creator><![CDATA[Matthew Grey]]></dc:creator>
            <pubDate>Mon, 17 Feb 2020 01:37:18 GMT</pubDate>
            <atom:updated>2021-07-07T00:32:20.698Z</atom:updated>
            <content:encoded><![CDATA[<h4>Mental health in the workplace</h4><h3>Building a Mentally Healthy Workplace - The Problem</h3><h4>How the workplace can affect the mentality of its employees</h4><p>I’d like to talk to you about mental illness, its relationship to work, and the benefits of creating a safer, healthier workplace for everyone. This can be a sensitive topic to talk about, but it is entirely worth discussing in order to bring attention to the stigma that still lingers around mental illness.</p><p>This is the first part of a multi-part blog series about the problem mental health in workplaces. I will be discussing how we can begin to change how we work in order to improve the quality of life of everyone, and even increase businesses’ bottom line.</p><p>Let’s start by attacking the issue of mental health, head on.</p><h3>Mental health issues are the leading cause of disability and illness</h3><p>Every human being has a ‘physical health’ and a ‘mental health’, and we should be treating each with the same care and diligence. By ignoring either our mental or our physical health, we put ourselves at risk of dysfunction - be it obesity and heart disease from a lack of physical health, or depression and anxiety from a lack of mental health. In recent years there have been great initiatives to increase our physical health: eating healthier, exercising more, and so on.</p><p>I see a need for similar initiatives across mental health. Preventative measures instead of treating the symptoms. Socialising our efforts to improve our mental wellbeing instead of hiding them. Engaging in a collective effort to create a mentally stable and safe society.</p><figure><img alt="A man sitting on a couch with his head in his hands" src="https://cdn-images-1.medium.com/max/1000/0*lfLi7P6E7gvqw2JR" /><figcaption>Mental illness is so often ignored - even by the person suffering from it - and mental health upkeep is still a foreign concept to most (image from <a href="https://unsplash.com/photos/BuNWp1bL0nc">Unsplash</a>)</figcaption></figure><p>The current state of how we treat mental health just isn’t cutting it - a sprinkling of feel-good spending by governments, a persistent strong stigma against mental illness, a blind eye turned to those suffering a mental health crisis. We need to realise that the problem is here, it’s ugly, and we must work to fight it. <strong>Mental illness is widespread.</strong></p><p>Globally, an estimated 264 million people are affected by depression (<a href="https://www.who.int/news-room/fact-sheets/detail/mental-disorders">link</a>). This eclipses most common illnesses in a pinch, making it on of the greatest disablers of the general populace. It beats out common diseases like diabetes (422 million cases globally), and common infections like influenza (3 to 5 million cases globally every year).</p><p>In industries like technology, which is struggling to increase the gender diversity of their workforce, the following statistic is particularly problematic.</p><blockquote><strong>More women are affected by depression than men.</strong></blockquote><blockquote>Mental Health Disorders, World Health Organisation (<a href="https://www.who.int/news-room/fact-sheets/detail/mental-disorders">link</a>)</blockquote><p>Mood disorders such as depression are more commonplace in women than in men. People of all genders deserve a safe, understanding, and mentally healthy workplace. However, industries trying to attract more women to the workplace should be paying extra-special attention to the wellbeing of their employees.</p><figure><img alt="A table denoting the levels of mental illness across different industries" src="https://cdn-images-1.medium.com/max/1024/1*tzMP8iov0hi8fXEYzHlXpQ.png" /><figcaption>Prevalence of mental health conditions over the past 12 months by ANZSIC industry divisions — courtesy of BeyondBlue (<a href="https://www.headsup.org.au/docs/default-source/resources/beyondblue_workplaceroi_finalreport_may-2014.pdf?sfvrsn=90e47a4d_6">link</a>)</figcaption></figure><p>You can see in the table above that around a quarter of all workers suffer from an anxiety condition. The industry I work in, technology, has the third highest rate of affective conditions (such as depression, and bipolar disorder).</p><p>More people around you than you think are probably struggling right this very second. This is why it’s so important to start acting spread awareness of this problem and to start accommodating the needs of workers.</p><h3>Workplaces’ share of the problem</h3><p>Is it really the employer’s problem though? People could suffer from depression, anxiety, or other mental illnesses for many reasons!</p><p>Well…research says otherwise.</p><blockquote><strong>“There is good evidence suggesting that the psychosocial risk factors of high job demands, low job control, high effort-reward imbalance and low social support in the workplace are associated with a greater risk of developing depression and anxiety disorders.”</strong></blockquote><blockquote>Harvey S., Joyce S., Modini M., Christensen H., Bryant R., Mykletun A. &amp; Mitchell P. 2012, “Work and depression/anxiety disorders — a systematic review of reviews”, UNSW, beyondblue &amp; Black Dog Institute, Sydney (<a href="https://www.beyondblue.org.au/docs/default-source/research-project-files/bw0204.pdf?sfvrsn=4">link</a>)</blockquote><p>More than 90% of companies globally offer some form of wellness benefits to their employees. Most common among these benefits is access to a counselling service, often referred to as an Employee Assistance Program (EAP). On face-value, this looks like a good solution to help offer support to employees during difficult times.</p><p>However, a 2016 EAP industry trends report shows that only <strong>6.9%</strong> of people actually use their employer’s EAP services (<a href="http://chestnutglobalpartners.org/Portals/cgp/Publications/Chestnut-Global-Partners-EAP-Trends-Report-2016.pdf">link</a>). In fact, a quarter of people suffering from a mental illness do not seek help at all.</p><blockquote><strong>In Australia, there are estimated to be 3.9 million people with mental illness, but 1 in 4 are not ­accessing support and services for mental illness.</strong></blockquote><blockquote>Department of Health 2019, National PHN Guidance, Initial Assessment and Referral for Mental Healthcare (<a href="https://www1.health.gov.au/internet/main/publishing.nsf/content/2126B045A8DA90FDCA257F6500018260/$File/National%20MH-IAR%20Guidance-%2030Aug2019_V1.02%20Accessible.pdf">link</a>)</blockquote><p>Consider someone with a long-term physical ailment such as diabetes who is not managing their illness with a doctor. They are playing with their livelihood! We would urge them to see the doctor. That’s exactly the case for a quarter of people with mental illness, the only difference is the ailment is mental, not physical.</p><p>Clearly the easy options - a token ‘mental health awareness day’, an EAP offering, and so on - don’t work. A more holistic consideration of workplace and mental health is needed to lift the stigma of mental illness, and to prevent people from developing an illness in the first place.</p><h3>At what cost?</h3><p>Now, it’s very easy for me to say “let’s do more for the workforce’s mental wellbeing”. Ideas flow freely regarding wellness stipends, subsidised exercise programs, flexible working hours, and so on. In reality, these ideas are quickly challenged by “the cost to the employer”.</p><blockquote>Why should I pay for my employee’s hobbies?</blockquote><p>Let me show you what businesses lose by <em>not</em> investing in wellness initiatives.</p><h3>$17,000,000,000</h3><p>That’s the estimated loss to businesses due to absenteeism, presenteeism, and compensation payouts as a result of mental welfare in the workplace.</p><p>Every year.</p><p>Just in Australia.</p><p>That’s <strong>17 billion dollars</strong> with a capital ‘B’.</p><p>This was one of the findings of a recent report about mental health made by the Australian Government’s Productivity Commission (<a href="https://www.pc.gov.au/inquiries/current/mental-health/draft">link</a>). The cost to businesses is eye-watering, and surely must be addressed - if anything in the name of good business acumen.</p><p><strong>There is, however, a much more important reason to address wellbeing, and an uglier cost of mental illness.</strong></p><h3>The greatest killer of the workforce is suicide.</h3><figure><img alt="A table denoting the leading causes of death by age group" src="https://cdn-images-1.medium.com/max/801/0*mkK6DDy_F-m0kUO8" /><figcaption>The leading underlying causes of death, by age group, 2015–2017 — courtesy of the Australian Institute of Health and Welfare (<a href="https://www.aihw.gov.au/reports/life-expectancy-death/deaths-in-australia/contents/leading-causes-of-death">link</a>)</figcaption></figure><p>Many will know that coronary heart disease is the #1 leading cause of death in the population, but the above table shocked me in my research for this article. Our young, ambitious, impassioned population is dying by their own hand.</p><p>The question of ‘<em>why</em>’ immediately came to mind.</p><figure><img alt="A table denoting the leading causes of suicide" src="https://cdn-images-1.medium.com/max/790/1*F0AlxfuJWrZyEMv8sGawfw.png" /><figcaption>The top four causes of suicide between ages 15–44, as a proportion of total suicides for 2017 — courtesy of the Australian Bureau of Statistics (<a href="https://www.abs.gov.au/ausstats/abs@.nsf/Lookup/by%20Subject/3303.0~2017~Main%20Features~Intentional%20self-harm,%20key%20characteristics~3">link</a>)</figcaption></figure><p>Three of the top four causes for suicide are related to a lapse of mental health, leading the individual to seek to end their life.</p><p>All of the above evidence points towards the stresses of our society, among those being <strong>high job demands, low job control, high effort-reward imbalance and low social support</strong>, causing not only an increase in mental illness among workers. It’s actively killing them.</p><blockquote>The evidence paints a clear story - we face a mental health crisis in our workforce.</blockquote><h3>The solution</h3><p>We can affect change in our workplaces to make them more inclusive, fairer, more understanding, and healthier places to work. Together, we can bring mental health awareness to the forefront of our minds, and start to help those around us who need support.</p><p>What’s more, if employees have a healthy mental wellbeing, they feel valued and cherish their leaders’ efforts to make their busy work lives just that little bit more pleasant. Valued employees that have agency over their lives will by-and-large stick around for longer. Happy, healthy employees take less sick days, and are more productive.</p><p>Businesses stand to benefit in many, many ways - even beyond talent retention! More on that in part 2 of this blog series which will cover:</p><ul><li>Actions to begin the process of improving workplace mental health</li><li>Benefits of wellness initiatives, both for the employee <strong><em>and </em></strong>employer</li><li>Return on investment for financing wellness initiatives</li><li>Critical success factors for creating a mentally healthy workplace</li></ul><h3>About the author</h3><p><strong>Matthew Grey</strong> is a principal technology engineering consultant at Servian specialising in Google Cloud. <a href="https://www.servian.com/">Servian</a> is a technology consulting company specialising in big data, analytics, AI, cybersecurity, cloud infrastructure, and application development.</p><p>You can reach me on <a href="https://www.linkedin.com/in/matthew-grey/">LinkedIn</a> or check out my other posts <a href="https://matthew-g.medium.com/">here on Medium</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c8b0008c95cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Confessions of an Airflow User]]></title>
            <link>https://medium.com/weareservian/confessions-of-an-airflow-user-f2a3c4774356?source=rss-5b9d774599eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/f2a3c4774356</guid>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[airflow]]></category>
            <dc:creator><![CDATA[Matthew Grey]]></dc:creator>
            <pubDate>Thu, 09 Jan 2020 23:02:19 GMT</pubDate>
            <atom:updated>2021-07-07T00:32:30.580Z</atom:updated>
            <content:encoded><![CDATA[<h4>The Secrets of Orchestration in the Cloud</h4><h4>Mistakes made and lessons learnt in a year of using Airflow</h4><figure><img alt="A sign reading, “Next in line for Confession”" src="https://cdn-images-1.medium.com/max/1024/1*wa-AEb2iluCYXoaLh17aJw.jpeg" /><figcaption>The church of Airflow forgives all transgressions (picture from <a href="https://unsplash.com/photos/UHXQXcQqSoM">Unsplash</a>)</figcaption></figure><p><a href="https://airflow.apache.org/">Airflow</a>, Airflow, Airflow… how I love and hate thee. The siren calls of scale and flexibility tempt me, even as I have been scalded by my trust in you. As Airflow projects of the future loom, I am reminded constantly of the past. I hear the bellows of my projects booming in the wind. They call to me. Bound in irons. Doomed for eternity. They clasp and beg at me, asking:</p><blockquote><em>“Why did you think a dynamic mega-DAG was a good idea?”</em></blockquote><p>I dismiss them as the nags of the past. I cannot give them the attention that they demand. I must focus on the future.</p><p>Endeavours with Airflow require patience, research, wisdom. I read blog posts warning of anti-patterns and thought I knew better. So I dismissed them.</p><p>I was a man of technology! I understood the risks of wielding my tools! The lessons of the blogs mattered naught. They fell on deaf ears.</p><p>And so I began my work.</p><p>From the beginning it was clear that Airflow was a strange beast. I created <a href="https://airflow.apache.org/docs/stable/concepts.html">DAGS, operators, plugins</a>, and began to consider myself an intermediate user. However I was just digging myself deeper and deeper into my Airflow hole.</p><p>My only way forward was to learn from my mistakes. Rethink Airflow. Share my findings.</p><p>In writing this blog post, my mind is returned to the Airflow projects that I have contributed to, sometimes even lead. I stare into a maelstrom of mistakes that I have made — all so obvious in retrospect. I am one of the unfortunate many that has battled and lost with Airflow.</p><p>I have committed many sins against data engineering. It is through an introspection of these misgivings, that I may share my knowledge with you. I do this with the hopes of preventing future crimes against Airflow. So! Cast off your false assumptions of Airflow, for it is here and now that we shall discover how to avoid falling victim to its many pitfalls.</p><h3><strong>Sins of the past</strong></h3><p>Complexity is where most of my Airflow transgressions began. By increasing the complexity of the Airflow instance, more could go wrong. When things did go wrong, they were harder to fix as I wasn’t fixing just my code, I was fixing my code <em>in Airflow</em>. There comes no greater relief than that which is achieved through moving from a complex Airflow environment, to a lean Airflow environment.</p><figure><img alt="A circuit board" src="https://cdn-images-1.medium.com/max/1024/0*ycObx6p9W5_nTZCu" /><figcaption>Complexity is bad. Debugging complex systems is worse.</figcaption></figure><h4><strong>ETL logic embedded in custom operators</strong></h4><p>Embedding <a href="https://en.wikipedia.org/wiki/Extract,_transform,_load">ETL</a> logic in Airflow is something which I’ve seen too many times. Airflow supports custom python operators, allowing you to embed any kind of logic you choose into your Airflow DAGs. So why not empower Airflow with ETL logic, taking it from simple orchestrator of tasks to fully fledged data ingestion pipeline? Well, most of the time, this is asking for trouble.</p><p>What happens when the logic exceeds the resources that are intended and allocated for it?</p><p>How do you test your logic? Must you engage Airflow to simply test some Python code?</p><p>The additional complexity of ELT logic inside of Airflow will lead you down the path of frustration when it comes to ensuring that the logic behaves as expected, is performant is terms of execution time, is testable, and so on.</p><h4><strong>Dynamic DAGs are cool, dynamic DAGs are a huge pain</strong></h4><p>It is almost a natural behaviour of those standing up Airflow and managing DAGs to try to make complex DAGs. Chief among these over-complexities is the dynamic DAG. This is often one DAG to rule all DAGs. One DAG that is influenced and directed by a metadata store outside of Airflow.</p><p>The dynamic mega-DAG.</p><p>This may seem like a great idea on its surface, you only have to write one DAG, which will do different things based on what the data dictates in the external metadata store.</p><blockquote>Only one DAG! That’ll be a dream to maintain!</blockquote><p>Unfortunately, the battle has already been lost. When something goes wrong with one of the jobs that is run through this pipeline, it is a living nightmare to debug it. A great amount of digging through logs is required in addition to endless navigation of the Airflow UI. The Airflow UI is not designed for this kind of behaviour.</p><p>Airflow’s UI provides pagination of DAGs. It provides the ability to search for DAGs by name. The UI is guiding you towards more DAGs, not less — definitely not one dynamic DAG to run all jobs.</p><figure><img alt="A container ship" src="https://cdn-images-1.medium.com/max/1024/0*mffocCONOkjy9_J5" /><figcaption>Airflow should be a fleet of small ships delivering packages, not one massive cargo ship.</figcaption></figure><h4><strong>Kubernetes is a great idea!</strong></h4><p><a href="https://kubernetes.io/">Kubernetes</a> has had an influential effect on the global technology scene, and Airflow has been very much swept up in it. Indeed, <a href="https://cloud.google.com/composer/docs/concepts/overview">Google Cloud’s Airflow-as-a-Service offering</a> is in fact Airflow running on a GKE cluster (together with a smattering of other services). The main problem with running Airflow on Kubernetes is a result of using Airflow in a non-Kubernetes way.</p><p>Airflow has excellent support for Kubernetes by using their Kubernetes Executor (something that I recommend you look at if you are running Airflow on Kubernetes). However, using Airflow on Kubernetes with a non-Kubernetes Executor is a bit of a waste unfortunately. You gain all of the overhead of a Kubernetes cluster (together with the pain of managing, administering, governing, and securing it) with none of the benefits.</p><h4><strong>Why won’t my plugins refresh?!</strong></h4><p>The process of refreshing plugin code is also a pain. Through a lot of trial and error, I have found that it takes restarting the scheduler and the webserver(s) in a certain order to properly replace the plugin code for a given Airflow instance. The errors given from Airflow often paint a very unclear picture of what is happening as a result of missing or erroneous code.</p><p>These reasons provide yet more ammunition for the idea of removing as much custom logic from Airflow as possible. If you can’t reliably update the plugin code, the error reporting isn’t great, and it’s annoying to test…why bother?</p><p>Keep Airflow lean, its complexity low, and its DAGs and operators deterministic.</p><figure><img alt="A woman holding her head in her hands" src="https://cdn-images-1.medium.com/max/1024/0*2JgaFtBpgtiLSdO6" /><figcaption>Bugs popping up in weird places because you changed plugin code? Welcome to Airflow!</figcaption></figure><h3><strong>The pathway to healing</strong></h3><p>Having reformed my usage of Airflow in recent days, let me offer some sage advice. The suggestions here will, again, lean heavily into the idea of lowering the complexity of the Airflow instance wherever possible. The more understandable and deterministic your systems are, the better you will sleep.</p><h4><strong>Anti-patterns are real — constantly ask yourself if you are falling into their hands</strong></h4><p>There are plenty of warnings of Airflow’s anti-patterns floating around in blog posts and documentation. Heed these warnings, do not ignore them, do not think of yourself as above such worries. I have been victim to slowly slipping into overly dynamic DAGs in the past, as I did not stop to consider ‘is this an anti-pattern?’ when making changes to my Airflow code.</p><p>Talk to someone who has used Airflow heavily, and if possible share your instance’s details. They will most of the time have some pearls of wisdom for you — and maybe a few war stories too.</p><figure><img alt="A stop sign" src="https://cdn-images-1.medium.com/max/1024/0*kPvg5eYVo4aWMSWv" /><figcaption>Stop, take a breath and ask yourself: “Is this an anti-pattern?”. You’d be surprised how easily you can fall into anti-pattern traps.</figcaption></figure><h4><strong>Study Airflow well, its strengths, and its weaknesses. Only then can you defeat it</strong></h4><p>Airflow can be a particular beast. As I see it there may in fact be more anti-patterns in Airflow than patterns. When you can understand how it was intended to be used, you can use Airflow’s strengths to make a great orchestration system.</p><p>Abuse Airflow and you will be in a world of hurt.</p><h4><strong>ETL logic goes in scripts, call the scripts from Airflow</strong></h4><p>I’ve recounted above why ETL logic can really bog down Airflow, make it hard to test, unstable — a plain old bad place to be. The solution to this is to place your ETL logic somewhere outside of Airflow. Airflow itself offers solutions to this believe it or not. For Airflow running on a VM, there’s BashOperator and DockerOperator. Both of these allow you to write and execute code in such a way that you can properly test the ETL code in isolation, away from Airflow. This is a <strong>huge</strong> benefit to you as an Airflow developer. Most of the time I would prefer Docker over Bash as you have more control over the execution environment, rather than running Bash locally.</p><p>If you are running Airflow on Kubernetes, then you also have an Airflow-native solution to removing custom code from Airflow — the <a href="https://airflow.apache.org/docs/stable/kubernetes.html">KubernetesPodOperator</a>.</p><p>The KubernetesPodOperator is an absolute shining gem. When it comes to removing custom logic from Airflow, <em>Dockerising</em> that logic and triggering it from Airflow is a great idea. To apply this to a Kubernetes world, you would spin out this docker-contained step into a pod, so that it is completely separate from the Airflow environment, maybe even running on a different machine!</p><h4><strong>Make friends with your airflow configuration</strong></h4><p>Good lord you can achieve a lot if you know what the Airflow configuration can do. It’s an absolute mammoth of a file, and can be quite daunting to those just learning about Airflow. I urge you to experiment with the configuration — at least in a safe place where you don’t mind blowing away the Airflow instance. I have a startling example of how important the Airflow configuration is to the behaviour of Airflow’s jobs. An Airflow-on-Kubernetes cluster that I was managing was executing a given DAG to completion in 30 minutes. I noticed that each task was taking a tiny amount of time to complete, but there was a large amount of time that the DAG waited for the next task to be scheduled. Given enough fiddling with the configuration, the DAG was performing much better — it went from a 30 minute execution to just under 5.</p><p>Such a performance gain was achieved purely through tweaks to the Airflow configuration file. Consider that you may be able to speed up your jobs, improve stability, and even increase your resource utilisation just through experimenting with your Airflow configuration for a day or two. It’s always worth a try.</p><figure><img alt="Green symbols running down a black background" src="https://cdn-images-1.medium.com/max/1024/0*-zqys8ZWVch6i8dr" /><figcaption>Decoding what the Airflow configuration variables do can be frustrating, but it is 100% worth the effort.</figcaption></figure><h3>Keep learning</h3><p>I’d like to leave you, having confessed my sins and made reparations, with some further reading material that has helped me in my time with Airflow:</p><p>An excellent article broaching the topic of using container-based logic instead of embedded logic:</p><p><a href="https://medium.com/bluecore-engineering/were-all-using-airflow-wrong-and-how-to-fix-it-a56f14cb0753">https://medium.com/bluecore-engineering/were-all-using-airflow-wrong-and-how-to-fix-it-a56f14cb0753</a></p><p>A post from Kubernetes itself about using Airflow on Kubernetes:</p><p><a href="https://kubernetes.io/blog/2018/06/28/airflow-on-kubernetes-part-1-a-different-kind-of-operator/">https://kubernetes.io/blog/2018/06/28/airflow-on-kubernetes-part-1-a-different-kind-of-operator/</a></p><p>A guide to scaling out Airflow (though it is an Astronomer-specific guide, it still has some great tips for all Airflow developers):</p><p><a href="https://www.astronomer.io/guides/airflow-scaling-workers/">https://www.astronomer.io/guides/airflow-scaling-workers/</a></p><p>An open (at the time of writing) issue with Airflow regarding their poorly named configuration variables — this is why I urge experimentation to properly understand the configuration:</p><p><a href="https://issues.apache.org/jira/browse/AIRFLOW-57">https://issues.apache.org/jira/browse/AIRFLOW-57</a></p><p><strong>Now it’s up to you. Give Airflow hell!</strong></p><h3>About the author</h3><p><strong>Matthew Grey</strong> is a principal technology engineering consultant at Servian specialising in Google Cloud. <a href="https://www.servian.com/">Servian</a> is a technology consulting company specialising in big data, analytics, AI, cybersecurity, cloud infrastructure, and application development.</p><p>You can reach me on <a href="https://www.linkedin.com/in/matthew-grey/">LinkedIn</a> or check out my other posts <a href="https://matthew-g.medium.com/">here on Medium</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f2a3c4774356" width="1" height="1" alt=""><hr><p><a href="https://medium.com/weareservian/confessions-of-an-airflow-user-f2a3c4774356">Confessions of an Airflow User</a> was originally published in <a href="https://medium.com/weareservian">Cognizant Servian</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Site Reliability Engineering]]></title>
            <link>https://medium.com/weareservian/site-reliability-engineering-8505e3daa069?source=rss-5b9d774599eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/8505e3daa069</guid>
            <category><![CDATA[reliability-engineering]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[google]]></category>
            <dc:creator><![CDATA[Matthew Grey]]></dc:creator>
            <pubDate>Mon, 07 Jan 2019 05:00:38 GMT</pubDate>
            <atom:updated>2021-07-07T00:32:45.479Z</atom:updated>
            <content:encoded><![CDATA[<h4>A better approach to devops</h4><h4>Google’s answer to reliability</h4><figure><img alt="Tools hung on a wall" src="https://cdn-images-1.medium.com/max/1024/1*t40_MeHpD55L892RmAGa_g.jpeg" /></figure><p>In late 2018, I took part in a workshop run by Google to teach their solution to reliability in large, distributed systems — Site Reliability Engineering. This structure provided a different perspective on how a product should be planned, developed, and operated. Through defining clear internal benchmarks for reliability (SLOs), a product’s performance can be tracked (SLIs) and problems can be intercepted before an outage occurs. Their vision went further than performance metrics though. Google would have the traditional project team structure completely revolutionised with greater transparency and communication between the product, development, and operations teams. I left the workshop a firm believer in this organisational structure, with a desire to implement what I learned in my own team.</p><h3>SLOs vs SLAs</h3><p>Consider a service level agreement (SLA). This provides the minimum acceptable operation as part of a contract with the customer. It will define the minimum agreed behaviour for a system; transfer speed, availability, latency, and so on. If the system responds slower than x milliseconds, then the contract is breached and the customer will be compensated. A service level objective (SLO) is the minimum operation they the customer is happy with. An SLA may state that the system responds within 1 second, but if the customer is frustrated by waiting more than 300ms, then an SLO should be defined for delivering requests within 300ms as this is the minimum time that the customer will be happy with. To give some leeway to the SLO (so that we don’t alert people for a single response later than 300ms), we assign a target percentage to the SLO; such that x% of the total requests respond in 300ms, averaged over y minutes.</p><figure><img alt="Balloons with happy faces on them" src="https://cdn-images-1.medium.com/max/1024/1*SkO-DxEbysE6nlyBPDusiQ.jpeg" /><figcaption>If the happiness of the customer is key, then you only need to develop to meet their expectations, not exceed them — this will in turn keep them happy without over-engineering the product.</figcaption></figure><p>How high a percentage is up for discussion between the three parties that form up the project: the product team, the development team, and the SRE team (service reliability engineering, traditionally the ‘operations’ team). This open discussion should serve to create a realistic SLO definition instead of one team controlling the conversation and delivering a useless SLO. To complete the definition of an SLO, we state where the metric is to be measured. For our latency example, we could measure the latency of the system at the load balancer so that we are measuring the latency of our entire system as it deals with the request.</p><h3>SLIs and the error budget</h3><p>SLOs and SLAs both rely upon measurements of the system. What is measured is key to a good SLO. If reliability is of high importance, how would you measure reliability? If you measure the number of responses served, what would happen in periods of low activity? If you hit a health check URL to make sure the service is available, what happens if only part of the system is down or the entire system is operational but degraded? Care must be taken to be as specific as possible in what is being measured, something that should be directly linked to impacting the customer’s happiness.</p><p>For an availability SLO, you could use the percentage of total requests in a given time window that were returned with a response code in a range excluding 400 or 500 (indicating either a bad user request, or a server fault — what we are trying to measure). This should handle periods of inactivity, bad user requests, and it can be scaled to incorporate the entire system (all user requests) or only a certain part of the system (tracking only certain API calls).</p><figure><img alt="A stop sign" src="https://cdn-images-1.medium.com/max/1024/1*a8ov-2TV06NtVZUY2jD_jg.jpeg" /><figcaption>Major breaches to an SLO means that the customer will be unhappy with the product, and this should trigger consequences for developers. Consequences — such as having to review deployment builds with their SRE until the SLO is met and stable — incentivise developers to maintain reliability of a product.</figcaption></figure><p>What happens when an SLO is breached? In comes the error budget. The error budget is a store of time that describes the allowed time that a system may be in breach of an SLO. It is measured in minutes and computed as the period of downtime permitted by an SLO (one minus the SLO’s threshold value). Take the following SLO as an example:</p><p><em>99.9% of the total number of requests for the service must return a 200 or 300 HTTP code, aggregated over a 2 minute period, as measured at the service’s load balancer.</em></p><p>Given that the service is to be reliable 99% of the time, then the error budget would be equal to 100% — 99%, or 1%. The error budget will be set for a given period, commonly a 28 day rolling window. This means that every day, the error budget recovers 1/28 of the total error budget.</p><figure><img alt="A diagram demonstrating an error budget" src="https://cdn-images-1.medium.com/max/785/1*sHrxeiS-7MZgU1_ydAGCSQ.jpeg" /><figcaption>An example of an error budget being exhausted and recovering once the reliability has been stabilised</figcaption></figure><p>In this 28 day period and an error budget of 1% of the total period, then the error budget for 28 days will be around 40 minutes. If the service breaches the error budget, then the system is in a very unreliable state, so clearly something is wrong that needs to be rectified. As a consequence, the development team is limited in their operations such that they can only deploy solutions to the reliability problems. This is enforced at Google by automatically disabling automatic deployment from CI/CD — all deployment happens manually by an SRE once the deployment has been approved as a reliability solution. These consequences serve two purposes: to incentivise developers to maintain the reliability for the system — they don’t want to have to get every build approved by someone else — and to ensure that reliability is continuously improved and maintained.</p><h3>SREs</h3><p>What’s very interesting about the SRE structure is how the operations team is structured. Instead of having a team whose duty it is to keep production systems going, Google have embedded site reliability engineers (SRE) directly into development teams. The SREs will design and ultimately control the automated deployment pipeline for the product as well as create the production, development, and testing environments. The SREs exist as a separate branch to the business, and as such do not answer to product owner or development team. Instead they will have their own, SRE-specific chain of command. This is very important as the development team and product owner are both motivated to push out features, often relegating reliability changes to the ‘nice to have’ backlog.</p><figure><img alt="Rusty tools on a shelf" src="https://cdn-images-1.medium.com/max/1024/1*g3L9F6AO-jUW-QuQRFI3JA.jpeg" /><figcaption>SREs are there to enable the rapid development of reliable products. They spend their time creating and maintaining the production environment for a product, creating tools for developers, and enforcing reliability goals.</figcaption></figure><p>When a product’s error budget had been exhausted and development want to release a new build, they interface with their SRE. The SRE is then tasked with inspecting the code and making sure that the build fixes the reliability issue and nothing else. Development have exhausted their error budget, so they must face the consequence of this — a slow deployment process and questions from the SRE.</p><h3>My opinion — pros</h3><p>In the traditional development company organisation, power flows down from the product team. Developers accept requirements and build features. Operations support the features with funding acquired from the product team. This has some major downfalls as the product team may not necessarily understand the technical feasibility of the product they are defining. Also, the system is built and features are continually added by the development team, but it is up to the operations team to quote operational costs and fight for funding from the product team. This structure will lend itself to an operations team on a thin budget, leading to cut corners (outages).</p><figure><img alt="A triangle denoting the responsibilities of a development team" src="https://cdn-images-1.medium.com/max/675/1*Sbw800YbNV9k70ouoWiImg.jpeg" /><figcaption>In the classic structure of product teams, power flows from the top down. The SRE structure distributes that power more evenly.</figcaption></figure><p>This structure differs to an SRE organised structure quite dramatically. In the SRE structure, all three teams come together to define requirements, which means that the operations team can join the discussion over feature reliability requirements. The development team is ultimately responsible for the reliability of the system, as the operations team (or SREs) will develop the production environment to the specifications agreed upon by all three parties. Additionally, funding may be negotiated at an earlier point in the product life-cycle; a product that requires 99.99% availability will cost ten times more than one with 99.9% availability, thus if this level of availability is not needed then the cost of the system can be reduced. This open discussion and agreement between the three teams leads to greater clarity in what the end product should look like, more accurate plans, and less wastage.</p><h3>My opinion — cons</h3><p>There are however some drawbacks for this organisational structure. It takes full commitment from all parties for the system to work:</p><p>Product must give up some of their power over system requirements as this will now be decided in tandem with reliability through negotiation with development and SREs.</p><p>Development, who are feature driven, must relinquish their power to deploy code. SREs hold the keys to the car now, developers can deploy code as please until the error budget is exhausted. An exhausted error budget indicates an unreliable system, so now developers are forced to convince their SRE that their code push will improve reliability.</p><figure><img alt="A bird chirping at another bird" src="https://cdn-images-1.medium.com/max/1024/1*ElZRfVOxRSdETK9Hs-sKPw.jpeg" /><figcaption>Developers will not be happy when they have to have every build reviewed by an SRE.</figcaption></figure><p>SREs must be able to stand their ground against the pressures of product, who want features, and developers, who want to release features. If an SRE relents and allows a feature to be released in spite of reliability issues, then all of the effort spent in defining SLOs, SLIs, etc is for naught.</p><p>The investment in the SRE system does not stop here, it must follow the managerial structure all the way to the CEO. If conflict breaks out between an SRE and the development team (it will) and the issue is escalated, then product management must have an SRE management counterpart that they must contend with. If product management escalates to a product executive, then they must have to content with an SRE executive.</p><p>Again, if a feature is blocked by the error budget and a product owner, product manager, or a product executive overrides the SREs then the SRE system is useless beyond providing a pretty dashboard.</p><figure><img alt="A hand moving a chess piece on a chess board" src="https://cdn-images-1.medium.com/max/1024/1*rhn9yU-kv1uKOBSbeK1Y0Q.jpeg" /><figcaption>The SRE structure implementation in a company is tested every time a developer or product owner escalates a build blocked by an SRE. The SRE’s decision must be backed up by the SRE chain of command so that it is not immediately overridden my a product owner who is pushing for features.</figcaption></figure><p>This shift in power is a significant change from the traditional structure of product development — product give requirements to development who give systems to ops to run. It is my opinion that this could be too large an ask for most companies who are being dragged, kicking and screaming, into agile work practices. Though negotiating SLOs may be difficult and take a long time, the cultural change required to adopt the SRE system is easily the biggest challenge that I foresee.</p><h3>Difficulty of defining SLO and SLI for a system</h3><p>We found great difficulty in the workshop when trying to define SLOs and SLIs for our own products. The process devolved into a series of negotiations and searches for clarification. It really went to show how without very clear definitions, arguments will break out. Sure enough, these definitions will be challenged when a fault happens, and arguments will break out as to: the severity of the outage, the root cause, even arguments as to if the product is broken at all! It was suggested that a great amount of time was allocated to declaring SLOs and SLIs for a product — several days in fact. This gives the process enough time to properly define the SLOs and SLIs, reducing the need for such arguments later. SLOs should be reviewed every six months to a year as the product will change and the customer’s expectations will also change. This may seem like a daunting amount of work to do, but in my eyes the benefits are really worth it.</p><h3>Conclusion</h3><p>The SRE environment described at a recent workshop held by Google serves to solve many of the problems inherent in the traditional cultural structure of product development. It aims to increase transparency of the reliability expectations placed on a product through a shift in how a product is planned, and how it is operated. Unfortunately, the SRE structure does require a complete cultural shift of the product, development, and operations teams — including changes to who holds the power in a project. This challenge will prove overwhelming to many organisations, but those that manage to overcome it will be soundly rewarded with more reliable systems, better disaster recovery, more robust products, and less budget wastage.</p><h3>Key takeaways:</h3><ul><li>Service level objectives (SLO) bring together product, development, and operations to agree on a realistic goal for the reliability of a system.</li><li>Service level indicators (SLI) track a specific performance metric in order to measure the state of a system against an SLO.</li><li>Site reliability engineers (SREs) handle the deployment and operation of a product, but also hold the keys to the system — developers must answer to them when a system is failing.</li><li>Error budgets track the reliability of a system in a rolling window — every minute of degraded performance eats into the budget.</li><li>SRE system makes developers culpable for reliability — development halts if an error budget runs dry.</li><li>SRE system ties reliability expectations to reality — product owners cannot demand 100% reliability.</li></ul><h3>About the author</h3><p><strong>Matthew Grey</strong> is a principal technology engineering consultant at Servian specialising in Google Cloud. <a href="https://www.servian.com/">Servian</a> is a technology consulting company specialising in big data, analytics, AI, cybersecurity, cloud infrastructure, and application development.</p><p>You can reach me on <a href="https://www.linkedin.com/in/matthew-grey/">LinkedIn</a> or check out my other posts <a href="https://matthew-g.medium.com/">here on Medium</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8505e3daa069" width="1" height="1" alt=""><hr><p><a href="https://medium.com/weareservian/site-reliability-engineering-8505e3daa069">Site Reliability Engineering</a> was originally published in <a href="https://medium.com/weareservian">Cognizant Servian</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>