<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Conor Shirren</title>
    <description>The latest articles on Forem by Conor Shirren (@conorshirren).</description>
    <link>https://forem.com/conorshirren</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F333432%2F0d7b4e15-73b8-4d9f-9729-2dea9a5855fc.png</url>
      <title>Forem: Conor Shirren</title>
      <link>https://forem.com/conorshirren</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/conorshirren"/>
    <language>en</language>
    <item>
      <title>Designing Event Driven Architectures</title>
      <dc:creator>Conor Shirren</dc:creator>
      <pubDate>Mon, 16 Jan 2023 15:20:48 +0000</pubDate>
      <link>https://forem.com/conorshirren/designing-event-driven-architectures-4f87</link>
      <guid>https://forem.com/conorshirren/designing-event-driven-architectures-4f87</guid>
      <description>&lt;h2&gt;
  
  
   Introduction
&lt;/h2&gt;

&lt;p&gt;Event-driven architecture (EDA) is a modern architecture pattern built from small, decoupled services that publish, consume, or route events.&lt;/p&gt;

&lt;p&gt;An event represents a change in state, or an update. For example: an item placed in a shopping cart, a file uploaded to a storage system, or an order becoming ready to ship. Events can either carry the state (such as the item name, price, or quantity in an order) or simply contain identifiers (for example, “order #8942 was shipped”) needed to look up related information.&lt;/p&gt;

&lt;p&gt;Unlike traditional request-driven models, EDA promotes loose coupling between producer and consumer services. This makes it easier to scale, update, and independently deploy separate components of a system.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a decoupled architecture important?
&lt;/h2&gt;

&lt;p&gt;Many organizations find that monolithic applications, databases, and technologies negatively impact innovation and improvement of the user experience. Legacy applications and databases reduce your options for adopting modern technology frameworks and constrain your competitiveness and innovation. However, when you modernize applications and their data stores, they become easier to scale and faster to develop.&lt;/p&gt;

&lt;p&gt;A decoupled data strategy improves fault tolerance and resiliency, which helps accelerate the time to market (TTM) for your new application features.&lt;/p&gt;

&lt;h2&gt;
  
  
  Benefits of an event-driven architecture
&lt;/h2&gt;

&lt;p&gt;Event-driven architecture (EDA) promotes loose coupling between components of a system, leading to greater agility. Microservices can scale independently, fail without impacting other services, and reduce the complexity of workflows. Events can be flexibly routed, buffered, and logged for auditing purposes. Push-based flows of events can operate in real time, cutting costs associated with creating and operating code that continuously polls systems for changes.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Scale and fail independently
&lt;/h3&gt;

&lt;p&gt;By decoupling services, components in an event-driven architecture can scale and fail independently, increasing the resiliency of an application. This becomes increasingly important as the number of integrations between services grows. If one service has a failure, the rest can keep running.&lt;/p&gt;

&lt;p&gt;Event-driven architecture can also make it easier to design near real-time systems, helping organizations move away from batch-based processing. Events are generated when an application state changes. As events scale up, so can the layer that processes the events.&lt;/p&gt;

&lt;p&gt;Events are typically published to messaging services that behave like an elastic buffer between microservices and help handle scaling. Events might also be sent to a router service that can filter and route messages based on the content of the event. As a result, event-based applications can be more scalable and offer greater redundancy than monolithic applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Develop with agility
&lt;/h3&gt;

&lt;p&gt;With event-driven architecture and event routers, developers no longer need to write custom code to poll, filter, and route events. An event router automatically filters and pushes events to consumers. The router also removes the need for heavy coordination between producer and consumer services, which increases developer agility.&lt;/p&gt;

&lt;p&gt;Event-driven architecture is push-based, meaning that everything happens on demand as events are sent to the router and downstream systems, without needing to inform dependent services. Because of this, infrastructure and resources can scale up and down with event volume, which reduces costs to process workloads and operate deployed applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Build extensible systems
&lt;/h3&gt;

&lt;p&gt;Event-driven architecture is also highly extensible. Other teams can extend features and add functionality without impacting the existing microservices. By publishing events, an application can integrate with existing systems—and future applications can integrate easily as event consumers—without changing the existing solution.&lt;/p&gt;

&lt;p&gt;Event producers have no knowledge of event consumers, so extending the system has less friction, and new features or integrations do not add dependencies that slow down future development.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Reduce module complexity
&lt;/h3&gt;

&lt;p&gt;Microservices enable developers and architects to decompose complex workflows. For example, they can break down an ecommerce monolith into order acceptance and payment processes with separate inventory, fulfillment, and accounting services.&lt;/p&gt;

&lt;p&gt;A workload that might be complex to manage and orchestrate in a monolith becomes a series of simple, decoupled services that are managed independently and communicate asynchronously through event messages.&lt;/p&gt;

&lt;p&gt;An event-driven approach makes it possible to assemble and orchestrate services that process data at different rates. In the following example, an order acceptance microservice interacts with a payment processing system via a queue.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works: example architecture
&lt;/h2&gt;

&lt;p&gt;Here's an example of an event-driven architecture for an e-commerce site. This architecture enables the site to react to changes from a variety of sources during times of peak demand, without crashing the application or over-provisioning resources.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4mupdn8t9x19a4cvxkhq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4mupdn8t9x19a4cvxkhq.png" alt="example-eda" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How does event-driven architecture (EDA) improve applications?
&lt;/h2&gt;

&lt;p&gt;Event-driven architecture (EDA) promotes loose coupling between components, which makes it a good approach to build modern, distributed applications.&lt;/p&gt;

&lt;p&gt;Event producers are unaware of, unconcerned by, and unburdened by any activity of downstream consumers of the events that they produce. The events themselves represent a change in state and may or may not contain data. Events are unaware of consequences of their existence. Consumers listen and process events of interest. You can bring new consumers online to provide new functionality without disrupting existing workflows.&lt;/p&gt;

&lt;p&gt;EDAs promote decomposition of monolithic systems into smaller domain models. Developers can get up to speed with less cognitive load and become productive quicker. When critical functions are decoupled, there is also less risk to deploy updates and new features.&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>react</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>What is Humane Tech? 🪴</title>
      <dc:creator>Conor Shirren</dc:creator>
      <pubDate>Sun, 15 Jan 2023 17:43:34 +0000</pubDate>
      <link>https://forem.com/conorshirren/what-is-humane-tech-k9n</link>
      <guid>https://forem.com/conorshirren/what-is-humane-tech-k9n</guid>
      <description>&lt;h2&gt;
  
  
   Introduction
&lt;/h2&gt;

&lt;p&gt;Whether we like it or not, a significant amount of the technology we use is exploitative to some degree. Humane tech is an idea that aims to shift the focus to creating socially-responsible technology that doesn’t exploit the user. It’s a noble idea, and one that becomes more important as our dependence on various forms of tech increases.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Center for Humane Technology
&lt;/h2&gt;

&lt;p&gt;The Center for Humane Technology (CHT) was co-founded by Tristan Harris (you may know him from the Netflix show &lt;strong&gt;&lt;em&gt;The Social Dilemma&lt;/em&gt;&lt;/strong&gt;), who previously pushed the ‘Time Well Spent’ movement after originally working for Google, where he produced an internal presentation in 2013 entitled “A Call to Minimize Distraction &amp;amp; Respect Users’ Attention”. Along with Google, he namechecked Apple and Facebook, highlighting their responsibilities to their users.&lt;/p&gt;

&lt;p&gt;While the CHT freely admits that benefits do derive from social media and mobile tech to some degree, they also bring up various issues that have begun to affect society on a wider scale. These include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Digital Addiction&lt;/strong&gt;: Many people are addicted to technology, with digital slot machines compounding the issue.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Mental Health&lt;/strong&gt;: Digital addiction and increased social media use can have a negative impact on mental health.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Breakdown of Truth&lt;/strong&gt;: It’s becoming harder to tell what’s real and what isn’t, especially if spending a lot of time online.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Polarisation&lt;/strong&gt;: Has it become more difficult to co-operate with others due to polarising online ideologies?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Political Manipulation&lt;/strong&gt;: This is caused either by creating rifts and sowing seeds of doubt, or by people directly impacting elections themselves.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Superficiality&lt;/strong&gt;: By focusing on looks and likes, have we become more superficial?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These issues indicate a “mismatch between our natural human sensitivities and the exponentially growing power of technology”, a problem likely to escalate in future. &lt;/p&gt;

&lt;p&gt;The CHT provide a free, self-paced online course for professionals that are shaping tomorrow's technology. This course can be be found &lt;a href="https://www.humanetech.com/course"&gt;here&lt;/a&gt; , and I would highly recommend that you check it out for yourself. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0Oh7Gw2y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4891ktou5d5cv31ru0k7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0Oh7Gw2y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4891ktou5d5cv31ru0k7.png" alt="course" width="880" height="483"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Instead of exploiting our vulnerabilities, there are endless ways in which tech could be used to improve society, as well as our overall quality of life. It’s still a small movement, but hopefully humane tech will continue to grow!&lt;/p&gt;

</description>
      <category>humanetech</category>
      <category>software</category>
      <category>technology</category>
    </item>
    <item>
      <title>Demystifying AWS Lambda Functions</title>
      <dc:creator>Conor Shirren</dc:creator>
      <pubDate>Sat, 14 Jan 2023 20:54:19 +0000</pubDate>
      <link>https://forem.com/conorshirren/demystifying-aws-lambda-functions-92d</link>
      <guid>https://forem.com/conorshirren/demystifying-aws-lambda-functions-92d</guid>
      <description>&lt;h2&gt;
  
  
  Introduction 👋
&lt;/h2&gt;

&lt;p&gt;In the previous blog post of this series, I introduced the concept of the serverless mindset, and how adopting serverless could best suit you and your company's needs. In this blog post, I'm going to dive a little deeper into AWS Lambda, which is at the core of AWS Serverless. &lt;/p&gt;

&lt;h2&gt;
  
  
  What is AWS Lambda?
&lt;/h2&gt;

&lt;p&gt;AWS Lambda is a compute service. You can use it to run code without provisioning or managing servers. Lambda runs your code on a high-availability compute infrastructure. It operates and maintains all of the compute resources, including server and operating system maintenance, capacity provisioning and automatic scaling, code monitoring, and logging. With Lambda, you can run code for almost any type of application or backend service. &lt;/p&gt;

&lt;p&gt;Some benefits of using Lambda include the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can run code without provisioning or maintaining servers.&lt;/li&gt;
&lt;li&gt;It initiates functions for you in response to events.&lt;/li&gt;
&lt;li&gt;It scales automatically.&lt;/li&gt;
&lt;li&gt;It provides built-in code monitoring and logging via Amazon CloudWatch.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  AWS Lambda Features
&lt;/h2&gt;

&lt;p&gt;The following the six main features of AWS Lambda:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You can write the code for Lambda using languages you already know and are comfortable using. Development in Lambda is not tightly coupled to AWS, so you can easily port code in and out of AWS.&lt;/li&gt;
&lt;li&gt;Within your Lambda function, you can do anything traditional applications can do, including calling an AWS SDK or invoking a third-party API, whether on AWS, in your datacenter, or on the internet.&lt;/li&gt;
&lt;li&gt;Instead of scaling by adding servers, Lambda scales in response to events. You configure memory settings and AWS handles details such as CPU, network, and I/O throughput.&lt;/li&gt;
&lt;li&gt;The lambda permission model uses AWS IAM (Identity &amp;amp; Access Management to securely grant access to the desired resources and provide fine-grained control to invoke your functions.&lt;/li&gt;
&lt;li&gt;Because Lambda is a fully managed service, high availability and fault tolerance are built into the service without needing to perform any additional configuration.&lt;/li&gt;
&lt;li&gt;Lambda functions only run when you initiate them. You pay only for the compute time that you consume. When the code is invoked, you are billed in 1-millisecond (ms) increments.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What is a Lambda Function?
&lt;/h2&gt;

&lt;p&gt;The code you run on AWS Lambda is called a Lambda function. Think of a function as a small, self-contained application. After you create your Lambda function, it is ready to run as soon as it is initiated. Each function includes your code as well as some associated configuration information, including the function name and resource requirements. Lambda functions are stateless, with no affinity to the underlying infrastructure. Lambda can rapidly launch as many copies of the function as needed to scale to the rate of incoming events.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F30j1wmvv2tma2ezue8a6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F30j1wmvv2tma2ezue8a6.png" alt="lambda arch" width="800" height="616"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After you upload your code to AWS Lambda, you can configure an event source, such as an Amazon Simple Storage Service (Amazon S3) event, Amazon DynamoDB stream, Amazon Kinesis stream, or Amazon Simple Notification Service (Amazon SNS) notification. When the resource changes and an event is initiated, Lambda will run your function and manage the compute resources as needed to keep up with incoming requests.&lt;/p&gt;

&lt;h2&gt;
  
  
  How AWS Lambda Works
&lt;/h2&gt;

&lt;p&gt;To understand event driven architectures like AWS Lambda, you need to understand the events themselves. This section dives in to how events initiate functions to invoke the code within. &lt;/p&gt;

&lt;h3&gt;
  
  
  Invocation models for running Lambda functions
&lt;/h3&gt;

&lt;p&gt;Event sources can invoke a Lambda function in three general patterns. These patterns are called invocation models. Each invocation model is unique and addresses a different application and developer needs. The invocation model you use for your Lambda function often depends on the event source you are using. It's important to understand how each invocation model initializes functions and handles errors and retries.&lt;br&gt;
There are three different invocation models for AWS lambda functions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Synchronous invocation&lt;/li&gt;
&lt;li&gt;Asynchronous invocation&lt;/li&gt;
&lt;li&gt;Polling invocation&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Synchronous invocation
&lt;/h4&gt;

&lt;p&gt;When you invoke a function synchronously, Lambda runs the function and waits for a response. When the function completes, Lambda returns the response from the function's code with additional data, such as the version of the function that was invoked. Synchronous events expect an immediate response from the function invocation. &lt;/p&gt;

&lt;p&gt;With this model, there are no built-in retries. You must manage your retry strategy within your application code.&lt;/p&gt;

&lt;p&gt;The following diagram shows clients invoking a Lambda function synchronously. Lambda sends the events directly to the function and sends the function response directly back to the invoker. &lt;/p&gt;

&lt;h4&gt;
  
  
  Asynchronous invocation
&lt;/h4&gt;

&lt;p&gt;When you invoke a function asynchronously, events are queued and the requestor doesn't wait for the function to complete. This model is appropriate when the client doesn't need an immediate response. &lt;/p&gt;

&lt;p&gt;With the asynchronous model, you can make use of destinations. Use destinations to send records of asynchronous invocations to other services. (Select the Destinations tab for more information.)&lt;/p&gt;

&lt;p&gt;The following diagram shows clients invoking a Lambda function asynchronously. Lambda queues events before sending them to the function.&lt;/p&gt;

&lt;h4&gt;
  
  
  Polling invocation
&lt;/h4&gt;

&lt;p&gt;This invocation model is designed to integrate with AWS streaming and queuing based services with no code or server management. Lambda will poll (or watch) these services, retrieve any matching events, and invoke your functions. This invocation model supports the following services:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Amazon Kinesis&lt;/li&gt;
&lt;li&gt;Amazon SQS&lt;/li&gt;
&lt;li&gt;Amazon DynamoDB Streams
With this type of integration, AWS will manage the poller on your behalf and perform synchronous invocations of your function. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With this model, the retry behavior varies depending on the event source and its configuration.&lt;/p&gt;

&lt;h3&gt;
  
  
  Invocation model error behavior
&lt;/h3&gt;

&lt;p&gt;When deciding how to build your functions, consider how each invocation method handles errors. The following chart provides a quick outline of the error handling behaviour of each invocation model.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F154vpq9u0oelnu7q8303.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F154vpq9u0oelnu7q8303.png" alt="invocation error" width="800" height="347"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Performance optimisation
&lt;/h2&gt;

&lt;p&gt;Serverless applications can be extremely performant, thanks to the ease of parallelisation and concurrency. While the Lambda service manages scaling automatically, you can optimise the individual Lambda functions used in your application to reduce latency and increase throughput. &lt;/p&gt;

&lt;h3&gt;
  
  
  Cold and warm starts
&lt;/h3&gt;

&lt;p&gt;A cold start occurs when a new execution environment is required to run a Lambda function. When the Lambda service receives a request to run a function, the service first prepares an execution environment. During this step, the service downloads the code for the function, then creates the execution environment with the specified memory, runtime, and configuration. Once complete, Lambda runs any initialisation code outside of the event handler before finally running the handler code. &lt;/p&gt;

&lt;p&gt;In a warm start, the Lambda service retains the environment instead of destroying it immediately. This allows the function to run again within the same execution environment. This saves time by not needing to initialise the environment.  &lt;/p&gt;

&lt;h3&gt;
  
  
  Reducing cold starts with Provisioned Concurrency
&lt;/h3&gt;

&lt;p&gt;If you need predictable function start times for your workload, Provisioned Concurrency is the recommended solution to ensure the lowest possible latency. This feature keeps your functions initialsed and warm, ready to respond in double-digit milliseconds at the scale you provision. Unlike on-demand Lambda functions, this means that all setup activities happen ahead of invocation, including running the initialisation code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion 💡
&lt;/h2&gt;

&lt;p&gt;In this post we covered a lot of content on what AWS Lambda is, how it can be used, and some best practices when doing so. &lt;/p&gt;

&lt;p&gt;Although there is a whole lot more to serverless than just lambda functions, it really is at the core of AWS Serverless and an understanding of how you can utilise lambdas in your architecture design is crucial to your adoption of the serverless-first mindset.&lt;/p&gt;

&lt;p&gt;In further blog posts in this series, I will dive into some other AWS services that you can use in your serverless journey, as well as showing you just how easy it is to get set up and start building lambda functions for yourself!&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>Getting Into the Serverless Mindset</title>
      <dc:creator>Conor Shirren</dc:creator>
      <pubDate>Fri, 13 Jan 2023 14:45:27 +0000</pubDate>
      <link>https://forem.com/conorshirren/getting-into-the-serverless-mindset-pm1</link>
      <guid>https://forem.com/conorshirren/getting-into-the-serverless-mindset-pm1</guid>
      <description>&lt;h2&gt;
  
  
  Introduction 👋
&lt;/h2&gt;

&lt;p&gt;In chapter one of the AWS Serverless Learning Path, you will be introduced to the key concepts of the AWS Serverless Platform, as well as discussing a little bit about the differences between traditional infrastructure designs and serverless architectures. &lt;/p&gt;

&lt;h2&gt;
  
  
  The Familiar Architecture 👴🏻
&lt;/h2&gt;

&lt;p&gt;Let us take a look at a very simple web service that most devs would be familiar with: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a simple client&lt;/li&gt;
&lt;li&gt;an EC2 Instance to host the service&lt;/li&gt;
&lt;li&gt;a database to persist data&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzfcuvpieyppxc8cv8mo3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzfcuvpieyppxc8cv8mo3.png" alt="simple service" width="800" height="232"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In a scenario where your service starts gaining traction, and you need to scale up to handle the traffic you are receiving, you would need to do something like the following:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo5jcysjhjxt4e7rf3lmv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo5jcysjhjxt4e7rf3lmv.png" alt="scaling services" width="800" height="470"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To handle the load in this traditional architecture, you would need to horizontally scale your EC2 instances to handle requests and use a load balancer to divert traffic.&lt;/p&gt;

&lt;p&gt;This option will work fine, although you now have an issue with cost management. You might get more traffic midday during the week than you do in the middle of the night on a weekend for instance, and with the current architecture you have to provision for your peak load and continue to pay for those servers even when they are idle.&lt;/p&gt;

&lt;p&gt;But in a cloud environment, this problem is easy enough to solve. You can simply add an Auto Scaling group to automatically provision and terminate instances based on your application’s traffic patterns. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F00oklxj2gqqi76qznj3u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F00oklxj2gqqi76qznj3u.png" alt="autoscale" width="800" height="521"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So now you can handle all the traffic when your service is under heavy load, but minimize your costs when it’s not getting as much traffic. Now, in addition to elastically scaling your app, you probably also want to ensure it’s highly available and fault tolerant.&lt;/p&gt;

&lt;p&gt;You want to make sure that you’re spreading your instances across multiple availability zones in order to ensure that, even if there's a failure of a single data center, your users will still be able to access your service. This is also easy to implement. You just make sure the load balancer and auto scaling group are configured to spread your instances across availability zones. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzebq4giutn5t5hg68kig.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzebq4giutn5t5hg68kig.png" alt="hahs" width="800" height="521"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So now you’ve got a highly available architecture that elastically scales to handle your peak traffic load while still saving costs during off-peak hours. This is a very, very common architecture that's been successfully deployed thousands of times by many different companies. &lt;/p&gt;

&lt;p&gt;However, there are multiple things that you as an application architect or developer need to be concerned with when you build and operate a system like this.&lt;/p&gt;

&lt;h2&gt;
  
  
  Introducing the Serverless Architecture 🙌🏽
&lt;/h2&gt;

&lt;p&gt;If you take a look at the list below, I have outlined some of the concerns that a developer would have to consider when building out the architecture in the previous section:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvkdpi8insk36bus2rzor.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvkdpi8insk36bus2rzor.png" alt="concerns" width="800" height="373"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What’s interesting about this list on the right is that the best practices for how to handle these are very, very similar across companies. There's very little that’s business specific about how you would approach most of these issues. &lt;/p&gt;

&lt;p&gt;And this is exactly the kind of &lt;em&gt;undifferentiated lifting&lt;/em&gt; that can be offloaded to AWS allowing you to focus more on the things that are unique to your particular business.&lt;/p&gt;

&lt;p&gt;This is really the driving force behind the AWS serverless platform.&lt;/p&gt;

&lt;p&gt;Lets take a look at how you could rearchitect this service using the serverless mindset. Looking at the image below it can be broken down into three simple phases&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a client invocation&lt;/li&gt;
&lt;li&gt;some form of business logic being applied to that request&lt;/li&gt;
&lt;li&gt;a data store to persist information from the request&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdimicq2ild88h7n401js.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdimicq2ild88h7n401js.png" alt="rethinking" width="800" height="244"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To look at this through a serverless lens, it could look something like this: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxspa3my8tojcroljqbjj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxspa3my8tojcroljqbjj.png" alt="serverless" width="800" height="287"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the the source of the event (in our case, a HTTP request from a client)&lt;/li&gt;
&lt;li&gt;a lambda function which we will use to execute our business logic&lt;/li&gt;
&lt;li&gt;a dynamodb which we will use to persist request data (this could also be replaced with a call to another API or service) &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this architecture, all of the concerns around cost, scalability, and availability are offloaded to AWS through the use of their serverless services. We as developers can focus on what matters, the application code and core business logic. Both the lambda and dynamodb will automatically scale to handle load during peak hours, as well as being fault tolerant across availability zone (spread across different AWS data centres that are separately geographical). As well as this, lambda uses a pay-per-execution pricing model which means we do not pay for idle-server time during off-peak hours. &lt;/p&gt;

&lt;p&gt;This is just one of many examples of where we can use AWS Serverless services to offload undifferentiated heavy lifting to AWS, some of which I will discuss as part of further bog posts in this series. &lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion 💡
&lt;/h2&gt;

&lt;p&gt;In this post we briefly introduced some of the core concepts of serverless, and why it might be beneficial to consider rearchitecting your systems to make use of its many advantages. Some of these include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No need to provision or manage servers&lt;/li&gt;
&lt;li&gt;Automatic scaling&lt;/li&gt;
&lt;li&gt;Pay-per-execution pricing model&lt;/li&gt;
&lt;li&gt;Reduced operational costs&lt;/li&gt;
&lt;li&gt;High availability and fault tolerance&lt;/li&gt;
&lt;li&gt;Easy integration with other AWS services&lt;/li&gt;
&lt;li&gt;Shortened development and deployment cycles&lt;/li&gt;
&lt;li&gt;Improved security&lt;/li&gt;
&lt;li&gt;Increased developer productivity&lt;/li&gt;
&lt;li&gt;Flexibility in building and deploying applications&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Although I have only discussed a couple of these benefits in this post, I plan to dive deeper into why Serverless-First is the way forward in 2023, stay tuned! &lt;/p&gt;

</description>
      <category>cryptocurrency</category>
      <category>blockchain</category>
      <category>security</category>
      <category>discuss</category>
    </item>
    <item>
      <title>The AWS Serverless Badge</title>
      <dc:creator>Conor Shirren</dc:creator>
      <pubDate>Tue, 10 Jan 2023 08:23:35 +0000</pubDate>
      <link>https://forem.com/conorshirren/the-aws-serverless-badge-2j69</link>
      <guid>https://forem.com/conorshirren/the-aws-serverless-badge-2j69</guid>
      <description>&lt;h2&gt;
  
  
  Introduction 👋
&lt;/h2&gt;

&lt;p&gt;Amazon Web Services recently announced at Re:Invent an all-new way to demonstrate your AWS Serverless knowledge and skills with a verifiable, digital badge.&lt;/p&gt;

&lt;p&gt;This Serverless Learning Plan has been designed to help you get started building with Serverless technology. AWS experts designed the content to provide a clear learning path to help you develop the skills you need quickly (and best of all, it's completely free!).&lt;/p&gt;

&lt;p&gt;Over the holiday period I decided to take some time to sit down and complete the AWS provided learning path and I am happy to say that I received my AWS Serverless Skill Builder Badge from AWS, which you can view &lt;a href="https://www.credly.com/badges/d9e68b83-fc11-4365-a172-2d61333867de/public_url" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flnwwqtdwwbfqdrnb33es.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flnwwqtdwwbfqdrnb33es.png" alt="AWS Certificate" width="800" height="560"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Course 📚
&lt;/h2&gt;

&lt;p&gt;This learning plan consists of the following chapters:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Getting into the Serverless Mindset&lt;/li&gt;
&lt;li&gt;AWS Lambda Foundations&lt;/li&gt;
&lt;li&gt;Designing Event-Driven Architectures&lt;/li&gt;
&lt;li&gt;Architecting Serverless Apps&lt;/li&gt;
&lt;li&gt;Scaling Serverless Apps&lt;/li&gt;
&lt;li&gt;Deploying Serverless Apps&lt;/li&gt;
&lt;li&gt;Amazon API Gateway for Serverless Apps&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Most of the sections take around 1-2 hours of both written and video content so a good size to set yourself a goal of one per day or weekend etc.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Exam 📝
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyrcfk7tl5jtky96eukio.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyrcfk7tl5jtky96eukio.png" alt="exam result" width="800" height="397"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To obtain your serverless badge from &lt;a href="https://info.credly.com/" rel="noopener noreferrer"&gt;Credly&lt;/a&gt;, you will need to complete the assessment at the end of the learning path with a passing score of 80%. The exam consists of 50 multiple choice questions which you have unlimited time to answer (you may also save your progress and resume the exam at a later time).&lt;br&gt;
One thing to keep in mind is that if you fail an attempt, you must wait 24 hours before you can reattempt the exam. Thankfully, you have unlimited attempts so use these 24 hours to your advantage and do some revision on the areas of the assessment that let you down (at the end of a failed exam, you are not shown which questions you failed on, but you are provided with some guidance on chapters you should focus on).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnr0wh3npt4nx4xbosrrj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnr0wh3npt4nx4xbosrrj.png" alt="question guidance" width="800" height="280"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion 💡
&lt;/h2&gt;

&lt;p&gt;Overall I think the Serverless Learning Plan is a fantastic way to dive right into the serverless mind sight. Whether you're already an AWS Solutions Architect or a Cloud Newbie, this course will walk through a lot of the architect and design best practices that most official documentation just doesn't cover.&lt;/p&gt;

&lt;p&gt;Over the next few weeks I will be continuing to publish blog posts that delve into each chapter provided by this course, so please stay tuned 🤠🚀  &lt;/p&gt;

</description>
      <category>java</category>
      <category>c</category>
      <category>cpp</category>
      <category>python</category>
    </item>
  </channel>
</rss>
