Software development has advanced immensely throughout the years, whether it's technologies, tools or methodologies. Be that as it may, it is quite surprising to see how some concepts remain extremely difficult still. One of the big challenges in developing any system is dealing with consistency, and going towards more extreme cases of distributed systems makes it even a more serious conundrum.
What can we you do about it then? How do you address it? What approaches and tools should you consider? How can you design (distributed) systems and achieve high consistency guarantees?
Join me in this talk as we tackle such questions head-on and leave better equipped to build distributed systems that maintain application state and workflows with consistency in mind.
Consumer Driven Contracts for microservicesReshmi Krishna
Consumer Driven Contracts (CDC) allow consumers to define contracts that specify the expectations of APIs produced by services. This helps drive the evolution of those APIs while maintaining backward and forward compatibility. Spring Cloud Contract provides tools for implementing CDC in Spring applications, including generating stubs for use in integration tests to reduce the need for end-to-end testing. It demonstrates a typical CDC workflow where consumers define contracts first during development, then producers verify their code against those contracts before deployment.
QConPlus 2021: Minimizing Design Time Coupling in a Microservice ArchitectureChris Richardson
Delivering large, complex software rapidly, frequently and reliably requires a loosely coupled organization. DevOps teams should rarely need to communicate and coordinate in order to get work done. Conway's law states that an organization and the architecture that it develops mirror one another. Hence, a loosely coupled organization requires a loosely coupled architecture.
In this presentation, you will learn about design-time coupling in a microservice architecture and why it's essential to minimize it. I describe how to design service APIs to reduce coupling. You will learn how to minimize design-time coupling by applying a version of the DRY principle. I describe how key microservices patterns potentially result in tight design time coupling and how to avoid it.
The document discusses the operational costs of technical debt, including direct costs like system outages and development slowdowns, and indirect costs like prioritizing new features over infrastructure updates. It provides examples of technical debt at LinkedIn like upgrading Kafka from version 0.7 to 0.8 and using an outdated version of memcached. The document advocates recognizing and evaluating all costs to make active decisions about balancing new development work with retiring technical debt.
Microservices: Why and When? - Alon Fliess, CodeValue - Cloud Native Day Tel ...Cloud Native Day Tel Aviv
Do more with less, the pain of the modern architect. High cohesion & low coupling, high availability & scale, ease of DevOps. Our systems need to support all these quality attributes, while providing more functionality with less resources. We need to be agile, we need to embrace changes, we need to have a better way! Micro-Service-Architecture (MSA) promises to bring cure to the architect's pains, but does it really deliver? This lecture presents the essence of MSA, how does it answer main concerns of modern distributed systems, how to get started, how to migrate current solutions to MSA by adopting an evolution migration path. What to be careful about and the signs that we are on the right track. We will talk about SA evolution, the CAP theorem and eventually consistency, MSA principles, hosting. containers, versioning, orchestrators & decoupling business processes. By the end of this lecture the participant will have a better understanding of why, when and how to embrace MSA.
Docker enables new agile practices by allowing developers to work in environments that closely match production. However, DevOps thought leaders must determine how Docker adoption fits with their organization's culture and ensure it leads to business benefits like increased velocity without disrupting existing processes and tools. While Docker shows promise for accelerating development and operations, its impact on an organization depends on how well leaders apply agile and DevOps principles during implementation.
CodeValue Architecture Next 2018 - Executive track dilemmas and solutions in...Erez PEDRO
Moderen Software projects are challenging to develop. Eran Stiller, Ronen Rubinfeld, and Erez Pedro from CodeValue show a method for conducting multidisciplinary product discovery.
Top Performance Problems in Distributed ArchitecturesAndreas Grabner
When moving to a more distributed architecture, you introduce more dependencies and potential for failures to impact services. Common anti-patterns that can arise include making excessive duplicate calls or queries (N+1 patterns), transmitting unnecessary payload data, having services with tight coupling, and inefficient service flows. It is important to understand dependencies between services and automate performance tests and validations as part of continuous integration/deployment pipelines to identify issues and prevent regressions.
A common microservice architecture anti-pattern is more the merrier. It occurs when an organization team builds an excessively fine-grained architecture, e.g. one service-per-developer. In this talk, you will learn about the criteria that you should consider when deciding service granularity. I'll discuss the downsides of a fine-grained microservice architecture. You will learn how sometimes the solution to a design problem is simply a JAR file.
Consumer Driven Contracts for microservicesReshmi Krishna
Consumer Driven Contracts (CDC) allow consumers to define contracts that specify the expectations of APIs produced by services. This helps drive the evolution of those APIs while maintaining backward and forward compatibility. Spring Cloud Contract provides tools for implementing CDC in Spring applications, including generating stubs for use in integration tests to reduce the need for end-to-end testing. It demonstrates a typical CDC workflow where consumers define contracts first during development, then producers verify their code against those contracts before deployment.
QConPlus 2021: Minimizing Design Time Coupling in a Microservice ArchitectureChris Richardson
Delivering large, complex software rapidly, frequently and reliably requires a loosely coupled organization. DevOps teams should rarely need to communicate and coordinate in order to get work done. Conway's law states that an organization and the architecture that it develops mirror one another. Hence, a loosely coupled organization requires a loosely coupled architecture.
In this presentation, you will learn about design-time coupling in a microservice architecture and why it's essential to minimize it. I describe how to design service APIs to reduce coupling. You will learn how to minimize design-time coupling by applying a version of the DRY principle. I describe how key microservices patterns potentially result in tight design time coupling and how to avoid it.
The document discusses the operational costs of technical debt, including direct costs like system outages and development slowdowns, and indirect costs like prioritizing new features over infrastructure updates. It provides examples of technical debt at LinkedIn like upgrading Kafka from version 0.7 to 0.8 and using an outdated version of memcached. The document advocates recognizing and evaluating all costs to make active decisions about balancing new development work with retiring technical debt.
Microservices: Why and When? - Alon Fliess, CodeValue - Cloud Native Day Tel ...Cloud Native Day Tel Aviv
Do more with less, the pain of the modern architect. High cohesion & low coupling, high availability & scale, ease of DevOps. Our systems need to support all these quality attributes, while providing more functionality with less resources. We need to be agile, we need to embrace changes, we need to have a better way! Micro-Service-Architecture (MSA) promises to bring cure to the architect's pains, but does it really deliver? This lecture presents the essence of MSA, how does it answer main concerns of modern distributed systems, how to get started, how to migrate current solutions to MSA by adopting an evolution migration path. What to be careful about and the signs that we are on the right track. We will talk about SA evolution, the CAP theorem and eventually consistency, MSA principles, hosting. containers, versioning, orchestrators & decoupling business processes. By the end of this lecture the participant will have a better understanding of why, when and how to embrace MSA.
Docker enables new agile practices by allowing developers to work in environments that closely match production. However, DevOps thought leaders must determine how Docker adoption fits with their organization's culture and ensure it leads to business benefits like increased velocity without disrupting existing processes and tools. While Docker shows promise for accelerating development and operations, its impact on an organization depends on how well leaders apply agile and DevOps principles during implementation.
CodeValue Architecture Next 2018 - Executive track dilemmas and solutions in...Erez PEDRO
Moderen Software projects are challenging to develop. Eran Stiller, Ronen Rubinfeld, and Erez Pedro from CodeValue show a method for conducting multidisciplinary product discovery.
Top Performance Problems in Distributed ArchitecturesAndreas Grabner
When moving to a more distributed architecture, you introduce more dependencies and potential for failures to impact services. Common anti-patterns that can arise include making excessive duplicate calls or queries (N+1 patterns), transmitting unnecessary payload data, having services with tight coupling, and inefficient service flows. It is important to understand dependencies between services and automate performance tests and validations as part of continuous integration/deployment pipelines to identify issues and prevent regressions.
A common microservice architecture anti-pattern is more the merrier. It occurs when an organization team builds an excessively fine-grained architecture, e.g. one service-per-developer. In this talk, you will learn about the criteria that you should consider when deciding service granularity. I'll discuss the downsides of a fine-grained microservice architecture. You will learn how sometimes the solution to a design problem is simply a JAR file.
Deploying large-scale, serverless and asynchronous systems - without integrat...DiUS
Modern distributed architectures are increasingly composed of large numbers of decoupled, asynchronous components. In AWS, these components are plumbed together via services like SQS, SNS, Kinesis and S3 often integrated via small and frequent numbers of microservices or lambdas. But how do you test these architectures if they are cloud native?
It’s 2018, and we can do better than deploying the entire stack and running a battery of E2E tests against them.
In his talk, Matt will demonstrate how you can scale development of large-scale systems across teams, technology and process, and unlock the agility of your cloud-native architecture.
WARNING: there will be code (https://github.com/mefellows/serverless-testing-example)
Agile software architecture aims to deliver value fast by evolving the architecture during the project based on what is important now, rather than defining it upfront. This reduces risk and waste by allowing decisions to be made based on actual knowledge gained during development. The architecture should be the simplest solution to support current functionality and evolve economically through changes without making the software worse. Principles like separation of concerns, refactoring, and tests that drive design help enable evolving the architecture in a controlled way.
Serverless Design Patterns (London Dev Community)Yan Cui
Serverless technologies like AWS Lambda has drastically simplified the task of building reactive systems - drop a file into S3 and a Lambda function would be triggered to process it, push an event into a Kinesis stream and magically it'll be processed by a Lambda function in real-time, you can even use Lambda to automate the process of auditing and securing your AWS account by automatically reacting to rule violations to your security policy.
Join us in this talk to see some architectural design patterns that have emerged with AWS Lambda, and learn how to pick the right event source based on the tradeoffs you want. Amongst the many patterns we'll explore, here are a few to whet your appetite : pub-sub, cron, push-pull, saga and decoupled invocation.
This is a comprehensive dive into how to use Salesforce flows, when and when not to use them, and some super helpful tips and tricks around designing, development, testing, and deploying flows.
This was presented by Josh LeQuire at the Charleston, SC Salesforce admin group on 2/6/20.
Reactive Java: Promises and Streams with Reakt (JavaOne Talk 2016)Rick Hightower
see labs at https://github.com/advantageous/j1-talks-2016
Import based on PPT so there is more notes. This is from our JavaOne Talk 2016 on Reakt, reactive Java programming with promises, circuit breakers, and streams. Reakt is a reactive Java lib that provides promises, streams, and a reactor to handle asynchronous call coordination. It was influenced by the design of promises in ES6. You want to async-call serviceA and then serviceB, take the results of serviceA and serviceB, and then call serviceC. Then, based on the results of call C, call D or E and then return the results to the original caller. Calls to A, B, C, D, and E are all async calls, and none should take longer than 10 seconds. If they do, then return a timeout to the original caller. The whole async call sequence should time out in 20 seconds if it does not complete and should also check for circuit breakers and provide back pressure feedback so the system does not have cascading failures. Learn more in this session.
Reactive Java: Promises and Streams with Reakt (JavaOne talk 2016)Rick Hightower
see labs at https://github.com/advantageous/j1-talks-2016
Import based on PDF. This is from our JavaOne Talk 2016 on Reakt, reactive Java programming with promises, circuit breakers, and streams. Reakt is a reactive Java lib that provides promises, streams, and a reactor to handle asynchronous call coordination. It was influenced by the design of promises in ES6. You want to async-call serviceA and then serviceB, take the results of serviceA and serviceB, and then call serviceC. Then, based on the results of call C, call D or E and then return the results to the original caller. Calls to A, B, C, D, and E are all async calls, and none should take longer than 10 seconds. If they do, then return a timeout to the original caller. The whole async call sequence should time out in 20 seconds if it does not complete and should also check for circuit breakers and provide back pressure feedback so the system does not have cascading failures. Learn more in this session.
This document provides an introduction to exploring the Command Query Responsibility Segregation (CQRS) and Event Sourcing architectural patterns. It presents the experiences of a development team building a sample conference management system to showcase CQRS and ES concepts, challenges, and techniques. The guidance consists of production code, documentation, and a learning journey through 6 chapters that cover decomposing the domain, designing individual bounded contexts, enhancing features, preparing for release, and handling versioning of the system. The goal is to help readers embark on their own CQRS journey by providing both a working application and written guidance from experts.
TJ Randall, VP of Customer Success at XebiaLabs, gives his presentation on how to express the cost of your application delivery at the DevOps Leadership Summit in Boston MA.
This document discusses patterns in distributed computing. It outlines some of the key hurdles in distributed systems like asynchrony, locality, failure, and Byzantine faults. It then summarizes common distributed algorithms like leader election, group membership, and consensus. It presents two Ruby libraries, TokenWorker and StaticQueueWorker, that implement leader election and work distribution patterns. It also briefly outlines the Paxos consensus algorithm but notes that a full implementation is very challenging. The document advocates for practical approaches over purely formal solutions and emphasizes starting with reasonable reliability requirements.
This document discusses Azure App Service, a fully managed platform for building, deploying, and scaling web apps and REST APIs. It supports .NET, .NET Core, Node.js, Java, Python and PHP applications. App Service plans define compute resources for apps and provide features like automated deployment, auto-scaling, built-in load balancing, and support for microservices.
State of DevOps - Build the Thing RightSergiu Bodiu
So you’re running microservices in containers? Congratulations! This is an important step towards meeting those business needs around delivering applications to the hands of your customers as soon as possible. When DevOps first made its way into many organizations, It was believed to be a Dev & Ops initiative. I will explain how the traditional expressions of CALMS (Culture, Automation, Lean, Measurement, and Sharing) are still relevant.
Re-Architecting a Banking Application for Scale and Reliability (SRV220-R1) -...Amazon Web Services
In this session, learn how SunTrust Banks re-architected and released a critical customer-facing application for better reliability and scale. Learn how a serverless architecture enabled the successful architecture, development, test and deployment of an AWS Lambda based solution to over 1 million customers. SunTrust and Candid Partners will discuss the complete architecture plus details of the CI/CD methodology to create a multi-region, active/active configuration.
2008 - TechDays PT: Modeling and Composition for Software today and tomorrowDaniel Fisher
The document profiles two software architects, Daniel Fisher and Michael Willers, from devcoach. It lists their relevant experience of over 10 years in software development, architecture, consulting, and community events. It also lists some of the technical areas they have deep knowledge in, including service orientation, agile methods, web development, security, and deployment.
Microservices: Organizing Large Teams for Rapid DeliveryVMware Tanzu
SpringOne Platform 2016
Speakers: Patricia Anderson; Senior Consultant, Credera. Micah Blalock; Senior Architect, Credera. Jason Goth; Principal Architect, Credera.
A microservice architecture is pattern that is most commonly associated with larger organizations where services and teams are organized around separate business capabilities. In a project our team recently completed, we used a microservice architecture to allow us to organize a large team to develop a large analytics platform at speeds that would not have been possible using a more typical service-oriented architecture.
In this session, we discuss the organizational structure and communication and development strategies and tools to allow teams to work in parallel without drowning in process overhead and coordination costs.
Low-Latency Data Processing in the Era of Serverless @XP DaysNazarii Cherkas
This document discusses low latency data processing in serverless computing. It begins with an overview of serverless architectures and why industries are adopting serverless. Typical scenarios for low-latency processing like fraud detection are presented. Common sources of latency in serverless like cold starts are explained. Approaches to optimize serverless performance through warming functions, co-locating services, and caching hot data are covered. A demo of a serverless fraud detection system using Hazelcast Cloud is shown and other data storage options discussed. The summary emphasizes that while low-latency processing is possible with serverless, latency sources must be addressed and in-memory computing can help reduce function costs.
Video and slides synchronized, mp3 and slide download available at URL http://bit.ly/20SN0dP.
Tammer Saleh talks about the mistakes people make when building a microservices architecture. He also talks about: when microservices are appropriate, and where to draw the lines between services, dealing with performance issues, testing and debugging techniques, managing a polyglot landscape and the explosion of platforms, managing failure and graceful degradation. Filmed at qconlondon.com.
Tammer Saleh is a long time developer, leader, and author of the acclaimed book *Rails AntiPatterns*. Saleh is currently building the Cloud Foundry platform at Pivotal.
RESHMI KRISHNA SENIOR CLOUD APPLICATION & PLATFORM ARCHITECT, PIVOTAL
VINAY UPADHYA ADVISORY PLATFORM ARCHITECT, PIVOTAL
TDD introduced many improvements into the development process with the biggest advantage relating to code design. As we move to a microservices based architecture, TDD becomes hard to implement across teams building different codebases. Consumer driven contracts (CDC) is like TDD but applied at the API level and is becoming more relevant in the world of microservices. It is a pattern for specifying and verifying interactions between different modules of an application. Spring Cloud Contract provides support for Consumer Driven Contracts and service schemas in Spring applications, covering a range of options for writing tests, publishing them as assets, asserting that a contract is kept by producers and consumers, for HTTP and message-based interactions. In this session, you will learn how we can implement TDD in microservices based architecture using Spring Cloud Contracts.
VMworld 2013: The Economics of vCloud: Which Cloud Do I Need and How Do I Get...VMworld
The document discusses how to determine which cloud is needed and how to transition workloads to the cloud. It begins by explaining how server virtualization led to cloud computing and the need to quantify the costs and benefits of public versus private cloud. The presentation then walks through steps to calculate total cost of ownership, adjust for risk factors, and account for potential rewards to determine the most economical cloud option. It emphasizes starting with easy workloads and using tools to migrate and manage hybrid cloud environments. A case study of Harley-Davidson Dealer Systems considering a cloud transition is also presented.
IBM Blockchain Platform - Architectural Good Practices v1.0Matt Lucas
This document discusses architectural good practices for blockchains and Hyperledger Fabric performance. It provides an overview of key concepts like transaction processing in Fabric and performance metrics. It also covers optimizing different parts of the Fabric network like client applications, peers, ordering service, and chaincode. The document recommends using tools like Hyperledger Caliper and custom test harnesses for performance testing and monitoring Fabric deployments. It highlights lessons learned from real projects around reusing connections and load balancing requests.
Do you want Software for your Business? Visit Deuglo
Deuglo has top Software Developers in India. They are experts in software development and help design and create custom Software solutions.
Deuglo follows seven steps methods for delivering their services to their customers. They called it the Software development life cycle process (SDLC).
Requirement — Collecting the Requirements is the first Phase in the SSLC process.
Feasibility Study — after completing the requirement process they move to the design phase.
Design — in this phase, they start designing the software.
Coding — when designing is completed, the developers start coding for the software.
Testing — in this phase when the coding of the software is done the testing team will start testing.
Installation — after completion of testing, the application opens to the live server and launches!
Maintenance — after completing the software development, customers start using the software.
Graspan: A Big Data System for Big Code AnalysisAftab Hussain
We built a disk-based parallel graph system, Graspan, that uses a novel edge-pair centric computation model to compute dynamic transitive closures on very large program graphs.
We implement context-sensitive pointer/alias and dataflow analyses on Graspan. An evaluation of these analyses on large codebases such as Linux shows that their Graspan implementations scale to millions of lines of code and are much simpler than their original implementations.
These analyses were used to augment the existing checkers; these augmented checkers found 132 new NULL pointer bugs and 1308 unnecessary NULL tests in Linux 4.4.0-rc5, PostgreSQL 8.3.9, and Apache httpd 2.2.18.
- Accepted in ASPLOS ‘17, Xi’an, China.
- Featured in the tutorial, Systemized Program Analyses: A Big Data Perspective on Static Analysis Scalability, ASPLOS ‘17.
- Invited for presentation at SoCal PLS ‘16.
- Invited for poster presentation at PLDI SRC ‘16.
More Related Content
Similar to Business Transactions in Distributed Systems
Deploying large-scale, serverless and asynchronous systems - without integrat...DiUS
Modern distributed architectures are increasingly composed of large numbers of decoupled, asynchronous components. In AWS, these components are plumbed together via services like SQS, SNS, Kinesis and S3 often integrated via small and frequent numbers of microservices or lambdas. But how do you test these architectures if they are cloud native?
It’s 2018, and we can do better than deploying the entire stack and running a battery of E2E tests against them.
In his talk, Matt will demonstrate how you can scale development of large-scale systems across teams, technology and process, and unlock the agility of your cloud-native architecture.
WARNING: there will be code (https://github.com/mefellows/serverless-testing-example)
Agile software architecture aims to deliver value fast by evolving the architecture during the project based on what is important now, rather than defining it upfront. This reduces risk and waste by allowing decisions to be made based on actual knowledge gained during development. The architecture should be the simplest solution to support current functionality and evolve economically through changes without making the software worse. Principles like separation of concerns, refactoring, and tests that drive design help enable evolving the architecture in a controlled way.
Serverless Design Patterns (London Dev Community)Yan Cui
Serverless technologies like AWS Lambda has drastically simplified the task of building reactive systems - drop a file into S3 and a Lambda function would be triggered to process it, push an event into a Kinesis stream and magically it'll be processed by a Lambda function in real-time, you can even use Lambda to automate the process of auditing and securing your AWS account by automatically reacting to rule violations to your security policy.
Join us in this talk to see some architectural design patterns that have emerged with AWS Lambda, and learn how to pick the right event source based on the tradeoffs you want. Amongst the many patterns we'll explore, here are a few to whet your appetite : pub-sub, cron, push-pull, saga and decoupled invocation.
This is a comprehensive dive into how to use Salesforce flows, when and when not to use them, and some super helpful tips and tricks around designing, development, testing, and deploying flows.
This was presented by Josh LeQuire at the Charleston, SC Salesforce admin group on 2/6/20.
Reactive Java: Promises and Streams with Reakt (JavaOne Talk 2016)Rick Hightower
see labs at https://github.com/advantageous/j1-talks-2016
Import based on PPT so there is more notes. This is from our JavaOne Talk 2016 on Reakt, reactive Java programming with promises, circuit breakers, and streams. Reakt is a reactive Java lib that provides promises, streams, and a reactor to handle asynchronous call coordination. It was influenced by the design of promises in ES6. You want to async-call serviceA and then serviceB, take the results of serviceA and serviceB, and then call serviceC. Then, based on the results of call C, call D or E and then return the results to the original caller. Calls to A, B, C, D, and E are all async calls, and none should take longer than 10 seconds. If they do, then return a timeout to the original caller. The whole async call sequence should time out in 20 seconds if it does not complete and should also check for circuit breakers and provide back pressure feedback so the system does not have cascading failures. Learn more in this session.
Reactive Java: Promises and Streams with Reakt (JavaOne talk 2016)Rick Hightower
see labs at https://github.com/advantageous/j1-talks-2016
Import based on PDF. This is from our JavaOne Talk 2016 on Reakt, reactive Java programming with promises, circuit breakers, and streams. Reakt is a reactive Java lib that provides promises, streams, and a reactor to handle asynchronous call coordination. It was influenced by the design of promises in ES6. You want to async-call serviceA and then serviceB, take the results of serviceA and serviceB, and then call serviceC. Then, based on the results of call C, call D or E and then return the results to the original caller. Calls to A, B, C, D, and E are all async calls, and none should take longer than 10 seconds. If they do, then return a timeout to the original caller. The whole async call sequence should time out in 20 seconds if it does not complete and should also check for circuit breakers and provide back pressure feedback so the system does not have cascading failures. Learn more in this session.
This document provides an introduction to exploring the Command Query Responsibility Segregation (CQRS) and Event Sourcing architectural patterns. It presents the experiences of a development team building a sample conference management system to showcase CQRS and ES concepts, challenges, and techniques. The guidance consists of production code, documentation, and a learning journey through 6 chapters that cover decomposing the domain, designing individual bounded contexts, enhancing features, preparing for release, and handling versioning of the system. The goal is to help readers embark on their own CQRS journey by providing both a working application and written guidance from experts.
TJ Randall, VP of Customer Success at XebiaLabs, gives his presentation on how to express the cost of your application delivery at the DevOps Leadership Summit in Boston MA.
This document discusses patterns in distributed computing. It outlines some of the key hurdles in distributed systems like asynchrony, locality, failure, and Byzantine faults. It then summarizes common distributed algorithms like leader election, group membership, and consensus. It presents two Ruby libraries, TokenWorker and StaticQueueWorker, that implement leader election and work distribution patterns. It also briefly outlines the Paxos consensus algorithm but notes that a full implementation is very challenging. The document advocates for practical approaches over purely formal solutions and emphasizes starting with reasonable reliability requirements.
This document discusses Azure App Service, a fully managed platform for building, deploying, and scaling web apps and REST APIs. It supports .NET, .NET Core, Node.js, Java, Python and PHP applications. App Service plans define compute resources for apps and provide features like automated deployment, auto-scaling, built-in load balancing, and support for microservices.
State of DevOps - Build the Thing RightSergiu Bodiu
So you’re running microservices in containers? Congratulations! This is an important step towards meeting those business needs around delivering applications to the hands of your customers as soon as possible. When DevOps first made its way into many organizations, It was believed to be a Dev & Ops initiative. I will explain how the traditional expressions of CALMS (Culture, Automation, Lean, Measurement, and Sharing) are still relevant.
Re-Architecting a Banking Application for Scale and Reliability (SRV220-R1) -...Amazon Web Services
In this session, learn how SunTrust Banks re-architected and released a critical customer-facing application for better reliability and scale. Learn how a serverless architecture enabled the successful architecture, development, test and deployment of an AWS Lambda based solution to over 1 million customers. SunTrust and Candid Partners will discuss the complete architecture plus details of the CI/CD methodology to create a multi-region, active/active configuration.
2008 - TechDays PT: Modeling and Composition for Software today and tomorrowDaniel Fisher
The document profiles two software architects, Daniel Fisher and Michael Willers, from devcoach. It lists their relevant experience of over 10 years in software development, architecture, consulting, and community events. It also lists some of the technical areas they have deep knowledge in, including service orientation, agile methods, web development, security, and deployment.
Microservices: Organizing Large Teams for Rapid DeliveryVMware Tanzu
SpringOne Platform 2016
Speakers: Patricia Anderson; Senior Consultant, Credera. Micah Blalock; Senior Architect, Credera. Jason Goth; Principal Architect, Credera.
A microservice architecture is pattern that is most commonly associated with larger organizations where services and teams are organized around separate business capabilities. In a project our team recently completed, we used a microservice architecture to allow us to organize a large team to develop a large analytics platform at speeds that would not have been possible using a more typical service-oriented architecture.
In this session, we discuss the organizational structure and communication and development strategies and tools to allow teams to work in parallel without drowning in process overhead and coordination costs.
Low-Latency Data Processing in the Era of Serverless @XP DaysNazarii Cherkas
This document discusses low latency data processing in serverless computing. It begins with an overview of serverless architectures and why industries are adopting serverless. Typical scenarios for low-latency processing like fraud detection are presented. Common sources of latency in serverless like cold starts are explained. Approaches to optimize serverless performance through warming functions, co-locating services, and caching hot data are covered. A demo of a serverless fraud detection system using Hazelcast Cloud is shown and other data storage options discussed. The summary emphasizes that while low-latency processing is possible with serverless, latency sources must be addressed and in-memory computing can help reduce function costs.
Video and slides synchronized, mp3 and slide download available at URL http://bit.ly/20SN0dP.
Tammer Saleh talks about the mistakes people make when building a microservices architecture. He also talks about: when microservices are appropriate, and where to draw the lines between services, dealing with performance issues, testing and debugging techniques, managing a polyglot landscape and the explosion of platforms, managing failure and graceful degradation. Filmed at qconlondon.com.
Tammer Saleh is a long time developer, leader, and author of the acclaimed book *Rails AntiPatterns*. Saleh is currently building the Cloud Foundry platform at Pivotal.
RESHMI KRISHNA SENIOR CLOUD APPLICATION & PLATFORM ARCHITECT, PIVOTAL
VINAY UPADHYA ADVISORY PLATFORM ARCHITECT, PIVOTAL
TDD introduced many improvements into the development process with the biggest advantage relating to code design. As we move to a microservices based architecture, TDD becomes hard to implement across teams building different codebases. Consumer driven contracts (CDC) is like TDD but applied at the API level and is becoming more relevant in the world of microservices. It is a pattern for specifying and verifying interactions between different modules of an application. Spring Cloud Contract provides support for Consumer Driven Contracts and service schemas in Spring applications, covering a range of options for writing tests, publishing them as assets, asserting that a contract is kept by producers and consumers, for HTTP and message-based interactions. In this session, you will learn how we can implement TDD in microservices based architecture using Spring Cloud Contracts.
VMworld 2013: The Economics of vCloud: Which Cloud Do I Need and How Do I Get...VMworld
The document discusses how to determine which cloud is needed and how to transition workloads to the cloud. It begins by explaining how server virtualization led to cloud computing and the need to quantify the costs and benefits of public versus private cloud. The presentation then walks through steps to calculate total cost of ownership, adjust for risk factors, and account for potential rewards to determine the most economical cloud option. It emphasizes starting with easy workloads and using tools to migrate and manage hybrid cloud environments. A case study of Harley-Davidson Dealer Systems considering a cloud transition is also presented.
IBM Blockchain Platform - Architectural Good Practices v1.0Matt Lucas
This document discusses architectural good practices for blockchains and Hyperledger Fabric performance. It provides an overview of key concepts like transaction processing in Fabric and performance metrics. It also covers optimizing different parts of the Fabric network like client applications, peers, ordering service, and chaincode. The document recommends using tools like Hyperledger Caliper and custom test harnesses for performance testing and monitoring Fabric deployments. It highlights lessons learned from real projects around reusing connections and load balancing requests.
Similar to Business Transactions in Distributed Systems (20)
Do you want Software for your Business? Visit Deuglo
Deuglo has top Software Developers in India. They are experts in software development and help design and create custom Software solutions.
Deuglo follows seven steps methods for delivering their services to their customers. They called it the Software development life cycle process (SDLC).
Requirement — Collecting the Requirements is the first Phase in the SSLC process.
Feasibility Study — after completing the requirement process they move to the design phase.
Design — in this phase, they start designing the software.
Coding — when designing is completed, the developers start coding for the software.
Testing — in this phase when the coding of the software is done the testing team will start testing.
Installation — after completion of testing, the application opens to the live server and launches!
Maintenance — after completing the software development, customers start using the software.
Graspan: A Big Data System for Big Code AnalysisAftab Hussain
We built a disk-based parallel graph system, Graspan, that uses a novel edge-pair centric computation model to compute dynamic transitive closures on very large program graphs.
We implement context-sensitive pointer/alias and dataflow analyses on Graspan. An evaluation of these analyses on large codebases such as Linux shows that their Graspan implementations scale to millions of lines of code and are much simpler than their original implementations.
These analyses were used to augment the existing checkers; these augmented checkers found 132 new NULL pointer bugs and 1308 unnecessary NULL tests in Linux 4.4.0-rc5, PostgreSQL 8.3.9, and Apache httpd 2.2.18.
- Accepted in ASPLOS ‘17, Xi’an, China.
- Featured in the tutorial, Systemized Program Analyses: A Big Data Perspective on Static Analysis Scalability, ASPLOS ‘17.
- Invited for presentation at SoCal PLS ‘16.
- Invited for poster presentation at PLDI SRC ‘16.
Flutter is a popular open source, cross-platform framework developed by Google. In this webinar we'll explore Flutter and its architecture, delve into the Flutter Embedder and Flutter’s Dart language, discover how to leverage Flutter for embedded device development, learn about Automotive Grade Linux (AGL) and its consortium and understand the rationale behind AGL's choice of Flutter for next-gen IVI systems. Don’t miss this opportunity to discover whether Flutter is right for your project.
OpenMetadata Community Meeting - 5th June 2024OpenMetadata
The OpenMetadata Community Meeting was held on June 5th, 2024. In this meeting, we discussed about the data quality capabilities that are integrated with the Incident Manager, providing a complete solution to handle your data observability needs. Watch the end-to-end demo of the data quality features.
* How to run your own data quality framework
* What is the performance impact of running data quality frameworks
* How to run the test cases in your own ETL pipelines
* How the Incident Manager is integrated
* Get notified with alerts when test cases fail
Watch the meeting recording here - https://www.youtube.com/watch?v=UbNOje0kf6E
Hand Rolled Applicative User ValidationCode KataPhilip Schwarz
Could you use a simple piece of Scala validation code (granted, a very simplistic one too!) that you can rewrite, now and again, to refresh your basic understanding of Applicative operators <*>, <*, *>?
The goal is not to write perfect code showcasing validation, but rather, to provide a small, rough-and ready exercise to reinforce your muscle-memory.
Despite its grandiose-sounding title, this deck consists of just three slides showing the Scala 3 code to be rewritten whenever the details of the operators begin to fade away.
The code is my rough and ready translation of a Haskell user-validation program found in a book called Finding Success (and Failure) in Haskell - Fall in love with applicative functors.
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Łukasz Chruściel
No one wants their application to drag like a car stuck in the slow lane! Yet it’s all too common to encounter bumpy, pothole-filled solutions that slow the speed of any application. Symfony apps are not an exception.
In this talk, I will take you for a spin around the performance racetrack. We’ll explore common pitfalls - those hidden potholes on your application that can cause unexpected slowdowns. Learn how to spot these performance bumps early, and more importantly, how to navigate around them to keep your application running at top speed.
We will focus in particular on tuning your engine at the application level, making the right adjustments to ensure that your system responds like a well-oiled, high-performance race car.
Odoo ERP software
Odoo ERP software, a leading open-source software for Enterprise Resource Planning (ERP) and business management, has recently launched its latest version, Odoo 17 Community Edition. This update introduces a range of new features and enhancements designed to streamline business operations and support growth.
The Odoo Community serves as a cost-free edition within the Odoo suite of ERP systems. Tailored to accommodate the standard needs of business operations, it provides a robust platform suitable for organisations of different sizes and business sectors. Within the Odoo Community Edition, users can access a variety of essential features and services essential for managing day-to-day tasks efficiently.
This blog presents a detailed overview of the features available within the Odoo 17 Community edition, and the differences between Odoo 17 community and enterprise editions, aiming to equip you with the necessary information to make an informed decision about its suitability for your business.
Transform Your Communication with Cloud-Based IVR SolutionsTheSMSPoint
Discover the power of Cloud-Based IVR Solutions to streamline communication processes. Embrace scalability and cost-efficiency while enhancing customer experiences with features like automated call routing and voice recognition. Accessible from anywhere, these solutions integrate seamlessly with existing systems, providing real-time analytics for continuous improvement. Revolutionize your communication strategy today with Cloud-Based IVR Solutions. Learn more at: https://thesmspoint.com/channel/cloud-telephony
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeAftab Hussain
Understanding variable roles in code has been found to be helpful by students
in learning programming -- could variable roles help deep neural models in
performing coding tasks? We do an exploratory study.
- These are slides of the talk given at InteNSE'23: The 1st International Workshop on Interpretability and Robustness in Neural Software Engineering, co-located with the 45th International Conference on Software Engineering, ICSE 2023, Melbourne Australia
Mobile App Development Company In Noida | Drona InfotechDrona Infotech
Looking for a reliable mobile app development company in Noida? Look no further than Drona Infotech. We specialize in creating customized apps for your business needs.
Visit Us For : https://www.dronainfotech.com/mobile-application-development/
WhatsApp offers simple, reliable, and private messaging and calling services for free worldwide. With end-to-end encryption, your personal messages and calls are secure, ensuring only you and the recipient can access them. Enjoy voice and video calls to stay connected with loved ones or colleagues. Express yourself using stickers, GIFs, or by sharing moments on Status. WhatsApp Business enables global customer outreach, facilitating sales growth and relationship building through showcasing products and services. Stay connected effortlessly with group chats for planning outings with friends or staying updated on family conversations.
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsPeter Muessig
The UI5 tooling is the development and build tooling of UI5. It is built in a modular and extensible way so that it can be easily extended by your needs. This session will showcase various tooling extensions which can boost your development experience by far so that you can really work offline, transpile your code in your project to use even newer versions of EcmaScript (than 2022 which is supported right now by the UI5 tooling), consume any npm package of your choice in your project, using different kind of proxies, and even stitching UI5 projects during development together to mimic your target environment.
May Marketo Masterclass, London MUG May 22 2024.pdfAdele Miller
Can't make Adobe Summit in Vegas? No sweat because the EMEA Marketo Engage Champions are coming to London to share their Summit sessions, insights and more!
This is a MUG with a twist you don't want to miss.
Takashi Kobayashi and Hironori Washizaki, "SWEBOK Guide and Future of SE Education," First International Symposium on the Future of Software Engineering (FUSE), June 3-6, 2024, Okinawa, Japan
E-commerce Development Services- Hornet DynamicsHornet Dynamics
For any business hoping to succeed in the digital age, having a strong online presence is crucial. We offer Ecommerce Development Services that are customized according to your business requirements and client preferences, enabling you to create a dynamic, safe, and user-friendly online store.
8. About Me
10
Amir Zuker
Senior software architect, developer
Over 25 years of experience in the field
Leads teams and R&D divisions
Several publications and contributions
CTO at CodeValue
@amirzuker
amirz@codevalue.net
9. Agenda
Consistency in Distributed Systems
Immediate vs. Eventual Consistency
Distributed Sagas
Consistency as a Feature
11
11. Consistency – A Broad Term
Database systems
Data is “correct”
Data consistency
Sync across replicas
Software engineering
Business transactions
Overall state is sound (integrity included)
13
RDBMS
Replica Replica Replica
Service
Service
Service
13. Distributed Business Flows
A business transaction can span multiple services
Distributed systems:
“components are located on different networked computers”
15
Db
Service
Service
Service
Db
Db
18. ACID
ACID
Atomic, Consistent, Isolated, Durable
Strong and immediate consistency
All or nothing
Correct
No side effects
Persisted
Db
Service
25. ACID in Distributed Systems
Difficult and complex
No silver bullet
Today’s expectations
Need reliable distributed flows?
Probably look elsewhere
27
26. Eventual Consistency
Opposite of immediate consistency
If new updates aren’t made to a data item:
Eventually, all reads will return the last updated value
Weak consistency guarantees
Only liveness
28
30. Distributed Sagas
Aggregates smaller (atomic) operations
Uses compensation to handle failures
Coordinated via orchestration or choreography
Many implementations exist in the wild Db Db
Db
Service
Service Service
33. 2. Choreography, Events, Sequential
35
Order
Payment
Inventory
Shipment
Message Broker
Order Created
Paid
Stock Updated
Shipped
34. 2. Choreography, Events, Sequential
36
Order
Payment
Inventory
Shipment
Message Broker
Order Created
Paid
Out Of Stock
35. Distributed Sagas
Guarantees either:
All requests were completed successfully
OR..
A subset of requests and their compensating requests were executed
The system is consistent, eventually
No atomicity
No isolation
37. Asynchronous Messaging
Persistence
No message loss
Retries
…requires Idempotence!
Concurrency / Ordered
Relevance
Time-to-live (TTL)
Dead-lettering
Need to decide what to do with it afterwards though
Loose coupling
In terms of connectivity especially
40
47. Design Considerations
What must happen “immediately”
What can take place later (eventually)
What can be happy path only
What can be made in parallel
What level of control and accuracy is needed
48. Design Considerations
What must happen “immediately”
What can take place later (eventually)
What can be best effort or happy path only
What can be made in parallel
What level of accuracy is needed
Test length:
רגע לפני שמסכמים, אין לנו הרבה זמן, אז חשוב לי רק לציין את הדברים הבאים.
כפי שאמרנו תמיד סביב בניית תרבות ענן, אז בMC זה יותר (יותר vendors) וגם יותר קריטי
*כל הקשור לCloudOps – DevOps, SecOps, FinOps
*בנוסף, לדאוג למתודולוגיה, סטנדרטיים ארכיטקטוניים, ולהשקיע בכלים שיתמכו
*אוטומציה – workflows (oam) / control plane – איך להעביר, איך לדעת מה נמצא
*מוניטורינג – cost בעיקר
*אם צריכים עזרה, תשיגו עזרה
...אז כן..
שלום לכולם, ברוכים הבאים להרצאה שלי על
Dealing with Csy in Distributed Systems
אני יודע..
לאחר האוכל
לנמנם
נושא טכני במהותו
--
כולנו לאחר האוכל
לנמנם תחת כיפת השמיים
והנה אנחנו כאן
בהרצאה סביב נושא מאוד טכני במהותו
ניקח נשימה ויאללה נתחיל
חנות ספרים
Eg: fancy books / book store
Decades ago
---
Let's say we're a book store company
Fancy Books!
לפני הרבה שנים
BE Monolith, DB, Clients
SubmitOrder,
Flow
---
Touch the same db, and only that
Db with high gtees of cy + tx
Consistent – either happens or not
קוד – דברים
בTX מול data-store אחד
Strong & immediate, ACID
---
Code – order, payment, shipping, inventory
IN TX
SC GTEES, ACID
---
Touch the same db, and only that
Db with high gtees of cy + tx
Consistent – either happens or not
קוד – דברים
בTX מול data-store אחד
Strong & immediate, ACID
לא צריך לדאוג לסנכרון במקרה של עותק אחד
---
Code – order, payment, shipping, inventory
IN TX
SC GTEES, ACID
---
Touch the same db, and only that
Db with high gtees of cy + tx
Consistent – either happens or not
כמה שנים קדימה
משנים לארכיטקטורה מבוזרת
Eg: fancy books / book store
Decades ago
---
Let's say we're a book store company
Fancy Books!
משנים לארכיטקטורה מבוזרת
כמה שירותים
רגע, אבל מה עושים עכשיו מבחינת Csy?
מה יהיה מצב הState במערכת במקרה של
כשלון או
קריאות במקביל?
על זה אנחנו הולכים לדבר
---
Concerns
This is what we’ll talk about today
Not just distributed BTW
No ambient tx (layers, technical/domain)
two stores/sources (e.g., sms notification)
Db with weak gtees, no ACID support
Senior software architect, instructor, speaker and developer
Over 20 years of experience in the field
Designed and developed various systems, both backend and frontend
Mentored and lead large teams and R&D divisions
Publications, e.g.
Book: HandsOn Full-Stack Web Development with ASP.NET Core
Open source: WCF Contrib
WCF Microsoft Official Curriculum (MOC)
Head of Web and Mobile at CodeValue
נגדיר את עולם הבעיה
איך ניתן לגשת לזה, נגע בImmediate וEventual
נסקור patterns שמאפשרים להתמודד, נתמקד בDistributed Sagas
נסיים בConsistency as a Feature
אז בואו נתחיל
---
בואו נסכם, key takeaways
מושג נרחב בעל פרושים רבים
בDb sys – נכון, תקין, מדויק – עונה על החוקים
סביב Data Cons – התמודדות עם מקרים של מספר nodes וכיצד מסנכרנים
SW Eng – כאן נתמקד, מדבר על כך שהState בכלל המערכת נכון ותקין
Distributed or not
---
Correct – FKs, constraints, etc. not violated, Applies to the rules
Sound – accurate, correct,
State across the system is aligned (generally )
The stronger consistency – better isolation, safety and accuracy
Go to payment – here
Go to order – NA
Inconsistent state – not sound, LO TAKIN
Lack of consistency
In database systems, consistency (or correctness) refers to the requirement that any given database transaction must change affected data only in allowed ways. Any data written to the database must be valid according to all defined rules, including constraints, cascades, triggers, and any combination thereof. This does not guarantee correctness of the transaction in all ways the application programmer might have wanted (that is the responsibility of application-level code) but merely that any programming errors cannot result in the violation of any defined database constraints
Csy הולך יד-ביד עם Reliability
עולם נרחב
יש לנו 20 דקות
מתמקדים בBuiz Tx
אז אנחנו מדברים על Distributed Buiz Flows...
---
Many aspects
Focus on buiz tx
Let’s talk about data csy for a sec
In the heart of our system, where we keep the state – the data stores
אז אנחנו מדברים על Distributed Buiz Flows
Buiz Tx יכול להתפרס על Flow בין כמה שירותים
Distributed systems..
אז במקרה הזה מעורב network..
ובמובן הזה..
---
Go to payment – here
Go to order – NA
Inconsistent state – not sound, LO TAKIN
Lack of consistency
In database systems, consistency (or correctness) refers to the requirement that any given database transaction must change affected data only in allowed ways. Any data written to the database must be valid according to all defined rules, including constraints, cascades, triggers, and any combination thereof. This does not guarantee correctness of the transaction in all ways the application programmer might have wanted (that is the responsibility of application-level code) but merely that any programming errors cannot result in the violation of any defined database constraints
מי שזוכר
Fallacies of distributed computing
לא נכנס לכל זה כרגע, אבל העיקר שרלוונטי לקונטקסט שלנו
Network הוא לא reliable
Latency הוא לא אפסי
ובמקרים האלה, טיפול בCsy הופך להרבה יותר קשה
אז עולה השאלה..
---
Fallacies of distributed computing
Network is reliable
Latency is zero
Consistency is now much more difficult
האם to distribute or not?
אני מעוניין להדגיש את הנקודה הזו
זו אחת התהיות שאנחנו כארכיטקטים מתלבטים רבות עליה
זה נוגע בService Granularity וכיצד אנו מבצעים את הSystem decomposition
Csy זה אחד הכוחות החזקים שמובילים לשילוב/לשלב קומפוננטות
איפה שאנחנו צריכים Strong Csy – אולי לא נלך על Distributed
אז בואו נדבר על מתי כן נחליט To distribute..
---
2 button meme – distribute or not
One of the main criticism towards micro/nano-services
Can be the go-to, but it should be justified, especially where you need strong csy gtees
Again, not only a trait of distribution
Service granularity
Even in the same process boundary, is there an ambient tx
E.g., modular monolith
Technical -
Perhaps different stores, etc.
אז בואו נדבר על מתי כן נחליט To distribute..
טבע האפליקציה
היבטים ארגוניים
מבנה, כיצד מתבצעת התקשורת
פוליטיקות ארגוניות
צרכים טכניים
Scale, Redundancy, Availability, Fault tolerance, Polyglot
מזוכיזם
אז החלטנו to distribute..
---
Conway's law is an adage that states organizations design systems that mirror their own communication structure
אז החלטנו to distribute
Fancy books רוצה עדיין את אותה התנהגות מבחינת Csy
Strong & immediate, ACID
אז בואו נסביר רגע מה זה ACID..
---
So we want to distribute!
How can we achieve strong csy like before then?
Atomic, Consistent, Isolated, Durable
מאפשר Strong & immediate
הכל מצליח או מתבטל
הData נשאר נכון
אין אפקטים על טרנזקציות וclients אחרים
Persisted
אז עולה השאלה..
---
safe data environment, immediate consistency and data accuracy
---
Atomic
All or nothing
Consistent
Foreign keys & constraints
Isolated
From other transactions
Durable
Remains committed even in case of system failure
Provide linearizability for single-machine
---
Atomic – All operations in a transaction succeed or every operation is rolled back
Consistent – On the completion of a transaction, the database is structurally sound
Isolated – Transactions do not contend with one another. Contentious access to data is moderated by the database so that transactions appear to run sequentially
Durable – The results of applying a transaction are permanent, even in the presence of failures
Once a transaction is complete, its data is consistent (write consistency) and stable on disk
Write consistency is great for developers, but it also requires sophisticated locking which is typically a heavyweight pattern for most use cases
“Always consistent” doesn’t scale well and is less highly available as BASE
אז עולה השאלה
האם ניתן לעשות ACID בDistributed Flows
---
Atomic
All or nothing
Consistent
Foreign keys & constraints
Isolated
From other transactions
Durable
Remains committed even in case of system failure
Provide linearizability for single-machine
---
Atomic – All operations in a transaction succeed or every operation is rolled back
Consistent – On the completion of a transaction, the database is structurally sound
Isolated – Transactions do not contend with one another. Contentious access to data is moderated by the database so that transactions appear to run sequentially
Durable – The results of applying a transaction are permanent, even in the presence of failures
Once a transaction is complete, its data is consistent (write consistency) and stable on disk
Write consistency is great for developers, but it also requires sophisticated locking which is typically a heavyweight pattern for most use cases
“Always consistent” doesn’t scale well and is less highly available as BASE
Tx boundary
Compensatiing transactions don’t always work
Return an error – “Inconsistent here, sorry”
Tx boundary
Compensatiing transactions don’t always work
Return an error – “Inconsistent here, sorry”
Happy flow
During – isolation (in all services)
Means we need to know when business tx ends
It gets more complicated in case of errors
Error flow
זה נראה פשוט ושהשגנו את המטרה..
אבל מה קורה אם יש שגיאות רציניות יותר
השירותים נופלים ולא זמינים
Compensating tx נכשל
השירות הראשון המרכזי – אם הוא לא זמין, מה קורה עם כל התהליך
ומה עושים עם התשובה שאמורים להחזיר לקליינט?
כל זה יכול להוביל אותנו למצבים שנגיד..
---
---
This actually ends in a consistent manner, but..
What happens if the compensating tx fails
What happens if the orchestrator crashes
That orchestrator – what is it? Robust coordinator/app service?
Needs to be reliable, fault tolerant, persistent
המערכת סגורה כרגע, אנחנו צריכים לטפל בבעיות, תחזרו אח"כ
אז..
---
ACID in Distributed Systems – בעייתי
מתחיל בכוונות טובות
זה מאוד קשה ומורכב
יש patterns שבאים לעזור – 2PC, 3PC, others
אבל הם לא באמת משנים את טבע הבעיה
אין silver bullet
זה לא פוגש את הציפיות של היום
יוזרים מצפים למערכות always available ומהירות latency נמוך
מי שמכיר, קשור לCAP Theorem, אבל זה מחוץ לסקופ שלנו היום
רוצים reliable distributed flows
צריכים משהו אחר
מה שמביא אותנו לEventual Csy
אז מה זה..
---
Expectations – favor availability and reduced latency, high paced auto releases
Covering all edge cases is REALLY complex
2PC / 3PC too for that matter
Perhaps if you go with extreme locking and compromise availability (still complex)
Going distributed requires a different consistency model
ACID is just not natural here
Eventual Consistency
אז מה זה..
ההפך מImmediate
עקרון פשוט, כל עוד אין עדכונים על data item, בסופו של עניין המערכת תחזיר את אותו ערך
המערכת מתמזגת בסופו של עניין, eventually
Gtees חלשים, רק liveness, אם רוצים לעשות reads/writes אנחנו פה בשבילכם, אבל לא מבטיחים שום דבר מעבר
כדי להמחיש מה זה EC..
---
System will eventually converge
Eventual consistency is sometimes criticized[8] as increasing the complexity of distributed software applications. This is partly because eventual consistency is purely
a liveness guarantee (reads eventually return the same value) and does not guarantee safety: an eventually consistent system can return any value before it converges.
An eventual consistency[4] is a weak consistency model in the system with the lack of simultaneous updates. It defines that if no update takes a very long time, all replicas eventually become consistent.
Most shared decentralized databases have an eventual consistency model, either BASE: basically available; soft state; eventually consistent, or a combination of ACID and BASE sometimes called SALT: sequential; agreed; ledgered; tamper-resistant, and also symmetric; admin-free; ledgered; and time-consensual.[19][20][21]
- החיים הם Eventually consistent
Sun – 8min
Talk tx
אוקיי, אז אם החיים הם ככה, בואו ניקח את זה לעולם שלנו
אז כיצד..
---
Look at us talking right now – a buiz tx
No “commit”, you’ll compensate – raise your voice, repeat, etc.
So we want to achieve reliable
Schedule meeting while offline
Cart – is it really available?
So, it’s not only engineering
It’s about the “product” too
* אז כיצד אנחנו יכולים להשיג..
* אנחנו נתמקד בpatterns סביב Distributed Sagas
אז מה זה Distributed Sagas?
אמרנו שDistributed Flow מתפרס על כמה שירותים
אז סגה היא בעצם סידרה של local tx שחל בתוך כל שירות כחלק מהתהליך של הBuiz Tx
טיפול בשגיאות נעשה באמצעות Compensating tx
Coordinated באמצעות Orc/Chor
הרבה implementations – patterns, פלטפורמות, טכנולוגיות
אנחנו נסקור כרגע שני patterns הכי פופולריים
אז הראשון..
Many implementations:
- Patterns and Technology – platforms and services
A series of local transactions
Application-level transaction pattern
Let’s focus on 2 popular ones
---
Orchestration
Pros
Improves understandability and observability
Business flow is centrally managed in one service
Changes and bug fixes in the existing business flow is done in one service
Easier to design and implement than choreography (next slide)
Cons
Increases coupling with underlying services
Order might need to know about payment, inventory, notification, etc.
Adding new services that are part of the business flow affects the orchestrator too
Choreography
Pros
Business flow is not tightly coupled in a single service operation
Adding new services that are part of the business flow doesn’t require integration and changes to other services
Cons
Business flow spans multiple services which makes it harder to understand and track
Changes to the existing business-flow is usually done in multiple services
Harder to design and implement than Orchestration
Happy Flow
Error Flow
Happy Flow
Error Flow
Break – orchestrator fails, service crashes, compensating tx fails, etc.
What happens during? No gty (weak, not atomic nor isolated)
Break – orchestrator fails, service crashes, compensating tx fails, etc.
What happens during? No gty (weak, not atomic nor isolated)
Break – orchestrator fails, service crashes, compensating tx fails, etc.
אם אנחנו צריכים משהו robust יותר, נצטרך לשקול דברים נוספים.
גם כאן, יש מגוון רחב, נציין כרגע 3 דברים, לא נכנס יותר מדי לפרטים בחלק הזה, חשוב לי שנגע בזה על מנת שתכירו..
----
Break – orchestrator fails, service crashes, compensating tx fails, etc.
Use relevant tech and tools to counter and improve reliability
This is the part that we’re just going to highlight.. Not cover
משתמשים בmessage broker
מאפשר..
Persistence
Retries
Idempotency
הרצה חוזרת של פעולה מביאה את המערכת לאותו מצבState/, כאילו הרצנו פעם אחת
Concurrency/Ordered – מה שרצוי במקרה שלכם
Relevance
DLQ – היכולת להעביר לתור אחר אם זה לא רלוונטי או שלא ניתן לטפל בהודעה כרגע
Loose – בדגש על חיבוריות וזמינות
אז AM מביא איתו הרבה דברים טובים
בנוסף, אפשר לשקול טכנולוגיות סביב Persisted Workflows..
---
https://en.wikipedia.org/wiki/Idempotence
Concurrency – ordered, resource-level causality, consistent hashing, etc.
No async msgs? Still doing such in some way.
Need something to enable that and provide more control and powerful saga coordination options? (next slides)
---
DLQ –
How do we know something is there? What should we be able to do about it?
Retrieve/View/Replay/etc.
Monitoring, alerts
Human in the loop, etc.
---
Instead of performing synchronous calls to the PaymentService and ShippingService within the OrderService, you can use asynchronous messaging techniques such as message queues or event-driven architectures. By decoupling services through messaging, you can ensure that each service processes its part of the transaction independently and can handle failures and retries gracefully.
משתמשים בmessage broker
מאפשר..
Persistence
Retries
Idempotency
הרצה חוזרת של פעולה מביאה את המערכת לאותו מצבState/, כאילו הרצנו פעם אחת
Concurrency/Ordered – מה שרצוי במקרה שלכם
Relevance
DLQ – היכולת להעביר לתור אחר אם זה לא רלוונטי או שלא ניתן לטפל בהודעה כרגע
Loose – בדגש על חיבוריות וזמינות
אז AM מביא איתו הרבה דברים טובים
בנוסף, אפשר לשקול טכנולוגיות סביב Persisted Workflows..
---
https://en.wikipedia.org/wiki/Idempotence
Concurrency – ordered, resource-level causality, consistent hashing, etc.
No async msgs? Still doing such in some way.
Need something to enable that and provide more control and powerful saga coordination options? (next slides)
---
DLQ –
How do we know something is there? What should we be able to do about it?
Retrieve/View/Replay/etc.
Monitoring, alerts
Human in the loop, etc.
---
Instead of performing synchronous calls to the PaymentService and ShippingService within the OrderService, you can use asynchronous messaging techniques such as message queues or event-driven architectures. By decoupling services through messaging, you can ensure that each service processes its part of the transaction independently and can handle failures and retries gracefully.
בנוסף, אפשר לשקול טכנולוגיות סביב Persisted Workflows..
אנחנו רואים כאן דוגמה לשימוש בסרברלס, Durable functions באזור, AWS Step Funcs מי שמכיר
זה מאפשר לממש Workflows על גבי Sls, שינוי של state יכול להניע את הWF בין step לstep
חשוב לי רק שתכירו, שוב, לא נכנס לזה יותר מדי
נכנס request ובצעם מתחיל סגה חדשה כDurable function
הDS מפעיל Activities לפי הState שהוא נמצא
במקרה שלנו נניח לPayment
הPayment מבצע את העבודה ומחזיר תשובה דרך Reply Q (EH)
זה מגיע לפונקציה שמשנה את הState של הOrchestrator שלנו שמבצע את הפעולות הבאות
הState נשמר, אפשר גם לתשאל אותו
כל Activity יכול להסתיים בסטטוס של כשלון, מה שיכול לגרום להפעלה של Activity סביב Compensating tx
שימו לב, זה בעצם מימוש של הפטרן הראשון שראינו – Orchestrator & Commands
עוד פטרן שחשוב לי שתכירו..
---
Azure durable functions, AWS Step functions, Azure Logic Apps, etc.
https://github.com/Azure-Samples/saga-orchestration-serverless
פטרן מאוד רלוונטי בנושא שלנו Distributed Sagas
יש לנו את הScheduler
אחראי לביצוע הפעולות שמקדמות את הסגות
באמצעות agents שהם בעצם מבצעים את הפעולה אל מול הtarget resources/servics
יש לנו את הState store
Durable וFault tolerant
יש לנו את הSupervisor
מנתר את התהליך, מבין את הסטטוס של הסגות
ומבקש מהScheduler לבצע פעולות בהתאם
יכול להיות הפעולות הרגילות או הcompensating tx
---
https://learn.microsoft.com/en-us/azure/architecture/patterns/scheduler-agent-supervisor
A smart engine for a saga coordinator
Pushes through failures
Drives sagas to completion
Difficult, complex
All failure cases
Use tech and tools - Fault injection, in many levels, automate, consider prod too
נעשה מעבר חד שכזה
עד עכשיו דיברנו על Csy במונחים של engineering
אבל consistency לא מתחיל ונגמר בengineering
וזה מושפע מ.. ומשפיע על עולם הפרודקט
אז בואו נדבר על..
---
BTW, Consistency doesn’t start and end in engineering
Which brings us to the last section..
Behavior is formed from
It can leak to the product as well
הציפיות שלנו כיוזרים נגזרות מהפרודקט וה-UX/UI
קחו לדוגמא דלת ומפתח – Low-level, strong & immediate
לעומת זאת, קורא טביעות אצבע – מבינים שמדובר במערכת ופעולות אסינכרוניות
עדיין, הפרודקט נותן חיווי עבור הFlow השלם, הDistributed
יכול להיות שזה מעצבן, שנצטרך להניח כמה פעמים את האצבע, אבל לפחות מוצג לנו כיוזרים מה הסטטוס, ומבחינתנו זה מקובל, גם אם יש כשלון ברמת "הטרנזקציה"
אז הפרודקט והUX קובע את הציפיות ומשפיע על התפיסה שלנו..
---
Take unlocking a car as an example
Key – immediate consistency expectations
fingers – async, eventual
Expected by the customer, Satisfaction is high, trust is preserved, no bugs
Additional feedback/que – sound, etc. – needed, sets expectations
So.. Product and UX/UI is important
---
Photo: car open with fingers vs. key
Key: expect strong consistency
Fingers: can fail, will reposition fingers
But.. Once there’s the “sound” – I expect it to work!
Otherwise – a bug
Quality - Bugs and support
If you went to Amazon
Placed order, received SMS that payment was done
You go to the orders screen – it is NOT there
MS QnA – Edit question, old text is shown, editing shows the new text -> confirmation message can go a long way
Confirmation – not make it a bug (in customer’s eyes
---
Product expects the system to just work
As they should
Engineers need to follow
Impossible to build bullet-proof systems
Accept the imperfection
What is acceptable in terms of product, determine together
Analyze what must happen before ok WITH product
E.g., post message
Running moderation rules can take a while, let’s do it async
Can affect product
Can affect system behavior – reshape the business tx, simplify it
אז הפרודקט והUX קובע את הציפיות ומשפיע על התפיסה שלנו
מה ייתפס כבאג או כהתנהגות מקובלת של המוצר
חשוב..
מקרין על הQuality, ומשפיע על הCustomer trust and satisfaction
לשתף את הפרודקט
Negotiation – תהליך איטרטיבי, אחד משפיע על השני ו-vice versa
הרבה פעמים קורה שמפתחים את הFunctional Requirements בhappy flow ואומרים שזה EC..
תחת הרעיון שEC..
CLICK
---
דוגמא של אמזון..
הרבה פעמים קורה שמפתחים את הFunctional Requirements בhappy flow ואומרים שזה EC..
CLICK
תחת הרעיון שEC
---
Quality - Bugs and support
If you went to Amazon
Placed order, received SMS that payment was done
You go to the orders screen – it is NOT there
MS QnA – Edit question, old text is shown, editing shows the new text -> confirmation message can go a long way
Confirmation – not make it a bug (in customer’s eyes
---
Product expects the system to just work
As they should
Engineers need to follow
Impossible to build bullet-proof systems
Accept the imperfection
What is acceptable in terms of product, determine together
Analyze what must happen before ok WITH product
E.g., post message
Running moderation rules can take a while, let’s do it async
Can affect product
Can affect system behavior – reshape the business tx, simplify it
תחת הרעיון שEC זה הInconsistent החדש..
CLICK
אז זה לא בדיוק כך
דוגמה של אמזון (BAD) – יש תשלום אבל לא רואים הזמנה ללא שום פידבק
אז חשוב לערב את הפרודקט
כי ניתן לבצע mitigations ברמת המוצר..
CLICK
כי ניתן לבצע mitigations ברמת המוצר..
לכתוב הודעת confirmation שקרה/יקרה משהו
ללכת רחוק יותר ולתת pane של tasks עם סטטוס, progress וכדומה
וכמובן לזהות כשיש בעיה ולתת פידבק מתאים
זו הודעה של אמזון שמתחברת לדוגמה שאמרנו מקודם..
אז, חשוב, ביססנו את זה..
יחד עם הפרודקט תוכלו להגדיר אילו consistency gtees אתה צריכים
תקחו בחשבון את הדברים הבאים
CLICK
---
Generally,
User expects strong consistency in “immediate” actions
User accepts weak consistency when async process is apparent
E.g., Amazon – Order lifecyle
Azure Portal provisioning status, etc.
User expectations is driven by UX/UI
Get product on board, explain, negotiate
Compromise where is appropriate to your product
Product expects the system to just work
As they should
---
Can show lifecycle of order as originally suggested by product
Starts with “Order Placed and Paid For”
Negotiate with product
Payment is an external system, can’t sync, takes time
Product changes
Order Placed Order Paid
Show diagrams, how now it payment is posted to a queue, more reliable
Allows extracting things to a separate business transaction
Ease on the entire complexity
Might still need some type of coordination – can lead to the fairy tale saga
Can still reduce coupling and complexity
תקחו בחשבון את הדברים הבאים
Immediate
אח"כ (eventual)
Happy path
מקביל
איזו רמה של דיוק ושליטה אתם צריכים
גבולות גזרה..
---
This will help you determine boundaries (גבולות גזרה), both in terms of
Service granularity and how you decompose the system
Buiz tx boundaries
----
Where you need fine control or more flexible one
Will help you determine what solution to build
Then define:
Order and dependencies
Business transaction boundaries
Required consistency guarantees
Accurate control vs. Flexible (orchestration vs. choreography)
Then, can approach to implementing the (reliable) distributed business tx
---
Can show lifecycle of order as originally suggested by product
Starts with “Order Placed and Paid For”
Negotiate with product
Payment is an external system, can’t sync, takes time
Product changes
Order Placed Order Paid
Show diagrams, how now it payment is posted to a queue, more reliable
Allows extracting things to a separate business transaction
Ease on the entire complexity
Might still need some type of coordination – can lead to the fairy tale saga
Can still reduce coupling and complexity
גבולות גזרה..
Service Granularity ואיך לשבור את המערכת כפי שדיברנו
וגם לקבוע את גבולות הBuiz Tx
אוקיי.. אז בואו נסכם
---
This will help you determine boundaries (גבולות גזרה), both in terms of
Service granularity and how you decompose the system
Buiz tx boundaries
----
Where you need fine control or more flexible one
Will help you determine what solution to build
Then define:
Order and dependencies
Business transaction boundaries
Required consistency guarantees
Accurate control vs. Flexible (orchestration vs. choreography)
Then, can approach to implementing the (reliable) distributed business tx
---
Can show lifecycle of order as originally suggested by product
Starts with “Order Placed and Paid For”
Negotiate with product
Payment is an external system, can’t sync, takes time
Product changes
Order Placed Order Paid
Show diagrams, how now it payment is posted to a queue, more reliable
Allows extracting things to a separate business transaction
Ease on the entire complexity
Might still need some type of coordination – can lead to the fairy tale saga
Can still reduce coupling and complexity
בואו נסכם, key takeaways
Design
Csy gtees
Tx boundaries
Product
Realization & negotiation
Distribute or not, choice
Granularity, csy force
Test
Technical
Consistent as needed