This document provides an overview of event-driven architecture and distributed transactions with microservices. It discusses event-driven programming and what constitutes a distributed transaction when using microservices. It then covers some common solutions for distributed transactions like the 2PC and Saga patterns. The Saga pattern uses a choreography or orchestration approach and events to coordinate transactions across services. Message brokers like Kafka, RabbitMQ and Azure Event Hub are discussed for facilitating event-driven architectures. Vert.x and Spring WebFlux are presented as reactive frameworks that are non-blocking and scale well.
Any team that has made the jump from building monoliths to building microservices knows the complexities you must overcome to build a system that is functional and maintainable. Building a microservice architecture that is low latency and only communicates using REST APIs is even more tricky, with high latency for requests being a common concern. This talk explains how you can use events as the backbone of your microservice architecture and build an efficient, event-driven system. It covers how to get started with designing your microservice architecture and the key requirements any system needs to fulfil. It also introduces the different patterns you will encounter in event-driven architectures and the advantages and disadvantages of these choices. Finally it explains why Apache Kafka is a great choice for event-driven microservices.
Azure Site Recovery - BC/DR - Migrations & assessments in 60 minutes!Johan Biere
Gain high level understanding of various challenges faced by organizations in planning their Migration and BC/DR Strategy for applications in Azure and Hybrid.
Learn about the capabilities that make Azure the ideal destination for your applications, data, and infrastructure. You will get clear, scenario-based guidance on how to approach your technical migration & innovation journeys. Understand how to migrate different on-premises applications to Azure, including moving them to Azure IaaS Using ASR with Hyper-V Assessments & Agentless migration.
Kevin Huang: AWS San Francisco Startup Day, 9/7/17
Architecture: When, how, and if to adopt microservices - Microservices are not for everyone! If you're a small shop, a monolith provides a great amount of value and reduces the complexities involved. However as your company grows, this monolith becomes more difficult to maintain. We’ll look at how microservices allow you to easily deploy and debug atomic pieces of infrastructure which allows for increased velocity in reliable, tested, and consistent deploys. We’ll look into key metrics you can use to identify the right time to begin the transition from monolith to microservices.
Event-Driven Microservices architecture has gained a lot of attention recently. The trend in the industry is to move away from Monolithic applications to Microservices to innovate faster. While Microservices have their benefits, implementing them is hard. This talk focuses on the challenges faced and how to solve them.
It covers topics like using Domain Driven Design to break functionality into small parts. Various communication patterns among Microservices are also discussed.
One major drawback is the problem of distributed data management, as each Microservice has its own database. Event-Driven Architecture enables a way to make microservices work together and the talks show how to use architectural patterns like Event Sourcing & CQRS to implement them.
Another implementation challenge is to manage transactions that update entities owned by multiple services in an eventually consistent fashion. This challenge is solved using sagas, which can be thought of as Long running transactions that use compensating actions to handle failures.
The objective of the talk is to show how to implement highly distributed Event Driven Microservices architecture that are scalable and easy to maintain.
Any team that has made the jump from building monoliths to building microservices knows the complexities you must overcome to build a system that is functional and maintainable. Building a microservice architecture that is low latency and only communicates using REST APIs is even more tricky, with high latency for requests being a common concern. This talk explains how you can use events as the backbone of your microservice architecture and build an efficient, event-driven system. It covers how to get started with designing your microservice architecture and the key requirements any system needs to fulfil. It also introduces the different patterns you will encounter in event-driven architectures and the advantages and disadvantages of these choices. Finally it explains why Apache Kafka is a great choice for event-driven microservices.
Azure Site Recovery - BC/DR - Migrations & assessments in 60 minutes!Johan Biere
Gain high level understanding of various challenges faced by organizations in planning their Migration and BC/DR Strategy for applications in Azure and Hybrid.
Learn about the capabilities that make Azure the ideal destination for your applications, data, and infrastructure. You will get clear, scenario-based guidance on how to approach your technical migration & innovation journeys. Understand how to migrate different on-premises applications to Azure, including moving them to Azure IaaS Using ASR with Hyper-V Assessments & Agentless migration.
Kevin Huang: AWS San Francisco Startup Day, 9/7/17
Architecture: When, how, and if to adopt microservices - Microservices are not for everyone! If you're a small shop, a monolith provides a great amount of value and reduces the complexities involved. However as your company grows, this monolith becomes more difficult to maintain. We’ll look at how microservices allow you to easily deploy and debug atomic pieces of infrastructure which allows for increased velocity in reliable, tested, and consistent deploys. We’ll look into key metrics you can use to identify the right time to begin the transition from monolith to microservices.
Event-Driven Microservices architecture has gained a lot of attention recently. The trend in the industry is to move away from Monolithic applications to Microservices to innovate faster. While Microservices have their benefits, implementing them is hard. This talk focuses on the challenges faced and how to solve them.
It covers topics like using Domain Driven Design to break functionality into small parts. Various communication patterns among Microservices are also discussed.
One major drawback is the problem of distributed data management, as each Microservice has its own database. Event-Driven Architecture enables a way to make microservices work together and the talks show how to use architectural patterns like Event Sourcing & CQRS to implement them.
Another implementation challenge is to manage transactions that update entities owned by multiple services in an eventually consistent fashion. This challenge is solved using sagas, which can be thought of as Long running transactions that use compensating actions to handle failures.
The objective of the talk is to show how to implement highly distributed Event Driven Microservices architecture that are scalable and easy to maintain.
Event-driven architecture (EDA) is a software architecture pattern promoting the production, detection, consumption of, and reaction to events.
This architectural pattern may be applied by the design and implementation of applications and systems which transmit events among loosely coupled software components and services.
In this session you’ll learn how to create a loosely coupled architecture for your business that has the domain at the core. You’ll learn the basics of EDA, and also learn how we are transforming our architecture at Unibet.com to become event driven, and what benefits it will bring to our business. The session will cover technologies such as JMS, XML, JSON, Google Protocol Buffers, ActiveMQ and Spring.
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.
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
Kafka as an Event Store - is it Good Enough?Guido Schmutz
Event Sourcing and CQRS are two popular patterns for implementing a Microservices architectures. With Event Sourcing we do not store the state of an object, but instead store all the events impacting its state. Then to retrieve an object state, we have to read the different events related to a certain object and apply them one by one. CQRS (Command Query Responsibility Segregation) on the other hand is a way to dissociate writes (Command) and reads (Query). Event Sourcing and CQRS are frequently grouped and used together to form something bigger. While it is possible to implement CQRS without Event Sourcing, the opposite is not necessarily correct. In order to implement Event Sourcing, an efficient Event Store is needed. But is that also true when combining Event Sourcing and CQRS? And what is an event store in the first place and what features should it implement? This presentation will first discuss what functionalities an event store should offer and then present how Apache Kafka can be used to implement an event store. But is Kafka good enough or do specific event store solutions such as AxonDB or Event Store provide a better solution?
A whirlwind tour of Event Driven Architecture, extensibility, Domain Driven Design, Command and Query Responsibility Segregation (CQRS) and Complex Event Processing
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 modern engineering technique has grown from good old SOA (Service Oriented Architecture) with features like REST (vs. old SOAP) support, NoSQL databases and the Event driven/reactive approach sprinkled in.
Microservices
The criticism
Evolutionary approach
Best practices
Create a Separate Database for Each Service
Rely on contracts between services
Deploy in Containers
Treat Servers as Volatile
Related techniques and patterns
Design patterns
Integration techniques
Deployment of microservices
Serverless - Function as a Service
Continuous Deployment
Related technologies
Microservices based e-commerce platforms
Technologies that empower microservices achitecture
Distributed logging and monitoring
Case Studies: Re-architecting the monolith
In this presentation, I will explain event driven architecture, describe the different types of events, demonstrate how events can be related and orchestrated, and provide a basic understanding of how this method can drive the architecture of enterprise systems. In addition to understanding the concepts of event driven architecture, we will explore a working sample built using an open-source .NET messaging framework called MassTransit.
Fundamental and Practice.
Explain about microservices characters and pattern. And also how to be good build microservices. And also additional the scale cube and CAP theory.
apidays LIVE Jakarta - Building an Event-Driven Architecture by Harin Honesty...apidays
apidays LIVE Jakarta 2021 - Accelerating Digitisation
February 24, 2021
Building an Event-Driven Architecture
Harin Honestyandi Parandika, Microservice and Middleware Designer at XL Axiata
Event-driven architecture (EDA) is a software architecture pattern promoting the production, detection, consumption of, and reaction to events.
This architectural pattern may be applied by the design and implementation of applications and systems which transmit events among loosely coupled software components and services.
In this session you’ll learn how to create a loosely coupled architecture for your business that has the domain at the core. You’ll learn the basics of EDA, and also learn how we are transforming our architecture at Unibet.com to become event driven, and what benefits it will bring to our business. The session will cover technologies such as JMS, XML, JSON, Google Protocol Buffers, ActiveMQ and Spring.
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.
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
Kafka as an Event Store - is it Good Enough?Guido Schmutz
Event Sourcing and CQRS are two popular patterns for implementing a Microservices architectures. With Event Sourcing we do not store the state of an object, but instead store all the events impacting its state. Then to retrieve an object state, we have to read the different events related to a certain object and apply them one by one. CQRS (Command Query Responsibility Segregation) on the other hand is a way to dissociate writes (Command) and reads (Query). Event Sourcing and CQRS are frequently grouped and used together to form something bigger. While it is possible to implement CQRS without Event Sourcing, the opposite is not necessarily correct. In order to implement Event Sourcing, an efficient Event Store is needed. But is that also true when combining Event Sourcing and CQRS? And what is an event store in the first place and what features should it implement? This presentation will first discuss what functionalities an event store should offer and then present how Apache Kafka can be used to implement an event store. But is Kafka good enough or do specific event store solutions such as AxonDB or Event Store provide a better solution?
A whirlwind tour of Event Driven Architecture, extensibility, Domain Driven Design, Command and Query Responsibility Segregation (CQRS) and Complex Event Processing
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 modern engineering technique has grown from good old SOA (Service Oriented Architecture) with features like REST (vs. old SOAP) support, NoSQL databases and the Event driven/reactive approach sprinkled in.
Microservices
The criticism
Evolutionary approach
Best practices
Create a Separate Database for Each Service
Rely on contracts between services
Deploy in Containers
Treat Servers as Volatile
Related techniques and patterns
Design patterns
Integration techniques
Deployment of microservices
Serverless - Function as a Service
Continuous Deployment
Related technologies
Microservices based e-commerce platforms
Technologies that empower microservices achitecture
Distributed logging and monitoring
Case Studies: Re-architecting the monolith
In this presentation, I will explain event driven architecture, describe the different types of events, demonstrate how events can be related and orchestrated, and provide a basic understanding of how this method can drive the architecture of enterprise systems. In addition to understanding the concepts of event driven architecture, we will explore a working sample built using an open-source .NET messaging framework called MassTransit.
Fundamental and Practice.
Explain about microservices characters and pattern. And also how to be good build microservices. And also additional the scale cube and CAP theory.
apidays LIVE Jakarta - Building an Event-Driven Architecture by Harin Honesty...apidays
apidays LIVE Jakarta 2021 - Accelerating Digitisation
February 24, 2021
Building an Event-Driven Architecture
Harin Honestyandi Parandika, Microservice and Middleware Designer at XL Axiata
In questo talk, assieme ad Andrea Gioia, Partner di Quantyca, abbiamo spiegato il ruolo di Apache Kafka e come possano supportare architetture e soluzioni 'event driven' o perchè Kafka è un'ottima scelta per fare 'event sourcing'.
Microservices architecture, as name suggests, talks about splitting your application into small distributed services each of which offers a specific small business/technical functionality.
Modern Cloud-Native Streaming Platforms: Event Streaming Microservices with K...confluent
Microservices, events, containers, and orchestrators are dominating our vernacular today. As operations teams adapt to support these technologies in production, cloud-native platforms like Cloud Foundry and Kubernetes have quickly risen to serve as force multipliers of automation, productivity and value. Kafka is providing developers a critically important component as they build and modernize applications to cloud-native architecture. This talk will explore:
• Why cloud-native platforms and why run Kafka on Kubernetes?
• What kind of workloads are best suited for this combination?
• Tips to determine the path forward for legacy monoliths in your application portfolio
• Running Kafka as a Streaming Platform on Container Orchestration
There is not much of complexity in terms of processes and communications between services in a Monolithic Application that deal with a single relational database. Most of the relational database use ACID transaction to process each request from the client.
Restate: Event-driven Asynchronous Services, Easy as Synchronous RPCHostedbyConfluent
"Event-driven services are a popular pattern in microservice architectures. Compared to RPC services, they are typically more resilient (especially when using durable logs, like Kafka), efficient, and scalable. Plus they lend themselves to advanced techniques like bootstrapping/reinstating the service from an existing event log.
But writing event-driven services is much harder than writing RPC-based services: Instead of writing simple request/reply handlers, developers must express logic as asynchronous event-handling logic, introduce complex state machines (and handle concerns of their consistency and persistence). Logic gets spread logic across different event handlers. Applications need to be aware of subscriptions, hot partitions, slow re-balancing, head-of-the-line waiting issues, etc. Many companies that adopt event-driven services find themselves building extensive tools to support dead letter queues, delayed events, and handle retries/recovery/idempotency.
We are developing Restate, to make event-driven applications as easy as RPC-based application. Developers write RPC-based services and Restate adds lightweight durable execution to the handlers (making them suspendable and allowing them to recover partial progress), persistent communication, and request ordering. The result is that code written as simple request/response RPCs executes with the same resilience and efficiency as an async state machine driven by events from a persistent queue, but remains easy to write, reason about, debug, and observe.
Restate natively integrates with Kafka, allowing users to directly process events of Kafka topics with Restate durable async/await programming model. We believe that Restate complements the current landscape of event-processing systems, by radically simplifying transactional event-driven applications that require complex control flow or interact with many external systems."
Arsitektur Aplikasi Modern - Faisal Henry SusantoDicodingEvent
Baparekraf Developer Day adalah kegiatan yang diadakan oleh Kementerian Pariwisata dan Ekonomi Kreatif/Badan Pariwisata dan Ekonomi Kreatif (Kemenparekraf/Baparekraf) dengan tujuan mengasah kemampuan teknis pengembang aplikasi di Indonesia. Kegiatan ini memungkinkan transfer pengetahuan dan standar industri secara langsung dari para praktisi yang telah sukses, khususnya pada bidang pengembangan aplikasi.
Back-End Session
Tema: Arsitektur Aplikasi Modern
Speaker: Faisal Henry Susanto (Praktisi IT)
Online Dashboard, artık dashboard tasarımı, gösterimi ve yetkilendirme için ekstra araç almaya gerek kalmaksızın herhangi bir servisle entegre olarak istediğiniz zaman güncel dashboardu anlık olarak istediğiniz platformda görüntülemeye olanak sunan bir uçtan uca çözümdür.
SoBot Sistek çatısı altında bulunan tüm projelerle kolayca entegre olabilecek, müşterilerin destek elamanlarına ihtiyacından dolayı ortaya çıkmış bir ChatBot uygulamasıdır.
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
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
Utilocate offers a comprehensive solution for locate ticket management by automating and streamlining the entire process. By integrating with Geospatial Information Systems (GIS), it provides accurate mapping and visualization of utility locations, enhancing decision-making and reducing the risk of errors. The system's advanced data analytics tools help identify trends, predict potential issues, and optimize resource allocation, making the locate ticket management process smarter and more efficient. Additionally, automated ticket management ensures consistency and reduces human error, while real-time notifications keep all relevant personnel informed and ready to respond promptly.
The system's ability to streamline workflows and automate ticket routing significantly reduces the time taken to process each ticket, making the process faster and more efficient. Mobile access allows field technicians to update ticket information on the go, ensuring that the latest information is always available and accelerating the locate process. Overall, Utilocate not only enhances the efficiency and accuracy of locate ticket management but also improves safety by minimizing the risk of utility damage through precise and timely locates.
Launch Your Streaming Platforms in MinutesRoshan Dwivedi
The claim of launching a streaming platform in minutes might be a bit of an exaggeration, but there are services that can significantly streamline the process. Here's a breakdown:
Pros of Speedy Streaming Platform Launch Services:
No coding required: These services often use drag-and-drop interfaces or pre-built templates, eliminating the need for programming knowledge.
Faster setup: Compared to building from scratch, these platforms can get you up and running much quicker.
All-in-one solutions: Many services offer features like content management systems (CMS), video players, and monetization tools, reducing the need for multiple integrations.
Things to Consider:
Limited customization: These platforms may offer less flexibility in design and functionality compared to custom-built solutions.
Scalability: As your audience grows, you might need to upgrade to a more robust platform or encounter limitations with the "quick launch" option.
Features: Carefully evaluate which features are included and if they meet your specific needs (e.g., live streaming, subscription options).
Examples of Services for Launching Streaming Platforms:
Muvi [muvi com]
Uscreen [usencreen tv]
Alternatives to Consider:
Existing Streaming platforms: Platforms like YouTube or Twitch might be suitable for basic streaming needs, though monetization options might be limited.
Custom Development: While more time-consuming, custom development offers the most control and flexibility for your platform.
Overall, launching a streaming platform in minutes might not be entirely realistic, but these services can significantly speed up the process compared to building from scratch. Carefully consider your needs and budget when choosing the best option for you.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
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/
Quarkus Hidden and Forbidden ExtensionsMax Andersen
Quarkus has a vast extension ecosystem and is known for its subsonic and subatomic feature set. Some of these features are not as well known, and some extensions are less talked about, but that does not make them less interesting - quite the opposite.
Come join this talk to see some tips and tricks for using Quarkus and some of the lesser known features, extensions and development techniques.
Artificia Intellicence and XPath Extension FunctionsOctavian Nadolu
The purpose of this presentation is to provide an overview of how you can use AI from XSLT, XQuery, Schematron, or XML Refactoring operations, the potential benefits of using AI, and some of the challenges we face.
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.
GraphSummit Paris - The art of the possible with Graph TechnologyNeo4j
Sudhir Hasbe, Chief Product Officer, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
Navigating the Metaverse: A Journey into Virtual Evolution"Donna Lenk
Join us for an exploration of the Metaverse's evolution, where innovation meets imagination. Discover new dimensions of virtual events, engage with thought-provoking discussions, and witness the transformative power of digital realms."
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxrickgrimesss22
Discover the essential features to incorporate in your Winzo clone app to boost business growth, enhance user engagement, and drive revenue. Learn how to create a compelling gaming experience that stands out in the competitive market.
E-commerce Application Development Company.pdfHornet Dynamics
Your business can reach new heights with our assistance as we design solutions that are specifically appropriate for your goals and vision. Our eCommerce application solutions can digitally coordinate all retail operations processes to meet the demands of the marketplace while maintaining business continuity.
Atelier - Innover avec l’IA Générative et les graphes de connaissancesNeo4j
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Allez au-delà du battage médiatique autour de l’IA et découvrez des techniques pratiques pour utiliser l’IA de manière responsable à travers les données de votre organisation. Explorez comment utiliser les graphes de connaissances pour augmenter la précision, la transparence et la capacité d’explication dans les systèmes d’IA générative. Vous partirez avec une expérience pratique combinant les relations entre les données et les LLM pour apporter du contexte spécifique à votre domaine et améliorer votre raisonnement.
Amenez votre ordinateur portable et nous vous guiderons sur la mise en place de votre propre pile d’IA générative, en vous fournissant des exemples pratiques et codés pour démarrer en quelques minutes.
Zoom is a comprehensive platform designed to connect individuals and teams efficiently. With its user-friendly interface and powerful features, Zoom has become a go-to solution for virtual communication and collaboration. It offers a range of tools, including virtual meetings, team chat, VoIP phone systems, online whiteboards, and AI companions, to streamline workflows and enhance productivity.
2. Agenda
01
02
03
04
Introduction To Event Driven Architecture
What is Saga Pattern?
Choreography-Based Saga
Orchestration-Based Saga
Benefits of Event Driven Architecture
Message Brokers
What is Message Broker?
Vert.x
What is Vert.x?
How Does It Work?
Spring Web Reactive
What is WebFlux?
Spring MVS vs WebFlux
3. Event Driven Programming
Event-driven programming is a programming paradigm in which the
flow of program execution is determined by events - for example a
user action such as a mouse click, key press, or a message from th
e operating system or another program.
An event-driven application is designed to detect events as they
occur, and then deal with them using an appropriate event-handling
procedure.
4. What is a distributed transaction?
When a microservice architecture decomposes a monolithic system into self-encapsulated services,
it can break transactions. This means a local transaction in the monolithic system is now distributed
into multiple services that will be called in a sequence.
Monolithic System Microservices
03
5. What Is The Problem?
In a database system,
atomicity means that in a
transaction either all steps
complete or no steps
complete. The microservice-
based system does not have
a global transaction
coordinator by default. In the
example above, if the
CreateOrder method fails,
how do we roll back the
changes we applied by the
CustomerMicroservice?
How do we
keep the
transaction
atomic?
Do we
isolate user
actions for
concurrent
requests?
If an object is written by a
transaction and at the same
time (before the transaction
ends), it is read by another
request, should the object
return old data or updated
data? In the example above,
once UpdateCustomerFund
succeeds but is still waiting
for a response from
CreateOrder, should
requests for the current
customer’s fund return the
updated amount or not?
6. Possible SolutionsThe problems are important for microservice-based systems. Otherwise, there is no way to tell
if a transaction has completed successfully.
2pc Pattern
2pc is widely used in database
systems. For some situations,
you can use 2pc for
microservices. Just be careful;
not all situations suit 2pc and,
in fact, 2pc is considered
impractical within a
microservice architecture
Saga Pattern
The Saga pattern is another
widely used pattern for
distributed transactions. It is
different from 2pc, which is
synchronous. The Saga pattern
is asynchronous and reactive.
7. So what is a two-phase commit?
As its name hints, 2pc has two phases: A prepare phase and a commit phase. In the prepare phase, all
microservices will be asked to prepare for some data change that could be done atomically. Once all microservices
are prepared, the commit phase will ask all the microservices to make the actual changes.
8. Agenda Style2pcPattern
2pc is a very strong
consistency protocol. First, the
prepare and commit phases
guarantee that the transaction
is atomic. The transaction will
end with either all
microservices returning
successfully or all
microservices have nothing
changed. Secondly, 2pc allows
read-write isolation. This means
the changes on a field are not
visible until the coordinator
commits the changes.
Advantages
While 2pc has solved the
problem, it is not really
recommended for many
microservice-based systems
because 2pc is synchronous
(blocking). The protocol will
need to lock the object that will
be changed before the
transaction completes. This is
not good. In a database
system, transactions tend to
be fast—normally within 50 ms.
However, microservices have
long delays with RPC calls.
Disadvantages
9. The SAGA Pattern
A saga is a sequence of local transactions where each transaction updates data within a single service The first transac
tion is initiated by an external request corresponding to the system operation, and then each subsequent step is triggere
d by the completion of the previous one.
Events/Choreography: When there is no
central coordination, each service produces
and listen to other service’s events and
decides if an action should be taken or not.
Command/Orchestration: when a
coordinator service is responsible for
centralizing the saga’s decision making
and sequencing business logic
10. Events/Choreography
1.Order Service saves a new order, set the state as pe
nding and publish an event called ORDER_CREATED
_EVENT.
2. The Payment Service listens to ORDER_CREATED
_EVENT, charge the client and publish the event
BILLED_ORDER_EVENT.
3. The Stock Service listens to BILLED_ORDER_EVE
NT, update the stock, prepare the products bought in t
he order and publish ORDER_PREPARED_EVENT.
4. Delivery Service listens to ORDER_PREPARED_E
VENT and then pick up and deliver the product. At the
end, it publishes an ORDER_DELIVERED_EVENT
5. Finally, Order Service listens to
ORDER_DELIVERED_EVENT and set the state of th
e order
11. Rolling back in Saga’s Events/Choreography
1.Stock Service produces
PRODUCT_OUT_OF_STOCK_EVE
NT;
2.Both Order Service and Payment S
ervice listen to the previous message:
3.Payment Service refund the client
4.Order Service set the order state
as failed
12. Command/Orchestration
1.Order Service saves a pending order
and asks Order Saga Orchestrator (OS
O) to start a create order transaction.
2.OSO sends an Execute Payment co
mmand to Payment Service, and it repli
es with a Payment Executed message
3.OSO sends a Prepare Order comman
d to Stock Service, and it replies with a
n Order Prepared message
4.OSO sends a Deliver Order comman
d to Delivery Service, and it replies with
an Order Delivered message
13. Rolling back in Saga’s Command/Orchestration
1.Stock Service replies to OSO with an
Out-Of-Stock message;
2. OSO recognizes that the transaction
has failed and starts the rollback
In this case, only a single operation wa
s executed successfully before the failu
re, so OSO sends a Refund Client com
mand to Payment Service and set the o
rder state as failed
14. Agenda StyleSagaPattern
One big advantage of the Saga
pattern is its support for long-
lived transactions. Because
each microservice focuses only
on its own local atomic
transaction, other
microservices are not blocked if
a microservice is running for a
long time. This also allows
transactions to continue waiting
for user input. Also, because all
local transactions are
happening in parallel, there is
no lock on any object.
Advantages
The Saga pattern is difficult to
debug, especially when many
microservices are involved.
Also, the event messages
could become difficult to
maintain if the system gets
complex. Another
disadvantage of the Saga
pattern is it does not have read
isolation. For example, the
customer could see the order
being created, but in the next
second, the order is removed
due to a compensation
transaction.
Disadvantages
15. Message Broker
In its core, a message broker is “a program that
translates a message to a formal messaging
protocol of the sender, to the formal messaging
protocol of the receiver”
16. Which Message Brokers are out there to process my events?
There are tons of message brokers out there (ActiveMQ, Kafka, RabbitMQ, OMS, JMS, Redis
, Service Bus, …) three popular ones
Apache
Kafka
Azure
Event Hub RabbitMQ
RabbitMQ was one of the first open source message
brokers, developed to implement AMQP to work across
different platforms and languages.
Apache Kafka is a Message Broker originally developed by
LinkedIn and open sourced early 2011. It is just like Azure Event
Hub a platform capable of handling millions of events.
Azure Event Hub allows you to set up a scalable Event Hub that suits your
needs in a couple of seconds. It is a PaaS offering by Microsoft Azure, so that
you do not need to manage it, but rather just consume it.
17. Blocking vs. Non-Bloking
Blocking
In traditional MVC applications,
when a request come to server, a
servlet thread is created. It
delegates the request to worker
threads for I/O operations such as
database access etc. During the
time worker threads are busy,
servlet thread (request thread)
remain in waiting status and thus it
is blocked. It is also called
synchronous request processing.
Non-Bloking
All incoming requests come with a event
handler and call back information.
Request thread delegates the incoming
requests to a thread pool (generally
small number of threads) which
delegate the request to it’s handler
function and immediately start
processing other incoming requests
from request thread.
When the handler function is complete,
one of thread from pool collect the
response and pass it to the call back
function.
18. Eclipse Vert.x is event driven and
non blocking. This means your app
can handle a lot of concurrency
using a small number of kernel
threads. Vert.x lets your app scale
with minimal hardware.
Vert.x is incredibly flexible -
whether it's simple network utilities,
sophisticated modern web
applications, HTTP/REST
microservices, high volume event
processing or a full blown back-
end message-bus application,
Vert.x is a great fit.
You can use Vert.x with multiple
languages including Java,
JavaScript, Groovy, Ruby, Ceylon,
Scala and Kotlin.
01
02
03
04
Vert.x
Eclipse Vert.x is a tool-kit for building reactive applications on the JVM.
Polyglot
Scale
Flexible
Vert.x is an ideal choice for
creating light-weight, fast, high-
performance, microservices.
Fast
19. How does it look like?
Vert.x
Spring MVC
As you can see, you add a request handler to
your verticle. Then this handler will be invoked
by the event loop for every request.
After that you filter the requests (e.g. by HttpM
ethod and path) and respond. You also have to
start your HTTP server.
The difference is here that Spring Boot
provides defaults which allow you an easy
start and get fast results. Spring MVC
combined with Spring Boot has a higher
usability and an easier readability in general.
Also, you do not have to understand all that is
going on in the background to create your
Hello World application.
20. Spring WebFlux
Spring WebFlux framework is part of Spring 5 and provides reactive programming support for web applications.
Web
Flux
A non-blocking approach which makes it possible to handle
concurrency with a small number of threads and to scale effectively
Functional programming
Less memory
Availibility to serve traffic
Spring WebFlux is a reactive web framework based on a reactive HTTP
layer; such apps can be deployed on Netty or Undertow (with native
adapters) or Jetty/Tomcat/any Servlet 3.1 container (thanks to a Servlet
3.1 adapter).