JFokus: Cubes, Hexagons, Triangles, and More: Understanding MicroservicesChris Richardson
The microservice architecture is becoming increasing important. But what is it exactly? Why should you care about microservices? And, what do you need to do to ensure that your organization uses the microservice architecture successfully? In this talk, I’ll answer these and other questions using shapes as visual metaphors. You will learn about the motivations for the microservice architecture and why simply adopting microservices is insufficient. I describe essential characteristics of microservices, You will learn how a successful microservice architecture consist of loosely coupled services with stable APIs that communicate asynchronous. I will cover strategies for effectively testing microservices.
This document discusses building the data lakehouse, a new data architecture that combines the best of data warehouses and data lakes. It introduces the concept of the data lakehouse and compares it to traditional data warehouses and data lakes. The data lakehouse stores all types of data in an open, cloud-based environment and uses machine learning and analytics to deliver insights. It provides a single platform for various users and workloads, from data engineering to data science.
This Presentation is about NoSQL which means Not Only SQL. This presentation covers the aspects of using NoSQL for Big Data and the differences from RDBMS.
Introduction to JIRA & Agile Project ManagementDan Chuparkoff
This document provides an introduction to using JIRA for agile project management. It discusses key concepts like defining tasks, estimating task effort in story points, and using JIRA's agile tools like boards and burndowns. Screenshots show how to create and manage tasks in JIRA's different modes for Scrum and Kanban workflows.
This presentation describes systematic, repeatable and co-ordinated approach to agile solution architecture and design. It is intended to describe a set of practical steps and activities embedded within a framework to allow an agile method to be adopted and used for solution design and delivery. This approach ensures consistency in the assessment of solution design options and in subsequent solution design and solution delivery activities. This process leads to the rapid design and delivery of realistic and achievable solutions that meet real solution consumer needs. The approach provides for effective solution decision-making. It generates options and results quickly and consistently. Implementing a framework such as this provides for the creation of a knowledgebase of previous solution design and delivery exercises that leads to an accumulated body of knowledge within the organisation.
Postman is an API development tool that allows users to design, manage, run, test, document, and share APIs. It provides features like request building, documentation, environments, test automation, and collaboration. Alternatives include Paw, Insomnia, command line tools like cURL, and services from Apigee and Apiary. The document recommends using any tool that helps share APIs, especially for complex projects and team collaboration.
An event-driven architecture consists of event producers that generate event streams and event consumers that listen for events. It allows for loose coupling between components and asynchronous event handling. Key aspects include publish/subscribe messaging patterns, event processing by middleware, and real-time or near real-time information flow. Benefits include scalability, loose coupling, fault tolerance, and the ability to add new consumers easily. Challenges include guaranteed delivery, processing events in order or exactly once across multiple consumer instances. Common tools used include Apache Kafka, Apache ActiveMQ, Redis, and Apache Pulsar.
Fred George describes his personal journey discovering microservice architecture over 15 years working on large software projects. He details how his projects evolved from monolithic 1 million line applications to small, independent services. This allowed for improved agility, with services being short-lived and able to deploy several times a day. George also discusses challenges faced and lessons learned around loosely coupling services, managing data across services, and establishing practices for a "living software" system with continuous deployment of services.
This document provides an overview of Docker concepts including containers, images, Dockerfiles, and the Docker architecture. It defines key Docker terms like images, containers, and registries. It explains how Docker utilizes Linux kernel features like namespaces and control groups to isolate containers. It demonstrates how to run a simple Docker container and view logs. It also describes the anatomy of a Dockerfile and common Dockerfile instructions like FROM, RUN, COPY, ENV etc. Finally, it illustrates how Docker works by interacting with the Docker daemon, client and Docker Hub registry to build, run and distribute container images.
This document discusses Redis, MongoDB, and Amazon DynamoDB. It begins with an overview of NoSQL databases and the differences between SQL and NoSQL databases. It then covers Redis data types like strings, hashes, lists, sets, sorted sets, and streams. Examples use cases for Redis are also provided like leaderboards, geospatial queries, and message queues. The document also discusses MongoDB design patterns like embedding data, embracing duplication, and relationships. Finally, it provides a high-level overview of DynamoDB concepts like tables, items, attributes, and primary keys.
To view recording of this webinar please use below URL:
http://wso2.com/library/webinars/2015/09/event-driven-architecture/
Enterprise systems today are moving towards being dynamic where change has become the norm rather than the exception. Such systems need to be loosely coupled, autonomous, versatile and adaptive. There arises the need to model such systems, and event driven architecture (EDA) is how such systems can be modelled and explained.
This webinar will discuss
The basics of EDA
How it can benefit your enterprise
How the WSO2 product stack complements this architectural pattern
The presentation from our online webinar "Design patterns for microservice architecture".
Full video from webinar available here: https://www.youtube.com/watch?v=826aAmG06KM
If you’re a CTO or a Lead Developer and you’re planning to design service-oriented architecture, it’s definitely a webinar tailored to your needs. Adrian Zmenda, our Lead Dev, will explain:
- when microservice architecture is a safe bet and what are some good alternatives
- what are the pros and cons of the most popular design patterns (API Gateway, Backend for Frontend and more)
- how to ensure that the communication between services is done right and what to do in case of connection issues
- why we’ve decided to use a monorepo (monolithic repository)
- what we’ve learned from using the remote procedure call framework gRPC
- how to monitor the efficiency of individual services and whole SOA-based systems.
This document discusses microservices architecture and related concepts. It begins with an overview of microservices compared to earlier SOA approaches. Key aspects of microservices covered include developing single applications as independent services, common misconceptions, principles like single responsibility, and defining appropriate service boundaries. The document also discusses messaging approaches in microservices including REST, gRPC, and asynchronous messaging. Other sections cover organizing microservices, deployment, security, data management, governance, bridging monolithic and microservice systems, and implementing a service mesh.
CQRS and Event Sourcing, An Alternative Architecture for DDDDennis Doomen
Most of us will be familiar with the standard 3- or 4-layer architecture you often see in larger enterprise systems. Some are already practicing Domain Driven Design and work together with the business to clarify the domain concepts. Perhaps you’ve noticed that is difficult to get the intention of the 'verbs' from that domain into this standard architecture. If performance is an important requirement as well, then you might have discovered that an Object-Relational Mapper and a relational database are not always the best solution.
One of the main reasons for this is the fact that the interests of a consistent domain that takes into account the many business rules, and those of data reporting and presentation are conflicting. That’s why Betrand Meyer introduced the Command Query Separation principle.
An architecture based on this principle combined with the Event Sourcing concept provides the ideal architecture for building high-performance systems designed using DDD. Well-known bloggers like Udi Dahan and Greg Young have already spent quite a lot of of posts on this, and this year’s Developer Days had some coverage as well.
But how do you build such a system with the. NET framework? Is it really as complex as some claim, or is just different work?
Building Cloud-Native App Series - Part 2 of 11
Microservices Architecture Series
Event Sourcing & CQRS,
Kafka, Rabbit MQ
Case Studies (E-Commerce App, Movie Streaming, Ticket Booking, Restaurant, Hospital Management)
SCS 4120 - Software Engineering IV
BACHELOR OF SCIENCE HONOURS IN COMPUTER SCIENCE
BACHELOR OF SCIENCE HONOURS IN SOFTWARE ENGINEERING
All in One Place Lecture Notes
Distribution Among Friends Only
All copyrights belong to their respective owners
Viraj Brian Wijesuriya
[email protected]
API Gateways are the well suited service for microservices architecture. It provides many security and performance related features along with reliability of the system. These slides explains what is API Gateway. What is microservices architecture, its benefits and how API Gateway empower this architecture. Further more API Gateway aggregation is explained with an example.
The document provides an overview of microservices architecture. It discusses key characteristics of microservices such as each service focusing on a specific business capability, decentralized governance and data management, and infrastructure automation. It also compares microservices to monolithic and SOA architectures. Some design styles enabled by microservices like domain-driven design, event sourcing, and functional reactive programming are also covered at a high level. The document aims to introduce attendees to microservices concepts and architectures.
Azure vidyapeeth -Introduction to Azure Container Service & Registry ServiceIlyas F ☁☁☁
This document provides an introduction to Azure Container Service and Azure Container Registry. It discusses what containers are and how they provide operating system virtualization. It defines container orchestrators and explains how they manage containerized applications across machine fleets. It also describes what a container registry is and how it stores container images. Finally, it lists some Azure services for developing containerized applications and provides contact information for the presenter.
The document discusses Microservices architecture and compares it to monolithic architecture. It covers topics like infrastructure for Microservices including API gateways, service discovery, event buses. It also discusses design principles like domain-driven design, event sourcing and CQRS. Microservices are presented as a better approach as they allow independent deployments, scale independently and use multiple programming languages compared to monolithic applications.
In this session, we will show how to simplify the deployment, management, and operations of Kubernetes using Azure Container Service (AKS). We will demonstrate how to use Brigade - a framework for scripting together multiple tasks and executing them inside of containers and Kashti - an open source reporting dashboard web interface to easily manage and visualize their Brigade events and projects through a web browser. Additionally, we will provide comparisons of the wide variety of tools in the Kubernetes ecosystem for CI/CD, observability, storage and networking.
- Microservices advocate creating a system from small, isolated services that each own their data and are independently scalable and resilient. They are inspired by biological cells that are small, single-purpose, and work together through messaging.
- The system is divided using a divide and conquer approach, decomposing it into discrete subsystems that communicate over well-defined protocols. Each microservice focuses on a single business capability and owns its own data and behavior.
- Microservices communicate asynchronously through APIs and events to maintain independence and isolation, which enables continuous delivery, failure resilience, and independent scaling of each service.
The document discusses microservices architecture and monolithic architecture. It defines microservices as an architectural style where applications are composed of small, independent services that communicate over well-defined APIs. This allows for independent deployability and scalability of individual services. The document contrasts this with monolithic architecture, which packages an entire application into a single deployable unit with tight coupling between components.
MicroserviceArchitecture in detail over Monolith.PLovababu
This document discusses microservices architecture as an alternative to monolithic architecture. It defines microservices as independently deployable services that communicate through lightweight mechanisms like HTTP APIs. The document outlines benefits of microservices like independent scalability, easier upgrades, and improved developer productivity. It also discusses prerequisites for microservices like rapid provisioning, monitoring, and continuous deployment. Examples of microservices frameworks and a demo application using Spring Boot are provided.
An event-driven architecture consists of event producers that generate event streams and event consumers that listen for events. It allows for loose coupling between components and asynchronous event handling. Key aspects include publish/subscribe messaging patterns, event processing by middleware, and real-time or near real-time information flow. Benefits include scalability, loose coupling, fault tolerance, and the ability to add new consumers easily. Challenges include guaranteed delivery, processing events in order or exactly once across multiple consumer instances. Common tools used include Apache Kafka, Apache ActiveMQ, Redis, and Apache Pulsar.
Fred George describes his personal journey discovering microservice architecture over 15 years working on large software projects. He details how his projects evolved from monolithic 1 million line applications to small, independent services. This allowed for improved agility, with services being short-lived and able to deploy several times a day. George also discusses challenges faced and lessons learned around loosely coupling services, managing data across services, and establishing practices for a "living software" system with continuous deployment of services.
This document provides an overview of Docker concepts including containers, images, Dockerfiles, and the Docker architecture. It defines key Docker terms like images, containers, and registries. It explains how Docker utilizes Linux kernel features like namespaces and control groups to isolate containers. It demonstrates how to run a simple Docker container and view logs. It also describes the anatomy of a Dockerfile and common Dockerfile instructions like FROM, RUN, COPY, ENV etc. Finally, it illustrates how Docker works by interacting with the Docker daemon, client and Docker Hub registry to build, run and distribute container images.
This document discusses Redis, MongoDB, and Amazon DynamoDB. It begins with an overview of NoSQL databases and the differences between SQL and NoSQL databases. It then covers Redis data types like strings, hashes, lists, sets, sorted sets, and streams. Examples use cases for Redis are also provided like leaderboards, geospatial queries, and message queues. The document also discusses MongoDB design patterns like embedding data, embracing duplication, and relationships. Finally, it provides a high-level overview of DynamoDB concepts like tables, items, attributes, and primary keys.
To view recording of this webinar please use below URL:
http://wso2.com/library/webinars/2015/09/event-driven-architecture/
Enterprise systems today are moving towards being dynamic where change has become the norm rather than the exception. Such systems need to be loosely coupled, autonomous, versatile and adaptive. There arises the need to model such systems, and event driven architecture (EDA) is how such systems can be modelled and explained.
This webinar will discuss
The basics of EDA
How it can benefit your enterprise
How the WSO2 product stack complements this architectural pattern
The presentation from our online webinar "Design patterns for microservice architecture".
Full video from webinar available here: https://www.youtube.com/watch?v=826aAmG06KM
If you’re a CTO or a Lead Developer and you’re planning to design service-oriented architecture, it’s definitely a webinar tailored to your needs. Adrian Zmenda, our Lead Dev, will explain:
- when microservice architecture is a safe bet and what are some good alternatives
- what are the pros and cons of the most popular design patterns (API Gateway, Backend for Frontend and more)
- how to ensure that the communication between services is done right and what to do in case of connection issues
- why we’ve decided to use a monorepo (monolithic repository)
- what we’ve learned from using the remote procedure call framework gRPC
- how to monitor the efficiency of individual services and whole SOA-based systems.
This document discusses microservices architecture and related concepts. It begins with an overview of microservices compared to earlier SOA approaches. Key aspects of microservices covered include developing single applications as independent services, common misconceptions, principles like single responsibility, and defining appropriate service boundaries. The document also discusses messaging approaches in microservices including REST, gRPC, and asynchronous messaging. Other sections cover organizing microservices, deployment, security, data management, governance, bridging monolithic and microservice systems, and implementing a service mesh.
CQRS and Event Sourcing, An Alternative Architecture for DDDDennis Doomen
Most of us will be familiar with the standard 3- or 4-layer architecture you often see in larger enterprise systems. Some are already practicing Domain Driven Design and work together with the business to clarify the domain concepts. Perhaps you’ve noticed that is difficult to get the intention of the 'verbs' from that domain into this standard architecture. If performance is an important requirement as well, then you might have discovered that an Object-Relational Mapper and a relational database are not always the best solution.
One of the main reasons for this is the fact that the interests of a consistent domain that takes into account the many business rules, and those of data reporting and presentation are conflicting. That’s why Betrand Meyer introduced the Command Query Separation principle.
An architecture based on this principle combined with the Event Sourcing concept provides the ideal architecture for building high-performance systems designed using DDD. Well-known bloggers like Udi Dahan and Greg Young have already spent quite a lot of of posts on this, and this year’s Developer Days had some coverage as well.
But how do you build such a system with the. NET framework? Is it really as complex as some claim, or is just different work?
Building Cloud-Native App Series - Part 2 of 11
Microservices Architecture Series
Event Sourcing & CQRS,
Kafka, Rabbit MQ
Case Studies (E-Commerce App, Movie Streaming, Ticket Booking, Restaurant, Hospital Management)
SCS 4120 - Software Engineering IV
BACHELOR OF SCIENCE HONOURS IN COMPUTER SCIENCE
BACHELOR OF SCIENCE HONOURS IN SOFTWARE ENGINEERING
All in One Place Lecture Notes
Distribution Among Friends Only
All copyrights belong to their respective owners
Viraj Brian Wijesuriya
[email protected]
API Gateways are the well suited service for microservices architecture. It provides many security and performance related features along with reliability of the system. These slides explains what is API Gateway. What is microservices architecture, its benefits and how API Gateway empower this architecture. Further more API Gateway aggregation is explained with an example.
The document provides an overview of microservices architecture. It discusses key characteristics of microservices such as each service focusing on a specific business capability, decentralized governance and data management, and infrastructure automation. It also compares microservices to monolithic and SOA architectures. Some design styles enabled by microservices like domain-driven design, event sourcing, and functional reactive programming are also covered at a high level. The document aims to introduce attendees to microservices concepts and architectures.
Azure vidyapeeth -Introduction to Azure Container Service & Registry ServiceIlyas F ☁☁☁
This document provides an introduction to Azure Container Service and Azure Container Registry. It discusses what containers are and how they provide operating system virtualization. It defines container orchestrators and explains how they manage containerized applications across machine fleets. It also describes what a container registry is and how it stores container images. Finally, it lists some Azure services for developing containerized applications and provides contact information for the presenter.
The document discusses Microservices architecture and compares it to monolithic architecture. It covers topics like infrastructure for Microservices including API gateways, service discovery, event buses. It also discusses design principles like domain-driven design, event sourcing and CQRS. Microservices are presented as a better approach as they allow independent deployments, scale independently and use multiple programming languages compared to monolithic applications.
In this session, we will show how to simplify the deployment, management, and operations of Kubernetes using Azure Container Service (AKS). We will demonstrate how to use Brigade - a framework for scripting together multiple tasks and executing them inside of containers and Kashti - an open source reporting dashboard web interface to easily manage and visualize their Brigade events and projects through a web browser. Additionally, we will provide comparisons of the wide variety of tools in the Kubernetes ecosystem for CI/CD, observability, storage and networking.
- Microservices advocate creating a system from small, isolated services that each own their data and are independently scalable and resilient. They are inspired by biological cells that are small, single-purpose, and work together through messaging.
- The system is divided using a divide and conquer approach, decomposing it into discrete subsystems that communicate over well-defined protocols. Each microservice focuses on a single business capability and owns its own data and behavior.
- Microservices communicate asynchronously through APIs and events to maintain independence and isolation, which enables continuous delivery, failure resilience, and independent scaling of each service.
The document discusses microservices architecture and monolithic architecture. It defines microservices as an architectural style where applications are composed of small, independent services that communicate over well-defined APIs. This allows for independent deployability and scalability of individual services. The document contrasts this with monolithic architecture, which packages an entire application into a single deployable unit with tight coupling between components.
MicroserviceArchitecture in detail over Monolith.PLovababu
This document discusses microservices architecture as an alternative to monolithic architecture. It defines microservices as independently deployable services that communicate through lightweight mechanisms like HTTP APIs. The document outlines benefits of microservices like independent scalability, easier upgrades, and improved developer productivity. It also discusses prerequisites for microservices like rapid provisioning, monitoring, and continuous deployment. Examples of microservices frameworks and a demo application using Spring Boot are provided.
The Overview of Microservices ArchitectureParia Heidari
This document discusses monolithic architecture and microservices architecture. It begins by defining monolithic architecture as having a single code base with multiple components/modules. It then lists advantages like being simple to develop, test, deploy and scale, as well as drawbacks like flexibility, maintenance, reliability, and scaling challenges.
Microservices architecture is presented as a solution to problems with monolithic architecture. Each microservice has a specific focus and functionality. Benefits include improved testability, loose coupling, and ability to develop, deploy and scale services independently. Challenges include increased complexity of developing, testing and operating distributed systems.
The document provides examples and discusses strategies for migrating a monolithic system to microservices, technologies
Comparing Service-Oriented Architecture (SOA), Microservices and Service-Based Architecture (SBA - SOA and Microservices Hybrid) patterns.
Also discussing coupling and cohesion concepts in relation to the systems design.
This document provides an introduction and overview of containers, Kubernetes, IBM Container Service, and IBM Cloud Private. It discusses how microservices architectures break monolithic applications into smaller, independently developed services. Containers are presented as a standard way to package applications to move between environments. Kubernetes is introduced as an open-source system for automating deployment and management of containerized applications. IBM Cloud Container Service and IBM Cloud Private are then overviewed as platforms that combine Docker and Kubernetes to enable deployment of containerized applications on IBM Cloud infrastructure.
This is a small introduction to microservices. you can find the differences between microservices and monolithic applications. You will find the pros and cons of microservices. you will also find the challenges (Business/ technical) that you may face while implementing microservices.
A high-level overview of Microservices architecture topics you should be familiar with before you actually start breaking your monolith into microservices
Automating Applications with Habitat - Sydney Cloud Native MeetupMatt Ray
Habitat is an open source tool for automating the build, deployment, and management of applications. It defines a standard lifecycle for applications that includes building, deploying, running, and managing applications and their dependencies. Habitat packages applications and dependencies together, and uses supervisors to manage applications in production. It aims to simplify and standardize the delivery of developer services by automating common tasks like configuration, service discovery, and clustering across different runtime environments.
The document discusses characteristics of microservice architectures. It defines microservices as independently deployable services that communicate through lightweight mechanisms like HTTP APIs. Key characteristics include: componentization via services; organization around business capabilities rather than technology; treating services as products with long-term support; decentralized governance, data, and infrastructure; and designing for failure and evolutionary development. The document also compares microservices to monoliths and alternative approaches like self-contained systems.
This was from the IBM Interconnect Conference in 2017 - it contains best practices and recommendations for things to think about when migrating to microservices
The microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API.
In this slide we have discussed, Monolithic application vs Microservices, applicable scenarios for adopting the architectural pattern, when we need microservices, what are the benefits, case study of an e-commerce platform by compartmentalizing the scopes into different sample microservices and Docker implementations.
The full talk has been recorded here: https://youtu.be/tNlp7HS533g
AWS Innovate: Smaller IS Better – Exploiting Microservices on AWS, Craig DicksonAmazon Web Services Korea
This document provides an overview of microservices and how they can be implemented on AWS. It begins with defining microservices as independent services that work together to form an application. It then discusses how microservices address issues with monolithic architectures like tight coupling and lack of modularity. Various microservice patterns on AWS are presented, including using EC2 instances, ECS, Lambda, and serverless architectures. The document also explores how microservices can help address both business problems like long feature cycle times and technical problems like lack of testability. Overall, it aims to explain what microservices are, how they can be deployed on AWS, and the types of issues they can help organizations solve.
Developing Enterprise Applications for the Cloud,from Monolith to MicroservicesDavid Currie
Presented at IBM InterConnect 2105. Is your next enterprise application ready for the cloud? Do you know how to build the kind of low-latency, highly available, highly scalable, omni-channel, micro-service modern-day application that customers expect? This introductory presentation will cover what it takes to build such an application using the multiple language runtimes and composing services offered on IBM Bluemix cloud.
Whar are microservices and microservices architecture (MSA) How we reach them? Are they the same or SoA or not? When to use them? What are the key characteristics?
Slides of my talk given in #Gapand2017 in Andorra
The document discusses various software architecture patterns and principles, comparing monolithic and microservices architectures. It covers topics like layers, domain-driven design, code-first versus database-first approaches, and considerations for data management in multi-tenant systems. The key aspects of architectures like microservices and domain-driven design are explained at a high level.
This talk is about monitoring with Prometheus. A progression is shown from monitoring concept, to Micrometer, Prometheus and Grafana.
Presented at Alithya by Richard Langlois and Gervais Naoussi, on September 19th, 2018
Continuous Test Automation, by Richard Langlois P. Eng. and Yuri Pechenko.Richard Langlois P. Eng.
This document discusses different levels of software testing including unit testing, integration testing, functional testing, and acceptance testing. It provides details on tools and frameworks for each level including JUnit and Maven for unit testing, the Failsafe plugin for integration testing, Selenium for functional testing, and Cucumber for acceptance testing. Continuous testing and test automation best practices are also covered.
This document provides an overview of reactive programming in Java and Spring 5. It discusses reactive programming concepts like reactive streams specification, Reactor library, and operators. It also covers how to build reactive applications with Spring WebFlux, including creating reactive controllers, routing with functional endpoints, using WebClient for HTTP requests, and testing with WebTestClient.
The document discusses what's new in Java 9. Key changes include the introduction of a module system that allows modularization of the Java platform and custom configurations. The tools javac, jlink and java now accept options to specify module paths. The JDK itself has been modularized. Most internal APIs are now inaccessible by default. The version string format was simplified. New tools introduced include JShell for REPL functionality and jlink to assemble custom runtime images. Enhancements were made for security, deployment, language features and streams.
This document provides an overview of DevOps and the Elastic Stack. It defines IT operations (Ops) and describes the historical separation between development and operations teams. This led to bottlenecks and slow delivery. DevOps aims to break down barriers through practices like continuous integration, monitoring, and automation. The Elastic Stack is a suite of open source tools for logging, monitoring, and security including Elasticsearch, Kibana, Logstash, Beats, and X-Pack. It allows users to collect and analyze logs and metrics from multiple sources in real-time.
The document discusses the next generation of the JUnit testing framework, JUnit 5. It introduces the new modular architecture of JUnit 5, which consists of the JUnit Platform, JUnit Jupiter, and JUnit Vintage. It describes some of the new features in JUnit 5 like new annotations, assertions, assumptions, tagging tests, extensions, and dynamic tests. Finally, it provides some migration tips for moving from JUnit 4 to JUnit 5.
The document provides an introduction to reactive microservices architecture. It discusses how microservices address issues with monolithic architectures like poor scalability and lack of resilience. Key aspects of microservices covered include having independent, isolated services communicating over the network via APIs. The document also discusses reactive principles of being responsive, resilient, and elastic. Specific microservices patterns like circuit breakers, bulkheads, and back pressure are explained for improving failure isolation and scalability.
Who Watches the Watchmen (SciFiDevCon 2025)Allon Mureinik
Tests, especially unit tests, are the developers’ superheroes. They allow us to mess around with our code and keep us safe.
We often trust them with the safety of our codebase, but how do we know that we should? How do we know that this trust is well-deserved?
Enter mutation testing – by intentionally injecting harmful mutations into our code and seeing if they are caught by the tests, we can evaluate the quality of the safety net they provide. By watching the watchmen, we can make sure our tests really protect us, and we aren’t just green-washing our IDEs to a false sense of security.
Talk from SciFiDevCon 2025
https://www.scifidevcon.com/courses/2025-scifidevcon/contents/680efa43ae4f5
Download YouTube By Click 2025 Free Full Activatedsaniamalik72555
Copy & Past Link 👉👉
https://dr-up-community.info/
"YouTube by Click" likely refers to the ByClick Downloader software, a video downloading and conversion tool, specifically designed to download content from YouTube and other video platforms. It allows users to download YouTube videos for offline viewing and to convert them to different formats.
Adobe Photoshop CC 2025 Crack Full Serial Key With Latestusmanhidray
Copy & Past Link👉👉💖
💖http://drfiles.net/
Adobe Photoshop is a widely-used, professional-grade software for digital image editing and graphic design. It allows users to create, manipulate, and edit raster images, which are pixel-based, and is known for its extensive tools and capabilities for photo retouching, compositing, and creating intricate visual effects.
Douwan Crack 2025 new verson+ License codeaneelaramzan63
Copy & Paste On Google >>> https://dr-up-community.info/
Douwan Preactivated Crack Douwan Crack Free Download. Douwan is a comprehensive software solution designed for data management and analysis.
Avast Premium Security Crack FREE Latest Version 2025mu394968
🌍📱👉COPY LINK & PASTE ON GOOGLE https://dr-kain-geera.info/👈🌍
Avast Premium Security is a paid subscription service that provides comprehensive online security and privacy protection for multiple devices. It includes features like antivirus, firewall, ransomware protection, and website scanning, all designed to safeguard against a wide range of online threats, according to Avast.
Key features of Avast Premium Security:
Antivirus: Protects against viruses, malware, and other malicious software, according to Avast.
Firewall: Controls network traffic and blocks unauthorized access to your devices, as noted by All About Cookies.
Ransomware protection: Helps prevent ransomware attacks, which can encrypt your files and hold them hostage.
Website scanning: Checks websites for malicious content before you visit them, according to Avast.
Email Guardian: Scans your emails for suspicious attachments and phishing attempts.
Multi-device protection: Covers up to 10 devices, including Windows, Mac, Android, and iOS, as stated by 2GO Software.
Privacy features: Helps protect your personal data and online privacy.
In essence, Avast Premium Security provides a robust suite of tools to keep your devices and online activity safe and secure, according to Avast.
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...Ranjan Baisak
As software complexity grows, traditional static analysis tools struggle to detect vulnerabilities with both precision and context—often triggering high false positive rates and developer fatigue. This article explores how Graph Neural Networks (GNNs), when applied to source code representations like Abstract Syntax Trees (ASTs), Control Flow Graphs (CFGs), and Data Flow Graphs (DFGs), can revolutionize vulnerability detection. We break down how GNNs model code semantics more effectively than flat token sequences, and how techniques like attention mechanisms, hybrid graph construction, and feedback loops significantly reduce false positives. With insights from real-world datasets and recent research, this guide shows how to build more reliable, proactive, and interpretable vulnerability detection systems using GNNs.
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Andre Hora
Exceptions allow developers to handle error cases expected to occur infrequently. Ideally, good test suites should test both normal and exceptional behaviors to catch more bugs and avoid regressions. While current research analyzes exceptions that propagate to tests, it does not explore other exceptions that do not reach the tests. In this paper, we provide an empirical study to explore how frequently exceptional behaviors are tested in real-world systems. We consider both exceptions that propagate to tests and the ones that do not reach the tests. For this purpose, we run an instrumented version of test suites, monitor their execution, and collect information about the exceptions raised at runtime. We analyze the test suites of 25 Python systems, covering 5,372 executed methods, 17.9M calls, and 1.4M raised exceptions. We find that 21.4% of the executed methods do raise exceptions at runtime. In methods that raise exceptions, on the median, 1 in 10 calls exercise exceptional behaviors. Close to 80% of the methods that raise exceptions do so infrequently, but about 20% raise exceptions more frequently. Finally, we provide implications for researchers and practitioners. We suggest developing novel tools to support exercising exceptional behaviors and refactoring expensive try/except blocks. We also call attention to the fact that exception-raising behaviors are not necessarily “abnormal” or rare.
Mastering OOP: Understanding the Four Core PillarsMarcel David
Visit for updated note:
https://www.notion.so/Four-Pillars-of-Object-Oriented-Programming-OOP-1e2d7d9612808079b7c5f938afd62a7b?pvs=4
Dive into the essential concepts of Object-Oriented Programming (OOP) with a detailed explanation of its four key pillars: Encapsulation, Inheritance, Polymorphism, and Abstraction. Understand how these principles contribute to robust, maintainable, and scalable software development.
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)Andre Hora
Software testing plays a crucial role in the contribution process of open-source projects. For example, contributions introducing new features are expected to include tests, and contributions with tests are more likely to be accepted. Although most real-world projects require contributors to write tests, the specific testing practices communicated to contributors remain unclear. In this paper, we present an empirical study to understand better how software testing is approached in contribution guidelines. We analyze the guidelines of 200 Python and JavaScript open-source software projects. We find that 78% of the projects include some form of test documentation for contributors. Test documentation is located in multiple sources, including CONTRIBUTING files (58%), external documentation (24%), and README files (8%). Furthermore, test documentation commonly explains how to run tests (83.5%), but less often provides guidance on how to write tests (37%). It frequently covers unit tests (71%), but rarely addresses integration (20.5%) and end-to-end tests (15.5%). Other key testing aspects are also less frequently discussed: test coverage (25.5%) and mocking (9.5%). We conclude by discussing implications and future research.
⭕️➡️ FOR DOWNLOAD LINK : http://drfiles.net/ ⬅️⭕️
Maxon Cinema 4D 2025 is the latest version of the Maxon's 3D software, released in September 2024, and it builds upon previous versions with new tools for procedural modeling and animation, as well as enhancements to particle, Pyro, and rigid body simulations. CG Channel also mentions that Cinema 4D 2025.2, released in April 2025, focuses on spline tools and unified simulation enhancements.
Key improvements and features of Cinema 4D 2025 include:
Procedural Modeling: New tools and workflows for creating models procedurally, including fabric weave and constellation generators.
Procedural Animation: Field Driver tag for procedural animation.
Simulation Enhancements: Improved particle, Pyro, and rigid body simulations.
Spline Tools: Enhanced spline tools for motion graphics and animation, including spline modifiers from Rocket Lasso now included for all subscribers.
Unified Simulation & Particles: Refined physics-based effects and improved particle systems.
Boolean System: Modernized boolean system for precise 3D modeling.
Particle Node Modifier: New particle node modifier for creating particle scenes.
Learning Panel: Intuitive learning panel for new users.
Redshift Integration: Maxon now includes access to the full power of Redshift rendering for all new subscriptions.
In essence, Cinema 4D 2025 is a major update that provides artists with more powerful tools and workflows for creating 3D content, particularly in the fields of motion graphics, VFX, and visualization.
Copy & Link Here 👉👉
http://drfiles.net/
Adobe Illustrator is a vector graphics editor and design software, developed and marketed by Adobe, used for creating logos, icons, illustrations, and other graphics that can be scaled without loss of quality. It's a powerful tool for graphic designers, web designers, and artists who need to create crisp, scalable artwork for various applications like print, web, and mobile.
PDF Reader Pro Crack Latest Version FREE Download 2025mu394968
🌍📱👉COPY LINK & PASTE ON GOOGLE https://dr-kain-geera.info/👈🌍
PDF Reader Pro is a software application, often referred to as an AI-powered PDF editor and converter, designed for viewing, editing, annotating, and managing PDF files. It supports various PDF functionalities like merging, splitting, converting, and protecting PDFs. Additionally, it can handle tasks such as creating fillable forms, adding digital signatures, and performing optical character recognition (OCR).
Revitalizing a high-volume, underperforming Salesforce environment requires a structured, phased plan. The objective for company is to stabilize, scale, and future-proof the platform.
Here presenting various improvement techniques that i learned over a decade of experience
Adobe Master Collection CC Crack Advance Version 2025kashifyounis067
🌍📱👉COPY LINK & PASTE ON GOOGLE http://drfiles.net/ 👈🌍
Adobe Master Collection CC (Creative Cloud) is a comprehensive subscription-based package that bundles virtually all of Adobe's creative software applications. It provides access to a wide range of tools for graphic design, video editing, web development, photography, and more. Essentially, it's a one-stop-shop for creatives needing a broad set of professional tools.
Key Features and Benefits:
All-in-one access:
The Master Collection includes apps like Photoshop, Illustrator, InDesign, Premiere Pro, After Effects, Audition, and many others.
Subscription-based:
You pay a recurring fee for access to the latest versions of all the software, including new features and updates.
Comprehensive suite:
It offers tools for a wide variety of creative tasks, from photo editing and illustration to video editing and web development.
Cloud integration:
Creative Cloud provides cloud storage, asset sharing, and collaboration features.
Comparison to CS6:
While Adobe Creative Suite 6 (CS6) was a one-time purchase version of the software, Adobe Creative Cloud (CC) is a subscription service. CC offers access to the latest versions, regular updates, and cloud integration, while CS6 is no longer updated.
Examples of included software:
Adobe Photoshop: For image editing and manipulation.
Adobe Illustrator: For vector graphics and illustration.
Adobe InDesign: For page layout and desktop publishing.
Adobe Premiere Pro: For video editing and post-production.
Adobe After Effects: For visual effects and motion graphics.
Adobe Audition: For audio editing and mixing.
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdfTechSoup
In this webinar we will dive into the essentials of generative AI, address key AI concerns, and demonstrate how nonprofits can benefit from using Microsoft’s AI assistant, Copilot, to achieve their goals.
This event series to help nonprofits obtain Copilot skills is made possible by generous support from Microsoft.
What You’ll Learn in Part 2:
Explore real-world nonprofit use cases and success stories.
Participate in live demonstrations and a hands-on activity to see how you can use Microsoft 365 Copilot in your own work!
Download Wondershare Filmora Crack [2025] With Latesttahirabibi60507
Copy & Past Link 👉👉
http://drfiles.net/
Wondershare Filmora is a video editing software and app designed for both beginners and experienced users. It's known for its user-friendly interface, drag-and-drop functionality, and a wide range of tools and features for creating and editing videos. Filmora is available on Windows, macOS, iOS (iPhone/iPad), and Android platforms.
2. Agenda
1. What is Microservice Architecture
2. What is a pattern
3. Core patterns
4. Decomposition
5. Deployment patterns
6. Cross cutting concerns
7. Communication style
8. External API
9. Service discovery
10. Reliability
11. Data management
12. Security
13. Testing
14. Observability
15. UI patterns
2
3. Design Patterns (1994)
Patterns at the classes level
Microservice Patterns (2018)
Patterns at the services level
Design Patterns Books
3
4. Microservice Architecture
Is an architectural style that structures an application as a set of loosely coupled services.
Services implements business capabilities.
4
5. Microservice Architecture Pattern Language
A pattern is a "reusable solution to a problem that occurs in particular context".
The Pattern language is a collection of patterns that help you architect and design an application using the microservice
architecture.
A commonly used pattern structure includes three valuable sections: forces, resulting context, and related patterns:
The forces section describes the issues that you must address when solving a problem in a given context.
The resulting context section describes the consequences of applying the pattern.
The related patterns section describes the relationship between this pattern and other patterns.
5
7. 1. Core Patterns
Context:
• Needs to develop a server-side enterprise application. Must support a variety of different clients. application handles requests
(HTTP requests and messages) by executing business logic; accessing a database; exchanging messages with other systems;
and returning a HTML/JSON/XML response.
Problem:
• What’s the application’s deployment architecture?
Forces:
• There is a team of developers working on the application
• New team members must quickly become productive
• The application must be easy to understand and modify
• You want to practice continuous deployment of the application
• You must run multiple copies of the application on multiple machines in order to satisfy scalability and availability requirements
• You want to take advantage of emerging technologies (frameworks, programming languages, etc)
7
9. 1. Core Patterns
1.1 Monolithic Architecture
Solutions:
• Build an application with a monolithic architecture. For example, a single Java WAR file.
Benefits:
• Simple to develop - IDEs support well the development of monolithic applications
• Simple to deploy - deploy the WAR file
• Simple to scale - by running multiple copies of the application behind a load balancer
Drawbacks:
• Large monolithic code base intimidates developers.
• Overloaded IDE
• Overloaded web container
• Continuous deployment is difficult - redeploy the entire application.
• Scaling the application can be difficult - only scale in one dimension - different application components have different resource
requirements - one might be CPU intensive while another might memory intensive. cannot scale each component independently
• prevents the teams from working independently.
• Requires a long-term commitment to a technology stack
9
10. 1. Core Patterns
1.2 Microservice Architecture
Solutions:
• Define an architecture that structures the application as a set of loosely coupled, collaborating services.
• Each service implements a set of narrowly, related functions (e.g. Order management service, Customer management
service).
• Services communicate using either synchronous protocols such as HTTP/REST or asynchronous protocols such as AMQP.
• Services can be developed and deployed independently of one another.
10
11. 1. Core Patterns
1.2 Microservice Architecture
Benefits:
• Each microservice is relatively small.
• Easier to scale development - Each (two pizza) team is responsible for one or more single service.
• Improved fault isolation.
• Each service can be developed and deployed independently.
• Eliminates any long-term commitment to a technology stack.
Drawbacks:
• Developers must deal with the additional complexity of creating a distributed system.
• Deployment complexity - operational complexity of deploying and managing a system comprised of many different service
types.
• Increased memory consumption.
11
13. 2. Decomposition Patterns
Context:
• Microservice architecture structures an application as a set of loosely coupled services.
• The goal of the microservice architecture is to accelerate software development by enabling continuous delivery/deployment.
• A service must be small enough to be developed by a small team and to be easily tested.
• Apply the SRP to service design as well and design services that are cohesive and implement a small set of strongly related functions.
• Decomposed in a way so that most new and changed requirements only affect a single service.
Problem:
• How to decompose an application into services?
Forces:
• Services must be cohesive.
• Services must conform to the Common Closure Principle (CCP), i.e. things that change together should be packaged together
• Services must be loosely coupled - each service as an API that encapsulates its implementation.
• Service should be testable
• Each service be small enough to be developed by a “two pizza” team, i.e. a team of 6-10 people
• Each team that owns one or more services must be autonomous.
13
14. 2. Decomposition Patterns
2.1 Decompose by Business Capability
Solutions:
• Define services corresponding to business capabilities - something that a business does in order to generate value.
Example:
• Business capabilities of an online store include:
• Product Catalog management
• Inventory management
• Order management
• Delivery management
• Services corresponding to each of these capabilities
14
15. 2. Decomposition Patterns
2.1 Decompose by Business Capability
Benefits:
• Stable architecture since the business capabilities are relatively stable
• Development teams are cross-functional, autonomous, and organized around delivering business value rather than technical
features
• Services are cohesive and loosely coupled
15
16. 2. Decomposition Patterns
2.2 Decompose by Subdomain
Solutions:
• Define services corresponding to Domain-Driven Design (DDD) subdomains.
• DDD refers to the application’s problem space - the business - as the domain.
• Each subdomain corresponds to a different part of the business.
Example:
• subdomains of an online store include:
• Product catalog
• Inventory management
• Order management
• Delivery management
• Services corresponding to each of these subdomains.
16
17. 3. Deployment Patterns
Context:
• Your system architected as a set of services.
• Each service is deployed as a set of service instances for throughput and availability.
Problem:
• How are services packaged and deployed?
Forces:
• Services are written using a variety of languages, frameworks, and framework versions
• Each service consists of multiple service instances for throughput and availability
• Service must be independently deployable and scalable
• Service instances need to be isolated from one another
• You need to be able to quickly build and deploy a service
• You need to be able to constrain the resources (CPU and memory) consumed by a service
• You need to monitor the behavior of each service instance
• You want deployment to reliable
• You must deploy the application as cost-effectively as possible
17
18. 3. Deployment Patterns
• Multiple service instances per host.
• Service instance per host.
• Service instance per VM.
• Service instance per Container.
• Serverless deployment.
• Service deployment platform.
18
19. 3. Deployment Patterns
3.1 Multiple service instances per host
Solutions:
• Run multiple instances of different services on a host (Physical or Virtual machine).
• Deploy each service instance as a JVM process (e.g. a Tomcat instance per service instance).
• Deploy multiple service instances in the same JVM (e.g. as web applications).
Benefits:
• More efficient resource utilization
Drawbacks:
• Risk of conflicting resource requirements
• Risk of conflicting dependency versions
• Difficult to limit the resources consumed by a service instance
• Difficult to monitor the resource consumption of each service instance.
• Impossible to isolate each instance
19
20. 3. Deployment Patterns
3.2 Single Service instance per host
Solutions:
• Deploy each single service instance on its own host.
Benefits:
• Services instances are isolated from one another
• No possibility of conflicting resource requirements or dependency versions
• A service instance can only consume at most the resources of a single host
• Straightforward to monitor, manage, and redeploy each service instance
Drawbacks:
• Potentially less efficient resource utilization compared to Multiple Services per Host because there are more hosts
20
21. 3. Deployment Patterns
3.3 Service instance per VM
Solutions:
• Package the service as a virtual machine image and deploy each service instance as a separate VM.
Example:
• Netflix packages each service as an EC2 AMI and deploys each service instance as a EC2 instance.
Benefits:
• Straightforward to scale the service by increasing the number of instances.
• VM encapsulates the details of the technology used to build the service.
• Each service instance is isolated.
• VM imposes limits on the CPU and memory consumed by a service instance.
• IaaS solutions such as AWS provide a mature and feature rich infrastructure for deploying and managing virtual machines. For
example,
• Elastic Load Balancer (ELB)
• Autoscaling groups
Drawbacks:
• Building a VM image is slow and time consuming
21
22. 3. Deployment Patterns
3.4 Service instance per Container
Solutions:
• Package the service as a (Docker) container image and deploy each service instance as a container
Example:
• Each service is packaged as a Docker image and each service instance is a Docker container.
Benefits:
• Straightforward to scale up and down a service by changing the number of container instances.
• Container encapsulates the details of the technology used to build the service.
• Each service instance is isolated.
• Container imposes limits on the CPU and memory consumed by a service instance.
• Containers are extremely fast to build and start. Docker containers also start much faster than a VM.
Drawbacks:
• Infrastructure for deploying containers is not as rich as the infrastructure for deploying virtual machines.
22
23. 3. Deployment Patterns
3.5 Serverless deployment
Solutions:
• Use a deployment infrastructure that hides any concept of servers.
• The code is packaged (e.g. as a ZIP file), uploaded to the deployment infrastructure.
Example:
• AWS Lambda, runs the containers on EC2 instances.
• Google Cloud Functions
• Azure Functions
Benefits:
• Eliminates the need to spend time on the undifferentiated heavy lifting of managing low-level infrastructure.
• Extremely elastic.
• Pay for each request rather than provisioning what might be under-utilized virtual machines or containers.
Drawbacks:
• Significant limitation and constraints, e.g. supports a few languages, suitable for deploying stateless applications
• Limited “input sources”.
• Applications must start quickly.
• Risk of high latency.
23
24. 3. Deployment Patterns
3.6 Service deployment platform
Solutions:
• Use a deployment platform, which is automated infrastructure for application deployment. It provides a service abstraction,
which is a named, set of highly available (e.g. load balanced) service instances.
Example:
• Docker orchestration frameworks including Docker swarm mode and Kubernetes.
• Serverless platforms such as AWS Lambda.
• PaaS including Cloud Foundry and AWS Elastic Beanstalk.
24
26. 4. Cross Cutting Concerns
4.1 Microservice chassis
Context:
• Spend a significant amount of time putting in place the mechanisms to handle cross-cutting concerns:
• Logging,
• Health checks,
• Metrics,
• Distributed tracing
Forces:
• Creating a new microservice should be fast and easy.
• When creating a microservice you must handle cross-cutting concerns.
Solutions:
• Build your microservices using a microservice chassis framework, which handles cross-cutting concerns.
26
27. 4. Cross Cutting Concerns
4.1 Microservice chassis
Example:
• Spring Boot
• Spring Cloud
• Dropwizard’s Metrics
Benefits:
• Can quickly and easy get started with developing a microservice.
Drawbacks:
• Need a microservice chassis for each programming language/framework that you want to use.
27
28. 4. Cross Cutting Concerns
4.2 Externalized configuration
Context:
• An application typically uses one or more infrastructure and 3rd party services. E.g.:
• Service registry
• Message broker.
• Database server.
Problem:
• How to enable a service to run in multiple environments (e.g. DEV, QA, UAT) without modification?
Solutions:
• Externalize all application configuration including the database credentials and network location.
• On startup, a service reads the configuration from an external source.
28
29. 4. Cross Cutting Concerns
4.2 Externalized configuration
Example:
• Spring Cloud Config
Benefits:
• application runs in multiple environments without modification and/or recompilation.
Drawbacks:
• How to ensure that when an application is deployed the supplied configuration matches what is expected?
29
32. 5. Communication Style
Context:
• Services must handle requests from the application’s clients.
• Services must sometimes collaborate to handle those requests.
• They must use an inter-process communication protocol.
32
33. 5. Communication Style
5.1 Remote Procedure Invocation (RPI)
Solutions:
• Use RPI for inter-service communication.
• Client uses a request/reply-based protocol to make requests to a service.
Example:
• Some RPI technologies:
• REST
• gRPC
• Apache Thrift
Benefits:
• Simple and familiar, no intermediate broker
• Request / reply is easy
Drawbacks:
• Usually only supports request/reply and not other interaction patterns (e.g. notifications, request/async response, publish/subscribe, publish/async response)
• Reduced availability since the client and the service must be available for the duration of the interaction
• Client needs to discover locations of service instances
33
35. 5. Communication Style
5.2 Messaging
Solutions:
• Use asynchronous messaging for inter-service communication.
• Services communicating by exchanging messages over messaging channels.
Example:
• Apache Kafka
• RabbitMQ
Benefits:
• Loose coupling since it decouples client from services.
• Improved availability since the message broker buffers messages until the consumer is able to process them.
• Supports a variety of communication patterns including:
• request/reply, notifications,
• request/async response,
• publish/subscribe,
• publish/async response
Drawbacks:
• Additional complexity of message broker, which must be highly available.
• Request/reply-style communication is more complex
• Client needs to discover location of message broker
35
37. 5. Communication Style
5.3 Domain-specific protocol
Solutions:
• Use a domain-specific protocol for inter-service communication.
Example:
• Some domain-specific protocols including:
• Email protocols such as SMTP and IMAP
• Media streaming protocols such as RTMP, HLS, and HDS
37
38. 6. External API Patterns
• API gateway.
• Backend for front-end.
38
39. 6. External API
Context:
• Building an online store, you need to develop multiple versions of the product details user interface, for each client type.
• Online store must expose product details via a REST API for use by 3rd party applications.
• Code that displays the product details needs to fetch information from all of these services.
Problem:
• How do the clients of a Microservices-based application access the individual services?
Forces:
• Granularity of APIs provided by microservices is often different than what a client needs.
• Microservices typically provide fine-grained APIs.
• Different clients need different data.
• Network performance is different for different types of clients.
• The number of service instances and their locations (host + port) changes dynamically.
• Partitioning into services can change over time and should be hidden from clients.
• Services might use a diverse set of protocols.
39
40. 6. External API
6.1 API gateway
Solutions:
• Implement an API gateway that is the single entry point for all clients.
• API gateway handles requests in one of two ways:
• Some requests routed to the appropriate service.
• It handles other requests by fanning out to multiple services.
• API gateway can expose a different API for each client (e.g. Netflix).
• Implement security, e.g. verify that the client is authorized to perform the request.
40
41. 6. External API
6.1 API gateway
Example:
• Netflix API gateway
• AWS API Gateway
Benefits:
• Insulates the clients from how the application is partitioned into microservices.
• Insulates the clients from the problem of determining the locations of service instances.
• Provides the optimal API for each client.
• Reduces the number of requests/roundtrips.
• Simplifies the client by moving logic for calling multiple services from the client to API gateway.
• Translates from a “standard” public web-friendly API protocol to whatever protocols are used internally.
Drawbacks:
• Increased complexity – yet another moving part.
• Increased response time due to the additional network hop through the API gateway.
41
42. 6. External API
6. 2 Backend for front-end
Solutions:
• Defines a separate API gateway for each kind of client.
42
43. 7. Service Discovery Patterns
• Client-side discovery
• Server-side discovery
• Service registry
• Self registration
• 3rd party registration
43
44. 7. Service Discovery
7.1 Client-side Service Discovery
Context:
• Services typically need to call one another.
• Microservice-based application typically runs in a virtualized or containerized environments where the number of instances of a
service and their locations changes dynamically.
Problem:
• How does the client of a service discover the location of a service instance?
Forces:
• Each instance of a service exposes a remote API at a particular location (host and port)
• The number of services instances and their locations changes dynamically.
• Virtual machines and containers are usually assigned dynamic IP addresses.
• The number of services instances might vary dynamically.
44
45. 7. Service Discovery
7.1 Client-side Service Discovery - Continued
Solution:
• When making a request to a service, the client obtains the location of a service instance by querying a Service Registry.
• Service Registry knows the locations of all service instances.
45
46. 7. Service Discovery
7.1 Client-side Service Discovery - Continued
Example:
Netflix Eureka:
@Configuration
@EnableEurekaClient
@Profile(Array("enableEureka"))
class EurekaClientConfiguration {
Benefits:
• Fewer moving parts and network hops compared to Server-side Discovery.
Drawbacks:
• Couples the client to the Service Registry.
• Need to implement client-side service discovery logic for each programming language/framework used by your application.
46
47. 7. Service Discovery
7.2 Server-side Service Discovery
Solutions:
• When making a request to a service, the client makes a request via a router (a.k.a load balancer) that runs at a well known
location.
• The router queries a service registry, which might be built into the router, and forwards the request to an available service
instance.
47
48. 7. Service Discovery
7.2 Server-side Service Discovery - Continued
Example:
• AWS Elastic Load Balancer (ELB), which also function as a Service Registry.
Benefits:
• Compared to client-side discovery, the client code is simpler since it does not have to deal with discovery. Instead, a client
simply makes a request to the router.
Drawbacks:
• Unless it’s part of the cloud environment, the router is another system component that must be installed and configured.
• Router needs to be replicated for availability and capacity.
• The router must support the necessary communication protocols (e.g. HTTP, gRPC, Thrift) unless it is TCP-based router.
• More network hops are required than when using Client Side Discovery.
48
49. 7. Service Discovery
7.3 Service Registry
Context:
• Clients of a service use either Client-side discovery or Server-side discovery to determine the location of a service instance
to which to send requests.
Problem:
• How do clients of a service and/or routers know about the available instances of a service?
Forces:
• Each instance of a service exposes a remote API at a particular location (host and port)
• The number of services instances and their locations changes dynamically.
Solutions:
• Implement a service registry, which is a database of services, their instances and their locations.
• Service instances are registered with the service registry on start-up and deregistered on shutdown.
• Client of the service and/or routers query the service registry to find the available instances of a service.
49
50. 7. Service Discovery
7.3 Service Registry - Continued
Example:
• Netflix Eureka service registry
• Apache Zookeeper
• Consul
• Etcd
Benefits:
• Client of the service and/or routers can discover the location of service instances.
Drawbacks:
• Yet another infrastructure component that must be setup, configured and managed.
• Service registry instances must be deployed on fixed and well known IP addresses.
• Clients of the service registry need to know the location(s) of the service registry instances.
50
51. 7. Service Discovery
7.4 Self Registration
Context:
• Service instances must be registered with the service registry on start-up so that they can be discovered,
• and unregistered on shutdown.
Problem:
• How are service instances registered with and unregistered from the service registry?
Forces:
• Service instances must be registered with the service registry on start-up and unregistered on shutdown
• Service instances that crash must be unregistered from the service registry
• Service instances that are running but incapable of handling requests must be unregistered from the service registry
Solutions:
• A service instance is responsible for registering itself with the service registry.
• The client must typically periodically renew its registration so that the registry knows it is still alive.
• On shutdown, the service instance unregisters itself from the service registry.
51
52. 7. Service Discovery
7.4 Self Registration - Continued
Example:
• Eureka Service Registry
Benefits:
• Service instance knows its own state so can implement a state model that’s more complex than UP/DOWN, e.g. STARTING,
AVAILABLE.
Drawbacks:
• Couples the service to the Service Registry
• Must implement service registration logic in each programming language/framework that you use to write your services.
• A service instance that is running yet unable to handle requests will often lack the self-awareness to unregister itself from the service
registry.
52
53. 7. Service Discovery
7.5 3rd Party Registration
Context:
• Service instances must be registered with the service registry on start-up so that they can be discovered and unregistered on
shutdown.
Problem:
• How are service instances registered with and unregistered from the service registry?
Forces:
• Service instances must be registered with the service registry on start-up and unregistered on shutdown.
• Service instances that crash must be unregistered from the service registry.
• Service instances that are running but incapable of handling requests must be unregistered from the service registry.
Solutions:
• A 3rd party registrar is responsible for registering and unregistering a service instance with the service registry.
• When the service instance starts up, the registrar registers the service instance with the service registry.
• When the service instance shuts downs, the registrar unregisters the service instance from the service registry.
53
54. 7. Service Discovery
7.5 3rd Party Registration - Continued
Example:
• AWS Autoscaling Groups automatically (un)registers EC2 instances with Elastic Load Balancer
• Clustering frameworks such as Kubernetes (un)register service instances with the built-in/implicit registry
Benefits:
• The service code is less complex since it is not responsible for registering itself.
• The registrar can perform health checks on a service instance and register/unregister the instance based the health check.
Drawbacks:
• The 3rd party registrar might only have superficial knowledge of the state of the service instance, e.g. RUNNING or NOT
RUNNING and so might not know whether it can handle requests.
• Unless the registrar is part of the infrastructure it’s another component that must be installed, configured and maintained.
54
57. 8. Reliability
8.1 Circuit Breaker
Context:
• When one service synchronously invokes another there is always the possibility that the other service is unavailable or is
exhibiting such high latency it is essentially unusable.
• Previous resources such as threads might be consumed in the caller while waiting for the other service to respond.
• This might lead to resource exhaustion, which would make the calling service unable to handle other requests.
• The failure of one service can potentially cascade to other services throughout the application.
Problem:
• How to prevent a network or service failure from cascading to other services?
57
58. 8. Reliability
8.1 Circuit Breaker - Continued
Solutions:
• A service client should invoke a remote service via a proxy that functions in a similar fashion to an electrical circuit breaker.
• When the number of consecutive failures crosses a threshold, the circuit breaker trips, and for the duration of a timeout period
all attempts to invoke the remote service will fail immediately.
• After the timeout expires the circuit breaker allows a limited number of test requests to pass through.
• If those requests succeed the circuit breaker resumes normal operation.
• Otherwise, if there is a failure, the timeout period begins again.
58
59. 8. Reliability
8.1 Circuit Breaker - Continued
Benefits:
• Services handle the failure of the services that they invoke
Drawbacks:
• Challenging to choose timeout values without creating false positives or introducing excessive latency.
59
60. 8. Reliability
8.1 Circuit Breaker - Continued
Example:
OSS Netflix Hystrix provides an implementation (@HystrixCommand annotation) .
@HystrixCommand(fallbackMethod = "reliable")
public String readingList() {
URI uri = URI.create("http://localhost:8090/recommended");
return this.restTemplate.getForObject(uri, String.class);
}
public String reliable() {
return "Code Etique Alithya";
}
60
61. 9. Data Management Patterns
• Database per Service.
• Shared database.
• Saga.
• API Composition.
• CQRS.
• Event sourcing.
• Transaction log tailing.
• Database triggers.
• Application events.
61
62. 9. Data Management
9.1 Database per Service
Context:
• Most services need to persist data in some kind of database.
Problem:
• What’s the database architecture in a microservices application?
Forces:
• Services must be loosely coupled so that they can be developed, deployed and scaled independently.
• Some business transactions must enforce invariants that span multiple services.
• Other business transactions, must update data owned by multiple services.
• Some queries must join data that is owned by multiple services.
• Databases must sometimes be replicated and sharded in order to scale.
• Different services have different data storage requirements (relational, NoSQL).
62
63. 9. Data Management
9.1 Database per Service
Solution:
• Keep each microservice’s persistent data private to that service and accessible only via its API.
• For a relational database then the options are:
• Private-tables-per-service
• Schema-per-service
• Database-server-per-service
63
64. 9. Data Management
9.1 Database per Service
Benefits:
• Helps ensure that the services are loosely coupled.
• Each service can use the type of database that is best suited to its needs.
Drawbacks:
• Implementing business transactions that span multiple services is not straightforward.
• Services publish events when they update data. Other services subscribe to events and update their data in response.
• Complexity of managing multiple SQL and NoSQL databases
64
65. 9. Data Management
9.2 Shared database
Problem:
• What’s the database architecture in a microservices application?
Solutions:
• Use a single database that is shared by multiple services.
• Each service freely accesses data owned by other services using local ACID transactions.
Benefits:
• A developer uses familiar and straightforward ACID transactions to enforce data consistency
• A single database is simpler to operate
Drawbacks:
• Development time coupling
• Runtime coupling
• Single database might not satisfy the data storage and access requirements of all services.
65
66. 9. Data Management
9.3 Saga
Context:
• Need a mechanism to ensure data consistency across services.
Problem:
• How to maintain data consistency across services?
Forces:
• 2 Phase Commit is not an option.
Solution:
• Implement each business transaction that spans multiple services as a saga. A saga is a sequence of local transactions. Each
local transaction updates the database and publishes a message or event to trigger the next local transaction in the saga. If a
local transaction fails because it violates a business rule then the saga executes a series of compensating transactions that
undo the changes that were made by the preceding local transactions.
66
67. 9. Data Management
9.3 Saga
Example:
An e-commerce application that uses this approach would create an order using a saga that consists of the following local transactions:
• The Order Service creates an Order in a pending state
• The Customer Service attempts to reserve credit for that Order.
• The Order Service changes the state of the order to either approved or cancelled
• Each local transaction publishes an event or message that triggers the next step. For example, in the CreateOrder saga, the OrderService
publishes an OrderCreated event and the Customer Service publishes either a Credit Reserved event or a CreditLimitExceeded event.
67
68. 9. Data Management
9.3 Saga – (3 of 3)
Benefits:
• It enables an application to maintain data consistency across multiple services without using distributed transactions
Drawbacks:
• The programming model is more complex (e.g. design compensating transaction).
68
69. 9. Data Management
9.4 API Composition
Context:
• Database per service pattern
• No longer straightforward to implement queries that join data from multiple services.
Problem:
• How to implement queries in a microservice architecture?
Solutions:
• Implement a query by defining an API Composer, which invoke the services that own the data and performs an in-memory join of the results.
69
70. 9. Data Management
9.4 API Composition
Example:
• An API Gateway often does API composition.
Benefits:
• It a simple way to query data in a microservice architecture
Drawbacks:
• Some queries would result in inefficient, in-memory joins of large datasets.
70
71. 9. Data Management
9.5 CQRS
Context:
• Database per service pattern
• No longer straightforward to implement queries that join data from multiple services.
Problem:
• How to implement queries in a microservice architecture?
Solutions:
• Split the application into two parts: the command-side and the query-side.
• Command-side handles create, update, and delete requests and emits events when data changes.
• Query-side handles queries by executing them against one or more materialized views that are kept up to date by subscribing
to the stream of events emitted when data changes.
71
72. 9. Data Management
9.5 CQRS
Benefits:
• Necessary in an event sourced architecture.
• Improved separation of concerns = simpler command and query models.
• Supports multiple denormalized views that are scalable and performant.
Drawbacks:
• Increased complexity
• Potential code duplication
• Replication lag/eventually consistent views
72
73. 9. Data Management
9.6 Event sourcing
Context:
• In order to be reliable, services must atomically publish events whenever their state changes.
• It is not viable to use a distributed transaction that spans the database and the message broker.
Problem:
• How to reliably/atomically publish events whenever state changes?
Forces:
• 2PC is not an option
Solutions:
• Event store is difficult to query since it requires typical queries to reconstruct the state of the business entities.
• Whenever the state of a business entity changes, a new event is appended to the list of events.
• The application reconstructs an entity’s current state by replaying the events.
• Applications persist events in an event store, which is a database of events.
• The event store also behaves like a message broker.
• It provides an API that enables services to subscribe to events.
• When a service saves an event in the event store, it is delivered to all interested subscribers.
73
74. 9. Data Management
9.6 Event sourcing
Example:
• Instead of simply storing the current state of each order as a row in an ORDERS table, the application persists each Order as a
sequence of events. The CustomerService can subscribe to the order events and update its own state.
74
75. 9. Data Management
9.6 Event sourcing
Benefits:
• It solves one of the key problems in implementing an event-driven architecture.
• Makes it possible to reliably publish events whenever state changes.
• Because it persists events rather than domain objects, it mostly avoids the object-relational impedance mismatch problem.
• It provides a 100% reliable audit log of the changes made to a business entity.
• Makes it possible to implement temporal queries that determine the state of an entity at any point in time.
• Event sourcing-based business logic consists of loosely coupled business entities that exchange events.
Drawbacks:
• Learning curve because It is a different and unfamiliar programming style.
• Event store is difficult to query since it requires typical queries to reconstruct the state of the business entities.
75
76. 9. Data Management
9.7 Transaction log tailing
Context:
• In order to be reliable, services must atomically publish events whenever their state changes.
• It is not viable to use a distributed transaction that spans the database and the message broker.
•
Problem:
• How to reliably/atomically publish events whenever state changes?
Forces:
• 2PC is not an option
Solutions:
• Tail the database transaction log and publish each change as an event.
Example:
• Eventuate Local
76
77. 9. Data Management
9.7 Transaction log tailing
Benefits:
• No 2PC
• No application changes required
• Guaranteed to be accurate
Drawbacks:
• Relatively obscure
• Database specific solutions
• Tricky to avoid duplicate publishing
• Low level DB changes make difficult to determine the business level events
77
78. 9. Data Management
9.8 Database triggers
Context:
• In order to be reliable, services must atomically publish events whenever their state changes.
• It is not viable to use a distributed transaction that spans the database and the message broker.
Problem:
• How to reliably/atomically publish events whenever state changes?
Forces:
• 2PC is not an option
Solutions:
• One or more database triggers insert events into an EVENTS table, which is polled by a separate process that publishes the
events.
78
79. 9. Data Management
9.9 Application events
Context:
• In order to be reliable, services must atomically publish events whenever their state changes.
• It is not viable to use a distributed transaction that spans the database and the message broker.
Problem:
• How to reliably/atomically publish events whenever state changes?
Forces:
• 2PC is not an option
Solutions:
• The application insert events into an EVENTS table as part of the local transaction. A separate process polls the EVENTS table and publishes the events to a message
broker.
Benefits:
• High level domain events
• No 2PC
Drawbacks:
• Requires changes to the application, which are potentially error prone.
• Tricky to avoid duplicate publishing
• Tricky to publish events in order
• Only works for SQL and some NoSQL databases
79
81. 10. Security
10.1 Access Token
Context:
• The application consists of numerous services.
• The API gateway is the single entry point for client requests.
• It authenticates requests, and forwards them to other services, which might in turn invoke other services.
Problem:
• How to communicate the identity of the requestor to the services that handle the request?
Forces:
• Services often need to verify that a user is authorized to perform an operation
Solutions:
1. The API Gateway authenticates the request,
2. Passes an access token (e.g. JSON Web Token) that securely identifies the requestor in each request to the services.
3. Service can include the access token when makes requests to other services.
81
82. 10. Security
10.1 Access Token
Example:
• JSON Web Token (JWT)
Benefits:
• The identity of the requestor is securely passed around the system.
• Services can verify that the requestor is authorized to perform an operation.
82
83. 11. Testing
Problem:
• How to easily test that a service provides an API that its clients expect?
Forces:
• End to end testing (i.e. tests that launch multiple services) is difficult, slow, brittle, and expensive.
83
86. 11. Testing
11.1 Service Component Test
Solution:
• A test suite that tests a service in isolation using test doubles for any services that it invokes.
Example:
• Spring Cloud Contract (Consumer Driven Contracts)
Benefits:
• Testing a service in isolation is easier, faster, more reliable and cheap.
Drawbacks:
• Tests might pass but the application may fail in production.
• How to ensure that the test doubles always correctly emulate the behavior of the invoked services?
86
88. 11. Testing
11.2 Service Integration Contract Test
Problem:
• How to easily test that a service provides an API that its clients expect?
Solution:
• A test suite for a service that is written by the developers of another service that consumes it.
• The test suite verifies that the service meets the consuming service’s expectations.
Example:
• Spring Cloud Contract
Benefit:
• Testing a service in isolation is easier, faster, more reliable and cheap
Drawbacks:
• Tests might pass but the application may fail in production.
• How to ensure that the consumer provided tests match what the consumer actually requires?
88
90. 12. Observability
12.1 Log aggregation
Context:
• The application consists of multiple services and service instances that are running on multiple machines.
• Requests often span multiple service instances.
• Each service instance generates writes information about what it is doing to a log file.
Problem:
• How to understand the behavior of an application and troubleshoot problems?
Forces:
• Any solution should have minimal runtime overhead
Solutions:
• Use a centralized logging service that aggregates logs from each service instance.
• The users can search and analyze the logs.
• They can configure alerts that are triggered when certain messages appear in the logs.
Examples:
• AWS Cloud Watch, Logstash (ELK)
Drawbacks:
• Handling a large volume of logs requires substantial infrastructure.
90
92. 12. Observability
12.2 Application metrics
Context:
• Applied the Microservice architecture pattern.
Problem:
• How to understand the behavior of an application and troubleshoot problems?
Forces:
• Any solution should have minimal runtime overhead
Solutions:
• Instrument a service to gather statistics about individual operations. Aggregate metrics in centralized metrics service, which provides reporting and alerting.
Examples:
Java Metrics Library (Dropwizard)
Prometheus
AWS Cloud Watch
Benefits:
• provides deep insight into application behavior.
Drawbacks:
• Metrics code is intertwined with business logic making it more complicated.
• Aggregating metrics can require significant infrastructure.
92
94. 12. Observability
12.3 Audit logging
Context:
• Applied the Microservice architecture pattern.
Problem:
• How to understand the behavior of users and the application and troubleshoot problems?
Forces:
• It is useful to know what actions a user has recently performed: customer support, compliance, security, etc.
Solutions:
• Record user activity in a database.
Benefits:
• Provides a record of user actions
Drawbacks:
• auditing code is intertwined with the business logic, which makes the business logic more complicated
94
95. 12. Observability
12.4 Distributed tracing
Context:
• Applied the Microservice architecture pattern.
Problem:
• How to understand the behavior of users and the application and troubleshoot problems?
Forces:
• External monitoring only tells you the overall response time and number of invocations
• No insight into the individual operations
Solutions:
Instrument services with code that
Assigns each external request a unique external request id
Passes the external request id to all services that are involved in handling the request
Includes the external request id in all log messages
Records information (e.g. start time, end time) about the requests and operations performed when handling a external
request in a centralized service
95
96. 12. Observability
12.4 Distributed tracing
Examples:
• Spring Cloud Sleuth instruments Spring components to gather trace information and can delivers it to a Zipkin Server, which gathers and
displays traces.
Benefits:
• provides useful insight into the behavior of the system including the sources of latency.
• Enable the developers to search logs using external request id.
Drawbacks:
Aggregating and storing traces can require significant infrastructure.
96
97. 12. Observability
12.5 Exception tracking
Context:
• Errors sometimes occur when handling requests.
• When an error occurs, a service instance throws an exception, which contains an error message and a stack trace.
Problem:
• How to understand the behavior of users and the application and troubleshoot problems?
Forces:
• Exceptions must be de-duplicated, recorded, investigated by developers and the underlying issue resolved
Solutions:
• Report all exceptions to a centralized exception tracking service that aggregates and tracks exceptions and notifies
developers.
97
98. 12. Observability
12.5 Exception tracking
Examples:
• Sentry Datadog
• PagerDuty
Benefits:
• Easier to view exceptions and track their resolution
Drawbacks:
• Exception tracking service is additional infrastructure
98
99. 12. Observability
12.6 Health check API
Context:
• Service instance can be incapable of handling requests yet still be running.
• monitoring system should generate a alert.
• Load balancer or service registry should not route requests to the failed service instance.
Problem:
• How to detect that a running service instance is unable to handle requests
Forces:
• Alert should be generated when a service instance fails.
• Requests should be routed to working service instances
Solutions:
• Service has an health check API endpoint (e.g. HTTP /health) that returns the health of the service.
• A health check client (monitoring service, service registry or load balancer) periodically invokes the endpoint to check the health of the service instance.
Examples:
Spring Boot Actuator configures “/health” HTTP endpoint that invokes helth check logic.
Benefits:
99
100. 12. Observability
12.6 Health Check API
Examples:
• Spring Boot Actuator configures “/health” HTTP endpoint that invokes health check logic.
Benefits:
• Enables the health of a service instance to be periodically tested.
Drawbacks:
• Service instance might fail between health checks and so requests might still be routed to a failed service instance
10
0
101. 12. Observability
12.7 Log deployments and changes
Context:
• Applied the Microservice architecture pattern.
Problem:
• How to understand the behavior of an application and troubleshoot problems?
Forces:
• It useful to see when deployments and other changes occur since issues usually occur immediately after a change
Solutions:
• A deployment tool can publish a pseudo-metric whenever it deploys a new version of a service.
Examples:
• AWS Cloud Trail provides logs of AWS API calls.
Benefits:
• Enables deployments and changes to be easily correlated with issues leading to faster resolution.
10
1
102. 13. UI Patterns
Context:
• Microservices are developed by business capability/subdomain-oriented teams that are also responsible for the user
experience.
• Some UI screens/pages display data from multiple service.
• Each data item corresponds to a separate service and the different teams are responsible for how it is displayed.
Problem:
• How to implement a UI screen or page that displays data from multiple services?
10
2
105. 13. UI Patterns
13.1 Server-side page fragment composition
Solution:
• Each team develops a web application that implements the region of the page for their service.
• A UI team implements the page templates that build pages by performing server-side aggregation (e.g. server-side include
style) of the service-specific HTML fragments.
10
5
106. 13. UI Patterns
13.2 Client-side UI composition
Solution:
• Each team develops a client-side UI component that implements the region of page for their service.
• A UI team implements the page skeletons that build pages/screens by composing multiple, service-specific UI
components.
10
6
107. References
• Microservice Patterns book, Chris Richardson, 2018
• A Pattern Language for Microservices (http://microservices.io), Chris Richardson
• Example applications, http://eventuate.io/exampleapps.html
• FTGO Sample application: https://github.com/microservice-patterns/ftgo-application
10
7