<?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 Tom Keeber on Medium]]></title>
        <description><![CDATA[Stories by Tom Keeber on Medium]]></description>
        <link>https://medium.com/@TomKeeber?source=rss-2e70a7833675------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*pNXqtGFSfbof2xXATsOr1g.jpeg</url>
            <title>Stories by Tom Keeber on Medium</title>
            <link>https://medium.com/@TomKeeber?source=rss-2e70a7833675------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 02:17:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@TomKeeber/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[Dunelm Engineering Principles]]></title>
            <link>https://engineering.dunelm.com/dunelm-engineering-principles-abe8efc9be91?source=rss-2e70a7833675------2</link>
            <guid isPermaLink="false">https://medium.com/p/abe8efc9be91</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[principles]]></category>
            <category><![CDATA[guardrail]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[standards]]></category>
            <dc:creator><![CDATA[Tom Keeber]]></dc:creator>
            <pubDate>Wed, 14 Jun 2023 06:42:18 GMT</pubDate>
            <atom:updated>2023-06-14T06:42:18.165Z</atom:updated>
            <content:encoded><![CDATA[<p>At Dunelm we have refreshed our Engineering principles to drive where we want to go technically and reflect on the journey we’ve been on over the past few years.</p><p>As explained <a href="https://www.jjude.com/principles-trumps/">here</a> principals trump processes and <strong>determine whether you thrive or fade away</strong>.</p><p>Here are our new Engineering Principles to help guide our Engineers when designing and implementing our systems. Some of these principles we have been doing for years in most areas, others will push us to make different or harder decisions about our technology.</p><p>We’ve broken our principles down into 2 groups. The first is <strong>Technical Excellence. </strong>The principals in this section focus on the fundamental beliefs of our technology.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/546/1*2n63-ZNOcSSGkIEw45CBBw.png" /></figure><h3>Everything as code</h3><p><em>Enable automation, consistency, and traceability throughout our development​</em></p><p>This principle emphasises the use of code to automate, manage, and deploy all aspects of our development process. By treating infrastructure, configuration, and processes as code, we can achieve greater automation, consistency, and traceability, which helps us to deliver high-quality software more efficiently.</p><p>Here are some examples;</p><ul><li>No use the AWS console for resource changes — this has to go via our Infrastructure and code and our pipelines</li><li>Constantly challenge 3rd parties to provide IaC capabilities.</li></ul><h3>Think asynchronously​</h3><p><em>Enable non-blocking, concurrent processing and improve scalability, responsiveness, and fault-tolerance​.</em></p><p>Always look to utilise asynchronously technologies as a first point of call for solving problems. So problems will naturally fit into asynchronously techniques much easier than others. But always be <strong><em>thinking</em></strong> about if the advantages of asynchronously code/architecture/systems can help.</p><p>Make sure you assess the value — including the added complexity of asynchronously systems — to any decision you make.</p><h3>Performant, Secure, and Testable</h3><p><em>Fast, protected against threats and good quality — basic expectations from our customers. ​</em></p><p>Ok, so this is kind of 3 principles in one — but we think these are the base level requirements that our customer expect from us.</p><p>By being <strong>performant</strong> we make sure that our systems do not frustrate our customers. We make sure we’re constantly thinking about systems which perform at scale.</p><p><strong>Secure </strong>is just mandatory — our customers trust us with there data, we need to make sure that trust is respected. That means building systems that do not leave themselves open for attack, it means protecting and securing our customer data and it means making sure we are always aware of the OWASP threats.</p><p>And final, but certainly not least — the code we write and the systems we create should be tested using automation.</p><h3>Build for people, not compilers</h3><p><em>You read code 10 times for every change. We value readability of our code over complexity. ​</em></p><p>When you write code, think about the person who will read it next. Write code that is easy to understand, with clear naming conventions and logical organisation. Avoid overly complex solutions that may be difficult for others to understand. So think twice about the 3 times nested reduce function.</p><h3>Simplify complex systems</h3><p><em>Look to abstract or hide complexity behind APIs or libraries​.</em></p><p>By breaking down complex systems into smaller, more manageable parts, developers can make the overall system easier to understand and work with.</p><p>Keep it Simple Stupid.</p><h3>Architecture Principles</h3><p>Here at Dunelm our Engineering teams own our physical architecture and make vital decisions on how our systems work. Our Engineering Architecture principles act as a guild when we are designing and building our systems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/541/1*pi26r-XriZPUn6wvQcYYCg.png" /></figure><h3>Design for extensibility</h3><p><em>We work in a changing industry — our architecture should be able to evolve with business requirements.​</em></p><p>Naturally things change over time. It would be boring things didn’t. How your architecture can adapt to changes over time is vital to provide flexibility we change and the problem domain evolves.</p><p>Does your architecture have natural extension points?</p><p>Pro Tip: When designing an architecture throw some “What if” scenerios to stress test your extensibility.</p><h3>Create Loosely Coupled Systems</h3><p><em>Hide implementation details, take time and effort to defined APIs and contracts to be used as integration mechanisms. ​</em></p><p>There are some problem domains that are solved when systems are tightly coupled — for example performance or other non-functional reasons.</p><p>But at Dunelm we believe that we should start with a loosely coupled system and then understand if we need more cohesion depending on the problem. This ties into our want and need to have an extensible architecture — loosely coupled systems are naturally more extensible.</p><h3>Services for breath, Libraries for Depth</h3><p><em>Promote modularity, reuse and maintainability. Smaller specialised libraries. Larger distributed services.​</em></p><p>Services for breadth, Libraries for depth” is a fancy way of saying we should build things in small pieces that can be used in many different places (services) and create specialised building blocks for use within those pieces (libraries).</p><p>We want our code to be modular, easy to understand, and easy to reuse. This approach can help us build software that’s more maintainable and scalable, and can save us time and effort in the long run. But it’s not a magic bullet — it requires thoughtful design and can be more complex to implement than just writing a monolithic application.</p><h3>Serverless By Default</h3><p><em>Look to leverage the powerful and flexibility of serverless technology. ​</em></p><p>Dunelm has had a huge amount of success with Serverless technologies. they have allowed us to implement at large amount of the principles outlined here.</p><p>We believe we should continue on our serverless journey and make sure we’re utilising all the different technologies and products that move us to meet our goals.</p><p>This doesn’t not mean EVERYTHING should be serverless. But if its not — lets talk about that different problem that is being solved that does not fit into some of our currently used technologies.</p><h3>Design for failure</h3><p><em>Design systems with minimal blast radius and self-healing capabilities.​</em></p><p>Making SREs and 3rd line support weekend as quiet as possible!</p><p>If there are failures, we make sure you use architectural bulk heads to limit the blast radius.</p><p>We should make sure that in event driven systems we implement guaranteed message deliver patterns so we never lose customer data.</p><p>If something does go wrong — we should be already investigating and fixing before our customers have noticed — or reported it. We do this by making our systems observable and alerting on observed events.</p><h3>Conclusion</h3><p>We hope that you have enjoyed reading our Engineering Principles.</p><p>They engineering principles serve as guiding lights in the complex world of software development. By embracing these principles, teams can foster collaboration, encourage innovation, and ultimately deliver software that meets the needs of users while adapting to changing business requirements. It’s important to remember that these principles are not rigid rules, but rather flexible guidelines that can be tailored to the unique context of each project.</p><p>What would your Engineering principles be? Which do you like and what have we missed?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=abe8efc9be91" width="1" height="1" alt=""><hr><p><a href="https://engineering.dunelm.com/dunelm-engineering-principles-abe8efc9be91">Dunelm Engineering Principles</a> was originally published in <a href="https://engineering.dunelm.com/">Dunelm Technology</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My 10 REST Commandments]]></title>
            <link>https://engineering.dunelm.com/my-10-rest-commandments-c675534b9af0?source=rss-2e70a7833675------2</link>
            <guid isPermaLink="false">https://medium.com/p/c675534b9af0</guid>
            <category><![CDATA[integration]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[rest-api]]></category>
            <category><![CDATA[10-commandments]]></category>
            <dc:creator><![CDATA[Tom Keeber]]></dc:creator>
            <pubDate>Wed, 17 May 2023 11:11:26 GMT</pubDate>
            <atom:updated>2023-05-17T11:11:26.682Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1009/1*KyyQkmD5_nUpxhcjzt7ZVA.jpeg" /></figure><p>I recently went to the International JavaScript Conference where a talk was given regarding 10 REST commandments.</p><p>There was some really good points and commandments but I didn’t agree with all of them — so i decided to write my own.</p><p>And the Principle Engineer came down from mount Architecture and said “Behold my REST commandments, for they are good. And if you believe in them they will light you on the way to better APIs.“</p><h3>Thou shall have the right tech before me</h3><p>One of the reasons REST is still going strong 20+ years after its inception is its flexibility and simplicity. But that does not mean it fits every problem.</p><p>Consider some of the latest players when choosing your API technology. GraphQL has some fantastic use cases for clients. gRPC is a great RPC technology.</p><p>REST could be a great answer — but its not the only one.</p><h3>Thou shall not make breaking changes</h3><p>Ok, into the implementations details a bit more. This one is simple. DO NOT MAKE BREAKING CHANGES TO YOUR API. Caps intentional.</p><p>Be aware of what a breaking change is too — because its not just about changing the name of an existing attribute in your response, or now expecting a slightly different format in a POST request. Its also about the data you return. If you start returning pence instead of pounds in your API— that’s a breaking change. If you change the values of an enum — that’s a breaking change.</p><p>When it comes to APIs you need to be thinking <strong>Evolution </strong>not revolution.</p><p>Generally this means that you need to be aware of the type of API you are creating. If you are creating a public facing API then you might want to consider versioning. (lots of implementation details on how to do this — in URL ‘/v1/orders’ or header values X-apiversion for example. )</p><p>If you have an internal facing backend for frontend, is versioning really necessary?</p><p>So if you don’t version this means ALL changes should be additive. Edit and deleting attributes and attributes values is a breaking change.</p><p>Lets say you have a field called ‘total’ and you realise after going into production that this is a terrible name (it is a terrible name) and you want to change it instead to ‘totalInPence’ — how would you do this?</p><ol><li>Add a new field ‘totalInPence’ populated with the correct data.</li><li>Deprecate the existing ‘total’ attribute. (couple of ways you could do this such as documentation/header information)</li><li>Ask (or even better do the work yourself) to update the clients using the API use the new field.</li><li>Done</li></ol><p>Annoyingly number 4 should be ‘delete the attribute’ but unfortunately that is a very dangerous thing to do and I would only recommend it if you know with absolute certainly that it is not used anywhere.</p><h3>Thou shall not commit non-secure code to Gitlab</h3><p>Always consider security as a fundamental part of your API.</p><p>API security is a massive subject with various considerations. But at its core its about keeping the integrity, confidentiality, and availability of your data and services.</p><p>A couple of key calls outs;</p><ul><li>Data Protection. Do not expose by default and if you need to make sure you apply the right security rigour (protection at rest and in transit)</li><li>Authentication and Authorisation strategies</li><li>Rate limiting and service protection.</li></ul><h3>Thou shall not take RESTs name in vain</h3><p>When is a REST API not a REST API? Usually always in the pedantic academic sense.</p><p>The <a href="https://martinfowler.com/articles/richardsonMaturityModel.html">Richardson Maturity Model</a> goes into this in detail. Giving 3 different levels of maturity of REST APIs.</p><p>Most REST APIs I’ve used have gone to Level 2. I’ve found the increasing complexity and decrease in flexibility as you move to Level 3 to be counter productivity. Thus the rise of “RESTful” APIs.</p><p>Incidentally, I don’t think this is a bad thing as long as you find your standard and keep to it. REST is a tool — use it like you would any other. To solve a problem, but don’t let the tool own you.</p><h3>Honor thy consistency</h3><p>This leads us to consistency. A key component in any RESTful API.</p><blockquote>When you are creating an API you have customers. Your customers want consistency.</blockquote><p>Make sure your API is consistent with;</p><ul><li>Naming conventions</li><li>HTTP verb use</li><li>URL conventions</li><li>Data Types</li><li>Data Structure</li></ul><h3>Thou shall not create a non-performant API</h3><p>Often an after thought. But performance should be at the heart of you API.</p><p>Once again this comes down to the fact you an API is a service and has customers — customers don’t want to wait.</p><p>If you are considering Level 3 on the Richardson Maturity Model then seriously consider how you are going to handle N+1 problems for looking up resources. ( Incidentally, this is why academic REST sucks for most modern APIS — Individual resource lookup doesn’t scale)</p><h3>Thou shall not expose implementation details</h3><p>REST APIs should be designed around resources, representing entities or concepts in your system, rather than focusing on specific actions or operations.</p><p>Limit Exposed Data: Only expose the necessary data to API consumers. Implement resource representations that include only the required fields, rather than returning complete database objects. Oh and remove those internal ids from your response.</p><blockquote>Once you have exposed a piece of data — it is very difficult to stop exposing it</blockquote><h3>Thou shall always create automated tests</h3><p>Write tests that look to mimic how your customers use the API. ( you could go a step further an have tests for specific clients if you know them )</p><p>You’re after quick feedback on breaking changes of your API outside a production environment.</p><p>Alongside this, make sure your API is deployed using a repeatable and dependable Continuous Integration/Continuous Deployment process.</p><h3>Thou shall be social</h3><p>Building an API is a social activity.</p><p>The worst APIs are created keep purely internal domain knowledge in mind and not talking to what your users/customers actually need.</p><p>Talk to your customers and understand how they are using your API. If an building an internal API this should be much simpler.</p><p>Over communicate on the changes to your API and make sure your documentation is up to date.</p><h3>Thou shall honour thou SREs and thou Engineers on call</h3><blockquote>If your customers are the first to tell you something is broken then you have failed as a service provider.</blockquote><p>Ideally, by following all the above commandments you limit the potential of issues — particularly if you have robust testing and dependable Continuous Integration/Continuous Deployment.</p><p>Observability should be built in from the start of your API. Make sure you logging the correct level of detail. Make sure you have the appropriate tooling for alerting and monitoring in place.</p><p>For your systems to be <strong>observable</strong> it means you have the appropriate level of monitoring/alerting to be able to react quickly to any problems and minimise down time.</p><p>I hope you have enjoyed reading my commandments. The key concepts here are that building an API is about considering your customers needs and wants. Think about the type of API you are creating and who your customers are and adapt your approach according.</p><p>By considering security, performance, observability and testing from the beginning of creating an API, you should aim to build a robust, efficient, and secure API that meets the needs of your users while minimising vulnerabilities, ensuring optimal performance, and delivering a reliable user experience.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c675534b9af0" width="1" height="1" alt=""><hr><p><a href="https://engineering.dunelm.com/my-10-rest-commandments-c675534b9af0">My 10 REST Commandments</a> was originally published in <a href="https://engineering.dunelm.com/">Dunelm Technology</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sustainable Cognitive Load]]></title>
            <link>https://engineering.dunelm.com/sustainable-cognitive-load-46420f34d55d?source=rss-2e70a7833675------2</link>
            <guid isPermaLink="false">https://medium.com/p/46420f34d55d</guid>
            <category><![CDATA[wellbeing]]></category>
            <category><![CDATA[sustainability]]></category>
            <category><![CDATA[cognitive-load]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Tom Keeber]]></dc:creator>
            <pubDate>Wed, 19 Apr 2023 07:31:40 GMT</pubDate>
            <atom:updated>2023-04-19T07:31:40.787Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*adp2oNPCo4L_0_oLibkatA.jpeg" /><figcaption>Photo by That’s Her Business on Unsplash</figcaption></figure><p>How is a training for a marathon like software engineering?</p><p>One way of training for a running race is to use heart rate zones. This is where you use your heart beats rate to determine your effort and level of training. Its a well known training technique in the world of sport.</p><p>With heart rate training you train within certain zones. Zone 1 being the lowest — that’s your easy walking pace. To Zone 5 — that’s your flat out maximum heart rate.</p><p>Lets quickly go through the different zones in relationship to training effort;</p><ol><li>Zone 1: Recovery (50–60% of maximum heart rate). Very low-intensity activities. Think warm up for recovery activities.</li><li>Zone 2: Endurance (60–70% of maximum heart rate). Base fitness. Exercise at a level you can do all day.</li><li>Zone 3: Tempo (70–80% of maximum heart rate). Moderate level.</li><li>Zone 4: Threshold (80–90% of maximum heart rate). Getting hard. Breathing might be more laboured. Working aerobically</li><li>Zone 5: Maximum Effort (90–100% of maximum heart rate). Your heart and your blood and respiratory system will be working at their maximal capacity.</li></ol><p>There is only so long you can stay at Zone 5 — or zone 3 or 4 for that matter.</p><p>How does this relate to software. Well, you’re rarely going to be combining physical activity and software engineering! But what you are doing is using your own mental capacity — so instead of heart rate zones for physical activity — how about one for your mental capacity. Indeed David Goggins (love him or hate him) talks about this in his latest book.</p><blockquote>Just like our heart rate can only be high for so long, likewise our cognitive load can only be high for so long.</blockquote><p>Here are some suggested zones for Software Engineering;</p><p><strong>Cognitive Load Zone 1</strong></p><p>Engage in lower-intensity activities, such as reading and research, the idea is to help you recover and recharge after more intense work sessions. This zone is also ideal for brainstorming and idea generation, as it allows for a relaxed, open-minded approach.</p><p><strong>Cognitive Load Zone 2</strong></p><p>Engage in longer, <strong>sustained</strong> activities such as coding sessions, debugging, and testing. This zone can also be used for tasks that require sustained focus and concentration, such as problem-solving and code reviews. This is where you should spend most of your time.</p><p><strong>Cognitive Load Zone 3</strong></p><p>Engage in high-intensity activities such as coding sprints or deadline-driven tasks. This zone is ideal for tasks that require quick thinking and high levels of focus and concentration, such as debugging or performance optimisation.</p><p><strong>Cognitive Load Zone 4</strong></p><p>High-intensity activities that require a significant amount of mental and physical effort, such as complex algorithm design or refactoring. This zone requires a high level of focus and concentration and can be sustained for shorter periods of time.</p><p><strong>Cognitive Load Zone 5</strong></p><p>Engage in activities that require maximum mental effort, such as emergency bug fixes or critical system failures. This zone is highly demanding and should only be used for short periods of time to avoid burnout.</p><p>As mentioned above. A Software engineer should spend most of their time in <strong>Cognitive Load Zone 2</strong> in order to maintain a sustainable pace. This allows capacity to;</p><ul><li>Move up the zones when needed.</li><li>Improve your overall productivity.</li><li>Make sure you do not burn out.</li><li>Maintain enough cognitive capacity to complete complex tasks when needed.</li></ul><h3>Being Mindful</h3><p><em>Being mindful</em> about which zone you are in can help you make more intentional decisions about how to allocate your time and energy in software engineering.</p><h4>Observe your physical and mental state</h4><p>To be mindful about which zone you are in, start by observing your physical and mental state. Pay attention to your heart rate, breathing, and level of mental effort required for the task at hand. This can give you a clue about which zone you are in. Make sure you take into account work and home life factors.</p><h4>Reflect on your recent activities</h4><p>Reflecting on your recent activities can help you determine which zone you have been operating in. Were you working on routine tasks or tackling complex problems? Were you taking a break or engaging in learning activities? Answering these questions can give you insight into which zone you are in.</p><h4>Set intention for each activity</h4><p>Setting intention for each activity can help you be more mindful about which zone you are in. Before starting a task, ask yourself what zone it corresponds to and what level of mental effort is required. This can help you approach the task with greater focus and intention.</p><h4>Take breaks and assess your state</h4><p>During breaks observe your level of mental effort. This can help you make more informed decisions about how to allocate your time and energy.</p><h3>Conclusion</h3><p>Being aware of the above factors and framing that against heart rate zones hopefully gives something to relate to and use in your day to day.</p><p>There are times when moving up mental capacity zones is not only necessary but desirable. This should not be a cause for concern, but be warned and mindful against <strong>sustained high or maximum over a long period </strong>as performance and your mental health will suffer.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=46420f34d55d" width="1" height="1" alt=""><hr><p><a href="https://engineering.dunelm.com/sustainable-cognitive-load-46420f34d55d">Sustainable Cognitive Load</a> was originally published in <a href="https://engineering.dunelm.com/">Dunelm Technology</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Testable Integration Architecture]]></title>
            <link>https://engineering.dunelm.com/testable-integration-architecture-76cf8829d790?source=rss-2e70a7833675------2</link>
            <guid isPermaLink="false">https://medium.com/p/76cf8829d790</guid>
            <category><![CDATA[integration]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Tom Keeber]]></dc:creator>
            <pubDate>Wed, 01 Mar 2023 08:50:30 GMT</pubDate>
            <atom:updated>2023-03-01T08:50:30.270Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VEOJDhkYomUXbz5LpFaLtg.jpeg" /><figcaption>Photo by JJ Ying on Unsplash</figcaption></figure><p>Hang around me long enough and I’ll probably start recommending books.</p><p>One of my favourites is <a href="https://www.enterpriseintegrationpatterns.com/">Enterprise Integration Patterns</a>. Although this book is now close to 20 years old and contains scary words like “Enterprise” its still extremely relevant and the patterns it describes are a foundation for message based asynchronous systems.</p><p>Near the beginning of that book there is a great quote.</p><blockquote>Change is inevitable</blockquote><p>Change is inevitable you say? Well, at Dunelm we want to be able to move safely at speed. Which means we invest in our automated testing framework. Why do we do this? Because we want to make changes quickly and safely and if something is broken we want that feedback quickly.</p><p>In this blog post I’m going to talk about how the different architectural integration choices you make affect your ability to make changes (the extensible architecture side) and make them safely (the testing part).</p><p><em>Note; I’m aware that there are far more factors to be considered when creating software — I’m going to use the usual blog post get out clause — that they are out of the scope of this article.</em></p><p>There are 4 “Architectural Styles” for passing data between different systems defined in Enterprise Integration Patterns.</p><ul><li>File Transfer</li><li>Shared Database</li><li>Remote Procedure Invocation</li><li>Messaging</li></ul><p>Each of these integration options comes with their different challenges when it comes to testing. Lets talk through each…</p><h3>File Transfer</h3><p>If you’ve been in software long enough sooner or later you’ll be passing data around using File Transfer. Someone writes a file and someone read it.</p><p>You often see File Transfer integration used for large data sets or where documents must be supplied in a pre-determined format.</p><p>Unfortunately, you also see File Transfer integration used where other integration mechanisms would do a much better job. This is usually older, 3rd party systems.</p><p>The big advantage here is the loose coupling between different systems. The Producer (creator of the file) and Consumer (reader of the file) could be written in entirely different frameworks/languages.</p><p>As with all integrations there needs to be a shared agreement on the format of the file.</p><h4>Testing File Transfer Integration</h4><p>File Transfer integration can be hard to test due to a lack of visibility, complexity, environment variability, and security concerns. You may also be limited in your automation due to certain file types. It is the lack of visibility and feedback that can hamper the benefits of automated testing — particularly if anything changes in file format by either the consumer or producer.</p><p>The file transfer mechanism acts as a natural testing barrier. For the outbound testing, where you are creating or updating a file, an automated test that creates a file and validates its format would a natural happy path integration test.</p><p>Where automation testing becomes tricky is the End-to-end journey and error scenarios. As this type of integration depends so much on the underlying File system — network connectivity, server capacity, and other environmental variables are very tricky to automate the testing of.</p><h4><strong>Advantages</strong></h4><ul><li>Simplicity of integration</li><li>Reliability of the File based systems.</li></ul><h4>Disadvantages</h4><ul><li>No Feedback on success.</li><li>Anything can happen once you’ve placed that file into a shared space.</li><li>Little visibility of failures</li><li>Delay — far slower than other integration methods.</li></ul><h3><strong>Shared Database</strong></h3><p>One database or schema is shared amongst multiple systems.</p><p>Fast becoming one of my least favourite integration types and a massive anti-pattern in a microservice domain driven architecture.</p><p>The big advantage of this type of integration is the ability to share the data amongst systems and know that data is from a single source of truth.</p><p>But it does come with some big challenges. One of the big ones will be how you manage database connections and load on your database (read/write replicas and other strategies will help with this). The other, and the one that really effects testing, is the ability to understand how schema and data changes effect all the systems talking to the database. If any system can make a schema change to the database, then you have a big problem in ensuring integrity.</p><h4>Shared Database Integration Testing</h4><p>Unlike File Transfer integration — Shared database integration requires you to think about feedback you get from changes in a different way. If any system can modify the schema or data anywhere in the database then you will run into problems which may not be easily identified — until it breaks.</p><p>When using this pattern, follow these guidelines to make sure that you have observability of integrated systems and get feedback on data and DDL changes;</p><ul><li>All systems that use a shared database must have an integration test that covers the systems use of the database.</li><li>If you have multiple repositories with systems that access the database then keep DDL changes deployed and managed in a separate repo. Make sure your CI/CD for this repo either covers all systems use of the database or starts pipelines which perform automated tests.</li><li>Ideally use a real database and not an in-memory version.</li><li>Make sure your database connection strategy covers your maximum usage scenario for scaling. You don’t want one system starving others of connections.</li></ul><h4>Advantages</h4><ul><li>Single source of truth for data</li><li>Data up to date.</li><li>Can use standard database testing patterns.</li></ul><h4>Disadvantages</h4><ul><li>Feedback on DDL or data changes across systems can be cumbersome.</li><li>Performance testing could be difficult — ability to replicate multiple users of a system adds complexity.</li><li>Handling Database connections requires an enforced strategy and could be hard to test for.</li></ul><h3>Remote Procedure Invocation</h3><blockquote><em>Remote Procedure Invocation</em> applies the principle of encapsulation to integrating applications.</blockquote><p>This is where I think the Enterprise Integration Patterns book needs an update.</p><p>Instead of RPI — I think a more modern description would be <strong>API based integration</strong>. The idea is that we introduce loose coupling between systems and data by providing a predefined way of performing operations on or retrieving that data.</p><p>There are number of different implementations this some older ones such as Java RMI and some more recent such as Google created <a href="https://grpc.io/">gRPC</a>. Probably the most popular is one you will know well — Web Services or REST based services usually over HTTP.</p><p>This integration style covers a huge and popular area of integration between systems and has some major advantages — ease of use, lots of implementation options with popular and well defined standards.</p><p>One of the big disadvantages is the use of networking and HTTP can introduce unexpected failures that often need to be handled by the client.</p><p>So what does this mean for testing.</p><p>Well, if well designed we can think of our web service as black box. We shouldn’t need to understand the details of what the services is doing, but only the effects of that action.</p><p>At a high level its important that we design our services in such a way that;</p><ul><li>If we have requested a operation on data we can determine that operation was success. (E.g. I have a system that manages Orders. Once I’ve created a new Order can I now use a service to find that Order)</li></ul><p>This can lead to a simple testing strategy. But it is often not enough particularly in large complex systems.</p><p>At Dunelm we use a lot of REST based micro services for us this means ideally each service should;</p><ul><li>Provide a defined contract and as simple an interface as possible</li><li>Provide a way for a calling system to set up and tear down data that might be required for integration testing.</li><li>If this is not possible then provide a mocking mechanism for integration testing with other systems.</li><li>Using tools such as PACT to provide contract based testing.</li></ul><p><strong>Advantages</strong></p><ul><li>Simple, well understood.</li><li>Lots of implementation options and testing options.</li><li>Lots of testing tools available — such as Postman.</li><li>Quick feedback can be received if the contract is not adhered to</li></ul><p><strong>Disadvantages</strong></p><ul><li>Emphasis on the client to handle failures</li><li>Contract changes need to be handled very careful. Just like DDL changes in a Shared Database Integration pattern — without an adequate testing strategy strategy — feedback and visibility of changes could lead to broken systems and unhappy clients.</li></ul><h3>Messaging</h3><p>Asynchronous communication solves so many problems in a complex distributed system. But also adds a huge amount of complexity to our systems particularly around testing.</p><p>Again it comes down to feedback — in a Asynchronous system — how long do you wait for something NOT to happen? and how do I get feedback that something <strong>has</strong> happened?</p><p>You need to decide on a few different strategies on how you are going to test.</p><ul><li>Message payload validation — all messages should conform to the expected format.</li><li>Message routing and delivery: Asynchronous systems rely on message brokers or middleware to route messages between components. You need to test that messages are routed correctly, delivered to the intended recipients, and processed in the correct order.</li><li>Message acknowledgement and retry: You need to test that the system is capable of acknowledging messages and retrying failed deliveries when necessary. This includes testing for scenarios where messages are lost, delayed, or delivered out of order.</li><li>Error handling and recovery: Asynchronous systems need to be resilient to errors and failures. You need to test that the system is capable of handling errors gracefully, recovering from failures, and resuming normal operation as quickly as possible.</li></ul><p>Couple of practicals on this;</p><ul><li>Never use Thread.sleep or any other hard coded waiting mechanism in your tests.</li><li>Looks to use CountdownLatches and await while you are waiting for something to happen.</li><li>Think about how do I know the message I have sent has performed the operation I need it too, or updated the system I want it too? How long am I going to wait for this to happen?</li></ul><h4>Advantages</h4><ul><li>Asynchronous communication allowing for improved performance and use of resources.</li><li>Resilience and message guarantee.</li></ul><h4>Disadvantages</h4><ul><li>Testing can become more complex — specifically — Asynchronous communication means you are making a conscious choice to not get feedback as to whether an operation is successful.</li></ul><h3>Conclusion</h3><p>An architecture that restricts automated testing will restrict business agility and ultimately lead to decrease in productivity.</p><p>If your goal is to create a system that is flexible and building for velocity, then choosing your integration option will massively effect your testing strategy and the cost of automated testing.</p><p>If we make the wrong choices with our integration architecture testing will be harder. The boundaries around our tests can become blurred, testing loops and feedback can become harder to determine.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=76cf8829d790" width="1" height="1" alt=""><hr><p><a href="https://engineering.dunelm.com/testable-integration-architecture-76cf8829d790">Testable Integration Architecture</a> was originally published in <a href="https://engineering.dunelm.com/">Dunelm Technology</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DORA Metrics]]></title>
            <link>https://engineering.dunelm.com/dora-metrics-75221810ec91?source=rss-2e70a7833675------2</link>
            <guid isPermaLink="false">https://medium.com/p/75221810ec91</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[innovation]]></category>
            <category><![CDATA[hackathons]]></category>
            <category><![CDATA[metrics]]></category>
            <category><![CDATA[engineering]]></category>
            <dc:creator><![CDATA[Tom Keeber]]></dc:creator>
            <pubDate>Wed, 19 Oct 2022 07:31:39 GMT</pubDate>
            <atom:updated>2022-10-19T07:31:39.740Z</atom:updated>
            <content:encoded><![CDATA[<p>A Dunelm Hackathon Story</p><p>Dunelm Hackathon! A time to step away from the day-to-day and put on your thinking caps, break out your coding fingers and get hacking!</p><p>Our Principal Engineer group (<a href="https://medium.com/u/8d4ac7599508">Mark White</a>, <a href="https://medium.com/u/b4778a0bb950">Matt Brading</a>, <a href="https://medium.com/u/50e7f35b588e">Chintan Parmar</a>, <a href="https://medium.com/u/2025b216c794">Warren Fitzpatrick</a> and <a href="https://medium.com/u/2e70a7833675">Tom Keeber</a>) decided to enter a team with the mission of…</p><blockquote>Allow DORA metrics to be visible across Engineering team</blockquote><p>With around 36 hours to deliver working software for this goal our Princey Pals team was resurrected…the race was on.</p><p>But first things first…</p><h4><strong>What are DORA matrixes and why are they important?</strong></h4><p><strong>DORA</strong> stand for <strong>DevOps Research and Assessment</strong>. Originally formed by Google. Which doesn’t really help explain what or why! So let’s get into some details.</p><p>In short, some very clever folk at Google looked at a number of different metrics that could be collected around DevOps teams which look at how they are performing. Out of the all the different metrics, they came up with <strong>4 </strong>that they highlight as the most important in determining high performing teams. They did this by collecting data from 1000s of DevOps teams around the world.</p><blockquote>There findings are in a book called <a href="https://itrevolution.com/accelerate-book/"><strong>Accelerate</strong></a></blockquote><blockquote>The research identified that just Four Key Metrics distinguish the performance of various organisations. These “North Star” metrics serve as indicators of overall software engineering health.</blockquote><p>So what are these 4 metrics;</p><p><strong>Deployment frequency (DF) </strong>How often you deploy your software to a Production environment over a period of time. I.e. how often to you change your product.</p><p><strong>Lead time for changes (LT) </strong>Time to implement, test, and deliver code for a feature.</p><p><strong>Mean time to recovery (MTTR) </strong>Mean time it takes to restore service after production failure.</p><p><strong>Change failure rate (CFR) </strong>Percentage of deployments that cause a problem in Production.</p><h3>Our goal was to socialise these metrics to our individual Engineering teams to drive improvement and innovation.</h3><p>OK, so we know the what and we know why. Now the hard part…</p><h3>Gathering the data</h3><p>Let’s start with the simple one; <strong>Deployment Frequency (DF)</strong>. All our code in Dunelm makes its way to Production in a deployment pipeline. This means we can gather DF from Gitlab. Which very helpfully provides us with Webhooks, configured for different events.</p><p><strong>Lead Time for Changes (LT) </strong>There is some complexity here. When does this lead time start and when does it finish? We could take this from when a pipeline starts and finishes? Or when a branch is created? But this misses a huge part of the metric — the ways of working which effect the delivery of a story.</p><p>We can’t get this data from our Source Control Repository (Gitlab) so we need to use a different system. All our teams use a delivery management tool (JIRA) to manage their delivery. So this looks like a good place to start. It also provides webhooks for different events — perfect!</p><p>But wait, all our teams work in a slightly different way. (Absolutely on purpose and not something we want to change — Our DevOps teams have autonomy in how they work).</p><p>I think this was the first time we realised having a standard approach for LT was going to difficult.</p><p><em>Spoiler; as we had 36 hours we never got to the bottom of this problem and will be looking into it more outside of the Hackathon.</em></p><p><strong>Mean time to recovery (MTTR) </strong>There are a couple of different ways we can get this data. The first is to look at our incident management tool (PagerDuty) and look at when incidents started/ended and how long they took. The second would be to use our observability platform (DataDog) to see if a specific deployment increases the error rates. We decided to go for the former. Again PagerDuty provides a webhook for events. Fantastic.</p><p><strong>Change failure rate (CFR) </strong>We decided that CFR was actually just a combination of two different metrics — DF and number of MTTR events. This might not be exactly as described — but a good starting point to understanding the negative effect of change.</p><h4><strong>Architecture</strong></h4><p>Gathering the data was a large part of what we needed to do. But how do we show this data in a meaningful and accessible way? We decided to use store the data in a Timeseries database and visualise it using Grafana.</p><p>Here is our high level architecture.</p><figure><img alt="DORA Matrixes Archiecture — Dunelm Hackatron" src="https://cdn-images-1.medium.com/max/1024/1*B4A2MH4NcPXzQHqXktNeWQ.png" /><figcaption>Note: Not 100% reflective of our entire platform</figcaption></figure><p>In short;</p><ul><li>We used API Gateway to provide an APIs for the different Webhooks to send data too.</li><li>We backed that APIG with a Lambda which understood the different payloads.</li><li>That lamdba created a common payload which was placed on a SQS queue.</li><li>Another Lambda picked up these messages and wrote to the Time Series Database.</li><li>We put Grafana infront of the TimeSeries database to visual the data.</li></ul><h4><strong>Making</strong> Data Relevant</h4><p>We also want to make this data relevant for the teams —We have over 20 engineering teams at Dunelm. How do we make sure each team has individual metrics. This again is a problem to solve;</p><ul><li>Any team can contribute to any repository.</li><li>Gitlab can give us the repositories that were deployed (we have multiple repos across our estate) but not teams.</li><li>Pager Duty knows nothing about repositories, but does understand different teams.</li><li>JIRA knows teams, but again — nothing about repositories.</li></ul><p>In true Hackathon style we decided a mapping inside our architecture would solve this initially (think hard coded by map in one of our lambdas and you’re not far off).</p><h4>How far did we get?</h4><p>We connected JIRA/PagerDuty/Gitlab to via webhooks to our architecture and have data feeding into the timeseries database (although we got this working 5 mins before we were due to give a demo! Eek!)</p><p>We had a dashboard (see below) which showed our key metrics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bCyXOtzQ3e3ty08e7DMWuQ.png" /></figure><p>It’s fair to say we were quite happy with how far we got here. But the biggest outcome here was what we learned.</p><h4>What we learned</h4><p>Gathering these metrics raised lots of questions. From what exactly Lead Time means to how we data across different 3rd party systems.</p><p>It became apparent that a common way of working would help aid the collection of these metrics. But this is not something we would be willing to dictate to our teams.</p><p>Could/should we add a more people centred metric? Maybe a People Churn Rate (<strong>PCR</strong>), Happiness Factor, Average time of Employment or into these metrics?</p><p>What are good numbers? Well Iguess this is relative to the company.</p><h4>Summary</h4><p>It’s fair to say we loved the taking part in the Winter 2022 Dunelm Hackathon.</p><p>Taking time out from the day-to-day to focus on a problem which all the Principal Engineers are passionate about was a fantastic experience and certainly gave us food for thought on how we can progress DORA metrics at Dunelm.</p><p>The quality of entries into our Hackathon this year was simply amazing. From video games to learn about store layout to AR mobile Apps to Stock management. What our teams achieved in 36 hours was simply unreal. It makes me so proud to be part of it and part of a company with so many bright and innovative people.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=75221810ec91" width="1" height="1" alt=""><hr><p><a href="https://engineering.dunelm.com/dora-metrics-75221810ec91">DORA Metrics</a> was originally published in <a href="https://engineering.dunelm.com/">Dunelm Technology</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS Summit 2022]]></title>
            <link>https://engineering.dunelm.com/aws-summit-2022-bacf0d662dae?source=rss-2e70a7833675------2</link>
            <guid isPermaLink="false">https://medium.com/p/bacf0d662dae</guid>
            <category><![CDATA[software]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[conference]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Tom Keeber]]></dc:creator>
            <pubDate>Tue, 03 May 2022 20:06:21 GMT</pubDate>
            <atom:updated>2022-05-04T19:36:00.988Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iX6iTE86Pzj-N0_jxSsOfA.jpeg" /></figure><p>After two years of not attending a conference in person it’s easy to forget the buzz of thousands of similar minded people all in one place sharing a single passion — to learn something new.</p><p>At AWS Summit 2022 at eXcel that’s exactly what myself and numerous other Dunelm Software/SecOps/Platform Engineers were there to do. Along with catching up with some colleagues not seen for a while and even meeting some for the first time face to face!</p><p>One of the hardest parts of attending the AWS summit is deciding which talks you want to go to. But powered by coffee, early morning sausage sandwiches and want to learn, I came up with the following choices:</p><blockquote><strong>KeyNote</strong></blockquote><blockquote><strong>Best practices to design and build event driven applications</strong></blockquote><blockquote><strong>Towards continuous resilience</strong></blockquote><blockquote><strong>SAP Cloud migration &amp; modernisation with AWS</strong></blockquote><blockquote><strong>Unleash the power of AI/ML by carefully selecting your use case</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*krz_0qBm_YaAvy2fU25uyw.jpeg" /><figcaption>Dunelm at AWS Summit — April 2022</figcaption></figure><h3>First up - The <strong>KeyNote</strong></h3><p>This reminded us how far we’ve came from a few years ago when it comes to seeing your idea moved from prototype to implementation. How upfront costs to get to a place to execute an idea can sap the energy/time etc of fulfilling that idea.</p><p>A gentle reminder and steer that Cloud based services have made a massive difference to not just how we build software, but how businesses/products have benefited. Obviously heavily slanted with how AWS have helped with this. And why not, they are one of the biggest Cloud service providers and Dunelm have certainly felt these benefits by utilising AWS products.</p><p>They then talked about a theme that Dunelm and AWS share — that is the want to implement <strong>sustainable practices</strong> across their organisation. For AWS this means powering their data centers with renewable energy and providing more sustainable ways of running software with less energy need.</p><p>For Dunelm technology we’ve already started looking at AWS Graviton and moving out Lambdas and databases to it. The idea is this would give us a reduced energy footprint while also increasing performance. Win Win!</p><p>Next up on the Keynote was Ocado talking about moving their warehouse bot fleet to the cloud from on-prem.</p><p>Got to say it was impressive seeing the bots fly across the warehouse all governed by AL/ML with a high need for low latency and performance predictability.</p><p>Although unlike Ocado I’m not sure deploying their Robot shoppers on Christmas Eve would be a very popular choice at Dunelm for those who celebrate Christmas.</p><p>Then onto machine learning and the idea of using machine learning in <strong>every app </strong>and how AWS are helping with this.</p><p>More on this later as a talk I went to expanded on the machine learning space.</p><h3>First Talk <strong>— Best practices to design and build event driven applications</strong></h3><p>We make massive use of event driven systems within Dunelm. We started our journey on event based systems utilising SNS/SQS and Lambdas and have recently expanded this with the use of EventBridge. EventBridge was the focus of this talk.</p><p>Here are a few things we’ll take away from the talk;</p><ul><li>Whether we’re sending the right about of data in our messages — the speaker spoke of <strong>Sparse Vs Full</strong> Data events. We largely focus on Full data events right now, but we should certainly review this and see whether it is right in all cases and if we are making the right tradeoffs.</li><li>Whether we need to have an event log — which logs all the events that have came into the bus. I can certainly see the advantages of this for traceability and observability of our EventBuses.</li><li>Do we need to get better at our documentation around inputs and outputs of our EventBridge? We have a challenge here of where that documentation would live — source control obviously — but we have multiple repos with the Event buses defined in one and rules in other. Automating this documentation would be the way to go. (<em>Credit </em><a href="https://medium.com/u/58e8dd6a9725"><em>Jack Barwell</em></a><em>)</em></li></ul><p>Overall a good first talk and one that I enjoyed — the speaker spoke with a huge amount of energy and passion which is always good to see.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OkRSj9NnEW_EmPR2zqrsew.jpeg" /></figure><h3>Second Talk <strong>— Towards continuous resilience</strong></h3><p>Effectively a talk on architecting and expecting failure. I didn’t learn as much from this talk as I was hoping. I think Dunelm have some excellent patterns in place that have made things like Retries/Dead Letter Queues/Back off policies standard across our architecture. We can always do better at this, but unfortunately this talk did not really provide the depth I was looking for.</p><p>My one take away; <strong>Being able to bounce back from failures is more important than stopping them in the first place.</strong></p><p>My take on this is that it makes monitoring/observability of your platform vital (something we’re very good at) and having a pipeline which is reliable, quick and you are confident in, is vital.</p><h3>Third Talk - <strong>SAP Cloud migration &amp; modernisation with AWS</strong></h3><p>Our very own <a href="https://medium.com/u/184f0335ecbf">Tom Hayman</a> talking about our SAP cloud migration. Not a project I have been particularly close to so it was interesting to hear about some of the lessons learn, performance improvements and where we might be going next with our SAP implementation.</p><p>We’ve had performance problems in this areas in the past — and migrating to AWS has certainly helped relive those. I’ll let Tom Hayman talk more about that in a forth coming blog post 😉</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*CgCOlmeNFE4meBWq53_2Kw.jpeg" /></figure><h3>And finally - <strong>Unleash the power of AI/ML by carefully selecting your use case</strong></h3><p>I’m fascinated with AL/ML. Fascinated and often deeply confused! This talk was an overview on the products offered by AWS to start on your Machine Learning journey.</p><p>It was certainly more of a high level overview and fuelled my passions to go and read more offline. One of my criticisms of this talk was that it made it sound very easy. Lots of ‘<em>all you have to do’</em> or ‘<em>it’s as simple as</em>’. I think it’s fair to say everything but the simplest of scenarios is going to take concentrated effort to understand and develop. Particularly taking into account the quality assurance practices that Dunelm is known for.</p><h3>Final thoughts</h3><p>A fantastic, long, tiring, social day. I’ll be sleeping well tonight! Did I learn something? Yep. Did I enjoy it? Absolutely. I’m already looking forward to Re:Invent!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bacf0d662dae" width="1" height="1" alt=""><hr><p><a href="https://engineering.dunelm.com/aws-summit-2022-bacf0d662dae">AWS Summit 2022</a> was originally published in <a href="https://engineering.dunelm.com/">Dunelm Technology</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[3 Things I Tell Our New Engineers]]></title>
            <link>https://engineering.dunelm.com/3-things-i-tell-our-new-engineers-647a316b0324?source=rss-2e70a7833675------2</link>
            <guid isPermaLink="false">https://medium.com/p/647a316b0324</guid>
            <category><![CDATA[quality]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[tips]]></category>
            <category><![CDATA[advice]]></category>
            <category><![CDATA[engineering]]></category>
            <dc:creator><![CDATA[Tom Keeber]]></dc:creator>
            <pubDate>Wed, 23 Mar 2022 08:31:17 GMT</pubDate>
            <atom:updated>2022-03-24T08:58:20.321Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8YODabHVF8NLBVCMve90Kw.jpeg" /><figcaption>Photo by Nadir sYzYgY on Unsplash</figcaption></figure><p>We have Engineers from all different backgrounds and all different experiences. Its one of the things that makes Dunelm a great place to work.</p><p>It’s vital that new starters to Dunelm understand some of our core beliefs and motivations so that we can continue the culture and ways of working that have made us so successful.</p><p>So as a Principal Engineer these are the 3 things I talk to our new starters about.</p><h3>1. Its all about Quality</h3><p>Different companies make different tradeoffs when it comes to software quality. For example, engineers with more agency or consultancy experience might find that they have been asked to focus completely on time to build rather than other quality aspect of software. This is all good. It’s important to understand the different approaches companies take to build software. But what works in one company may not work at another and at Dunelm we focus on building high quality, flexible, tested software. (What software quality means within Dunelm will form the bases of future blog posts)</p><p>So what do I tell new starters</p><blockquote>Focus on ensuring quality — not solely on time to build.</blockquote><blockquote>Focus on the right solution — not the cheapest.</blockquote><blockquote>Focus on strategic flexible solutions — not quick fixes and hacks</blockquote><blockquote>Focusing on how we build something is as important as the result</blockquote><blockquote>Everyone is responsible for Quality</blockquote><p>OK — slightly cheeky here — this is far more than one thing :-)</p><p>There are numerous aspects to ensuring quality in software. These cover multiple areas of engineering such as automated testing, IaC and CD/CI, but also move into Ways of Working and other less tangible practices. I feel a blog post coming on….</p><h3>2. Culture of empowerment</h3><p>It’s vital that we maintain and build on Dunelms’ culture of empowerment, autonomy and ownership.</p><p>Yes we have an on-paper hierarchy and yes we have career progression as part of that. But from a culture perspective our hierarchy is flat and our teams autonomous.</p><blockquote>Everyone has an equal voice in the team — use your experience to help the team improve. Whether that is ways of working, testing, new technology or anything else.</blockquote><p>Anyone can question anyone. With autonomy comes a need for open and honest conversations. It’s really important for Engineers to question Technical Leads, Principal Engineer or anyone else. Likewise, they will question you.</p><h3>3. You built it, you support and own it</h3><p>As Uncle Ben once said <em>with great power comes great responsibility</em>. We give teams the time and autonomy to build great solutions. As part of that we expect the team to self organise around supporting what they build in a production environment.</p><blockquote>You built it, you support it</blockquote><p>This means we want our Engineers to be engineering for failures, for visibility of our what is happening in our systems and making sure that the support side is as little impacting as possible.</p><p>But of course, we don’t expect this to “just happen” As Principal Engineers we support our teams with best practice, standards and anything else the team needs. We’re not setting teams up for failure here (and if we were, it would just be a learning exercise :-) )</p><h3>Thanks for reading</h3><p>I’ve talked about 3 things here that I believe set a tone for new starters at Dunelm Engineering— but of course its only the start of a journey. Where we go from here is shaped by our Engineers and other Chapters. But one thing is clear — our focus on Quality, Autonomous teams and Empowerment won’t change.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=647a316b0324" width="1" height="1" alt=""><hr><p><a href="https://engineering.dunelm.com/3-things-i-tell-our-new-engineers-647a316b0324">3 Things I Tell Our New Engineers</a> was originally published in <a href="https://engineering.dunelm.com/">Dunelm Technology</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTTP APIs for Amazon API Gateway]]></title>
            <link>https://medium.com/@TomKeeber/http-apis-for-amazon-api-gateway-12abea5eca12?source=rss-2e70a7833675------2</link>
            <guid isPermaLink="false">https://medium.com/p/12abea5eca12</guid>
            <category><![CDATA[api-gateway]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Tom Keeber]]></dc:creator>
            <pubDate>Thu, 05 Dec 2019 09:11:37 GMT</pubDate>
            <atom:updated>2019-12-05T09:11:37.122Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*H6HxGX24FnQnDVO9" /><figcaption>Photo by <a href="https://unsplash.com/@dbphotos_sf?utm_source=medium&amp;utm_medium=referral">David Barajas</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Recently I wrote a <a href="https://medium.com/@TomKeeber/aws-api-gateways-c048cec63046">critical review of AWS API Gateways.</a> This focused on some major problems with API Gateway in its current form.</p><p>Well, it seems AWS have listened and made some huge improvements to a number of these points. Notably the UI have changed significantly and is much easier to navigate.</p><p>But the big one is this:</p><h4>API Gateway HTTP APIs</h4><p>Today AWS also announced a new feature of the AWS API Gateway. Confusingly called HTTP APIs. You can read the blog post <a href="https://aws.amazon.com/blogs/compute/announcing-http-apis-for-amazon-api-gateway/">here</a>.</p><p>There are a couple of key parts of this that get me excited about it.</p><h4>No more explicit Stages</h4><p>We are no longer forced to config a Stage when creating our APIs. Wooo!</p><blockquote>Ability to assign a <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-concepts.html#http-api-concepts.stages">default Stage or configure a default route</a>. Default Stages and Routes make it easier to work with APIs. When you assign a default stage, you are able to serve your API from the base URL. For example: <a href="https://{api_id}.execute-api.{region}.amazonaws.com/"><em>https://{api_id}.execute-api.{region}.amazonaws.com/</em>.</a> This means you no longer need an explicit stage in your API. Choose the Stages option in the left nav bar to review or manage your Stages.</blockquote><h4>Automatic Deployments</h4><p>This is huge for managing your APIs deployment. No longer will you need a random deployment resource or manually deploy using the console.</p><blockquote>You can now optionally enable Auto deploy when you change a stage. By default, you must deploy the API to a stage for changes to go live. This option lets you release changes to your API immediately as the changes are made</blockquote><p>This new AWS resource is still in Preview. I’ll be playing with it over the next few months and hopefully this is the start of a easier to use, developer friendly HTTP based API.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=12abea5eca12" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS API Gateways]]></title>
            <link>https://medium.com/@TomKeeber/aws-api-gateways-c048cec63046?source=rss-2e70a7833675------2</link>
            <guid isPermaLink="false">https://medium.com/p/c048cec63046</guid>
            <category><![CDATA[aws-api-gateway]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <dc:creator><![CDATA[Tom Keeber]]></dc:creator>
            <pubDate>Tue, 15 Oct 2019 10:19:24 GMT</pubDate>
            <atom:updated>2019-10-18T15:05:20.727Z</atom:updated>
            <content:encoded><![CDATA[<h3>AWS API Gateways Critical Review</h3><h4>Stages: A mistake AWS cannot take back</h4><p>I’ve tried not to turn this story into a rant… I’m not sure I succeeded. However, I’ve have sent this story to AWS in hope they take some of the feedback on board.</p><p>AWS API gateways and I have a very much a love hate relationship. I love the idea, can see what AWS are trying to do, but they have some serious design flaws that need to be addressed.</p><p>The idea behind API gateways is that you can define your HTTP based API (REST/Websockets), define a model to be validated, define how the API integrates with an aws resource (such as a Lambda) and how the integration response is mapped to the API response.</p><p>All sounds good so far, but let’s have a look at those design flaws…</p><h3>Stages</h3><p>By far the biggest flaw in my mind is API Gateway Stages.</p><p>AWS defines a stage as…</p><blockquote>A stage is a named reference to a deployment, which is a snapshot of the API. You use a <a href="https://docs.aws.amazon.com/apigateway/api-reference/resource/stage/">Stage</a> to manage and optimize a particular deployment. For example, you can set up stage settings to enable caching, customize request throttling, configure logging, define stage variables or attach a canary release for testing. <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-stages.html">See here</a></blockquote><p>So the idea is that the Stage can be considered a specific lifecycle state or version of your API. E.g. maybe you have a dev-stage or v1 of your API and against these different stages you can have things like throttling and caching.</p><p>Stages throw up an interesting and annoying problem.</p><p>Unlike most AWS resources, where cloudformation is used to defined the desired state and then take you to that desired state on deployment, the API Gateway concept of Stages massively muddles this and forces Cloudformation to do some form of API orchestration.</p><p>When using SAM, as I understand it there is a algorithm within SAM which determines whether the Deployment resource should be recreated. This algorithm does not cover all possible changes to API GWs (such as adding a new path). Thus you can a new path, deploy your template successfully, but because of the API has not be deployed to the Stage (Grrrr stages) it is never updated. We’ve found the only way around this is to Deploy manually using the console or delete the stack.</p><p>My opinion on this is that although Stages may provide some flexibility in configuration, they potentially introduce some anti-patterns into some unsuspecting developers API. For example, there are many strategies for configuring different environments in AWS. One of the least scalable would be to have all environments under a single account.</p><p>How about versioning? Well, there is quite an emotional debate around the best way of doing this or <a href="https://api2cart.com/api-technology/briefly-not-version-api/">if you should</a>. I quite enjoyed <a href="https://www.troyhunt.com/your-api-versioning-is-wrong-which-is/">this article</a> on the subject.</p><p>With these things in mind why are Stages not optional in AWS? You have to use a Stage if you want to deploy an API. Which could lead you down a route that you were not expecting.</p><p>Incidentally, the way I handle Stages is to create a single Stage and constantly update it. Call it ‘/Prod’ or something meaningful for you and try and move on.</p><p>The problem now of course is that due to backward compatibility Stages will be with us forever.</p><h3>Gateway API UI</h3><p>One of the annoying issues with AWS is that each Resource console is very different and offers varying levels of functionality and UI experience. It certain feels like <a href="https://en.wikipedia.org/wiki/Conway%27s_law">Conways law</a> in action.</p><p>But there is so much wrong with the Gateway API console is hard to know where to begin. It’s death by a thousand cuts — poorly designed and hard to use.</p><h4>Linking</h4><p>Let’s start with the linking from Cloudformation to the Gateway API.</p><p>Wouldn’t it be nice if the link from cloudformation to the API Gateway console actually took you to the API you just clicked on? Yes, yes it would. Does it? Does it hell. It takes you to the root of your APIs. A small but annoying problem. But exacerbated by…</p><h4>Navigation</h4><p>The console extremely non scalable from a UI perspective. If you have more than around 20 gateways in your account on the same region is becomes very hard to find what you are looking for. If you have multiple different systems using a microservices architecture then this can get very unusable very quickly. If you have long API names then this problem is increased.</p><p>Having lots of API gateways also causes other annoyances — If you open an API gateway on the left hand side navigation and click on Stages you’ll have to scroll all the way to the top to actually see what you’ve clicked on.</p><p>The left hand navigation is also non-movable. Very frustrating when you can’t see the full name of the gateway.</p><h4>Custom Domain Names</h4><p>Custom domain names reserve a special place in my heart for being extremely awkward (I’ll save this for another story). In terms of UX finding custom domain names is easier enough, however, finding the API gateway they are linked to is a manual process once again. Why is there not a link to the gateway that is mapped? Small by annoying problems.</p><p>In conclusion, the UX for API gateways feels like it’s been put together very hastily and in no way scales. In comparison to some of the other AWS Resource Consoles API API gateways needs some serious work.</p><h3>Documentation</h3><p>One of my big pieces of feedback to AWS would be to work on there documentation. Each Resource should be backup with examples of how to configure and create using both Cloudformation and SAM.</p><h3>In conclusion</h3><p>We will continue to use API Gateway for REST based APIs in our system. Hopefully AWS will change some of these small but very frustrating customer journeys focusing around documentation and UX on the console. In the longer term, I’d love to see Stages disappear and cleaner and simpler integration with Cloudformation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c048cec63046" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Top SNS AWS design patterns]]></title>
            <link>https://medium.com/@TomKeeber/top-sns-aws-design-patterns-19b6acc82017?source=rss-2e70a7833675------2</link>
            <guid isPermaLink="false">https://medium.com/p/19b6acc82017</guid>
            <category><![CDATA[sqs]]></category>
            <category><![CDATA[sns]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[serverless-architecture]]></category>
            <dc:creator><![CDATA[Tom Keeber]]></dc:creator>
            <pubDate>Tue, 11 Dec 2018 15:50:16 GMT</pubDate>
            <atom:updated>2019-04-30T10:22:14.286Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8chNY_KhBnTX4_mF" /><figcaption>Photo by <a href="https://unsplash.com/@dnevozhai?utm_source=medium&amp;utm_medium=referral">Denys Nevozhai</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>SNS or Simple Notification Service is a AWS managed publish/subscribe topic. What does this mean? Well, in a nutshell means it you can publish messages to a SNS topic and configure multiple subscribers to read the same message. It’s an extremely powerful way of decoupling the producers and consumers of messages and removes the need to poll for new messages.</p><p>It’s also a great tool for fanning out messages to multiple places and provides various ways of integrating with different AWS components.</p><p>In this story I’m going to describe 3 key SNS patterns that can help you keep your systems loosely coupled, durable and flexible.</p><p>But first….</p><h4>A simple analogy for SNS</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*Oh0pqXVlYM92_2bXun0wHQ.jpeg" /></figure><p>Think of SNS as a megaphone where you as the speaker are giving a speech to a crowd of avid listeners. As you talk everyone in the crowd receives the same speech fanned out by the megaphone. All that is, apart from a few late comers who have completely missed the beginning of your speech. Well, you’re not going to repeat yourself for their benefit — so they’ll never hear what they missed.</p><p>In this analogy, you as the speaker are the publisher of messages to SNS Topic (the megaphone). The crowd who have turned up to listen to your speech (the messages) are the subscribers to the SNS Topic who all receive the same message. Once a message is published to the SNS Topic, if the subscriber is not listening at that point in time then they will not receive the message.</p><p>So let’s take a look at some of the architectural design patterns involving SNS and give some working examples. As with all my examples, we’ll be using Cloudformation/SAM and not the AWS console.</p><h3>Architectural pattern Number 1 — The Feedhandler</h3><p>Front a SNS Topic with a API Gateway to give the advantages of having a contract of a REST API with the scalability and loose coupling of a publish/subscribe mechanism.</p><p>You are effectively providing an REST-like integration mechanism as a publisher to SNS.</p><p>This is a great pattern for systems where you require an end point to post messages which can then be processed quickly and delivered to numerous systems while providing a familiar integration point — I.e. REST.</p><p>Here is a sample SAM configuration file. The SNS Topic is created in two line of configuration at the bottom of the file. The ‘x-amazon-apigateway-integration’ section specifies the POST messages from this Api gateway to the SNS topic.</p><blockquote>EDIT April 2019</blockquote><blockquote>I’ve found a limitation with the pattern above that means this cannot be applied in circumstances where you have payloads over 16kb.</blockquote><blockquote>This is because under the hood the integration between the gateway and the SNS is done by converting the message to a query string that tips us over a character limit edge. This is happening under the hood. <a href="https://docs.aws.amazon.com/sns/latest/api/API_Publish.html">https://docs.aws.amazon.com/sns/latest/api/API_Publish.html</a></blockquote><blockquote>I cannot find any documentation on this limitation in AWS.</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/13dd05eddd6d6c423c499eb80fc2034f/href">https://medium.com/media/13dd05eddd6d6c423c499eb80fc2034f/href</a></iframe><h3>Architectural pattern number 2 — Messaging Fanout</h3><p>You can combine SNS and SQS (Simple Queuing Service) together to provide flexibility, durability and parallel, asynchronous processing to your pipelines.</p><p>Whereas SNS Topic ‘push’ (publish) the same message one at a time to all its subscribers — Clients of SNS Queues ‘pull’ (poll) for messages — sometimes more than one message at a time. This means SNS Queues need to be asked for messages from a consumer.</p><p>The main advantage of this pattern is that SNS queues give you the durability to never miss a message — messages are persisted if no consumer is ready or available and you have options for configuring throttling and retries.</p><p>Just be aware that with this pattern you will introduce some latency due to the SQS polling mechanism. (Which you may want)</p><p>Here’s an example SAM template. Here we have one SNS topic (Stats Topics) and two SQS queues which will both receive the messages. As we do not have any consumers sent up for the queues the messages will stay on both queues for the durations of the message retention period.</p><p>The VisibilityTimeout and MessageRetentionPeriod are optional — defaults are around 4 days.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c0f8c8d17d1fdde94a0fe09511f30f2d/href">https://medium.com/media/c0f8c8d17d1fdde94a0fe09511f30f2d/href</a></iframe><p>You could then configure Lambdas (or whatever) to read from the SQS queues.</p><h3>Architectural pattern number 3 — SNS filtering</h3><p>Building on the Message fanout pattern. What do you do if you do not want all messages going to all subscribers? That is where filtering comes in.</p><p>This is great when you have a common attribute within the message payload that you can use to filter different messages to different SQS queues.</p><p>Here’s the example template file. In this example out message has an attribute called ‘statsType’. Only messages with a ‘statsType’ of ‘SomeStatsType’ will be sent to the StatsProcessQueue.</p><p>Note that the filter lives on the subscription not the subscriber.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/215c70ba39629bbbe5078f220c152b9b/href">https://medium.com/media/215c70ba39629bbbe5078f220c152b9b/href</a></iframe><p>Hope you enjoyed the brief tour of my favourite SNS patterns. If you have any suggestions for other i’ve missed then please comment below.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19b6acc82017" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>