SlideShare una empresa de Scribd logo
All contents © MuleSoft, LLC
2nd February 2022
18:00 Europe/CET | 17:00 UK/GMT | 22:30 Delhi, India/IST
9:00 San Francisco/PST | 12:00 New York
Event Driven
Architecture with
Mulesoft
David Guest
All contents © MuleSoft, LLC
Virtual Muleys Meetup
(Online Group - English )
Moderator: Angel Alberici
February Edition, 2022
Recording
All contents © MuleSoft, LLC
Virtual Muleys Meetup (Online Group - English)
7
7
All contents © MuleSoft, LLC
Announcements & Updates
All contents © MuleSoft, LLC
● Some of the most popular and useful
self-help resources available to MuleSoft
customers
● MuleSoft Videos Youtube channel:
https://sfdc.co/cmZrjq
6 minutes on Customer facing self-help resources | Friends of
Max overview
11
All contents © MuleSoft, LLC
Product Roadmap December 2021
https://www.mulesoft.com/demo/customers
Watch it if you haven’t!
All contents © MuleSoft, LLC
MuleSoft Partner Kick Off 2022 - 24th March
MuleSoft’s largest partner event of the year - PKO ’22 - is coming back! PKO ’22 will be
packed with all the information that partners need to thrive with MuleSoft in 2022.
Save the date!
All contents © MuleSoft, LLC
What’s new
● IBM + Mule - Extending Runtime Fabric to run on
Red Hat Openshift (here)
● MuleSoft Transform: Announcement in the next
couple of weeks.
● Aligning Integration Strategy with Business
Objectives - Check it out here.
● Data + APIs - Data economics and composable
data, and shown how APIs can support an
enterprise-wide data strategy. Check out the
articles in order here: one, two, and three.
15
● Roadmap Update - High level view of 14th December:
○ Universal API Management;
○ support for designing & discovering event-driven
APIs;
○ Enhanced API Governance;
○ Mule 4.4;
○ AWS Transit Gateway;
○ Cloudhub 2.0
○ Connectors such as MQTT, Outlook 365, Shopify,
and loads more
○ Accelerators for Retail, Healthcare, SAP, and
Financial Services
○ And a whole lot more!
All contents © MuleSoft, LLC
What’s new: Training
● 3 Day Fundamentals - We are now offering a 3 days version of the Development: Fundamentals
course, which requires learners to have completed an Intro to Anypoint Platform Workshop or the
Getting Started with Anypoint Platform course.
● Earn a certification attempt - Learners will be able to earn their MCD - L1 (Mule 4) certification
attempt by completing the self-paced “Anypoint Platform Development: Fundamentals” course. The
exam will then appear in their learner dashboard for scheduling.
● Flex - The training team are now offering ‘Flex’ courses which take place over a weekend or broken
up over half days.
16
All contents © MuleSoft, LLC
Same address: https://knowledgehub.mulesoft.com/s/
Catalyst Knowledge Hub: We changed its name again!
17
All contents © MuleSoft, LLC
● Azure Git Repository Clone Utility Scripts - Batch Updates - Utility PowerShell scripts, shell scripts, and
git commands and the steps that need to be followed to clone all the repositories from Azure DevOps Git
Repository and do checkouts, rebase, commits, push, etc in batch mode( more than one repository at a
time)
● Mule Development Best Practices - Mule Development - best practices and standards to apply in the
implementation/development phase of the API Development Life Cycle.
● Workday Business Process - Slack Integration - This is a starter utility that might be useful for someone
trying to implement a Slack-ops type of communication standard where Workday is the data source.
Catalyst Knowledge Hub:
18
All contents © MuleSoft, LLC
2nd February 2022
18:00 Europe/CET | 17:00 UK/GMT | 22:30 Delhi, India/IST
9:00 San Francisco/PST | 12:00 New York
Event Driven
Architecture with
Mulesoft
David Guest
All contents © MuleSoft, LLC
Meetup - Event Driven
Architecture
David Guest, Customer Success Architect
All contents © MuleSoft, LLC
Agenda
1. Level Set
2. Event Driven (Async) vs Synchronous
3. Event Driven Infrastructure
4. Common Patterns
5. Mulesoft Implementation
6. Tales from the Field
All contents © MuleSoft, LLC
Level Set
All contents © MuleSoft, LLC
History
● Internal messaging systems at application/operating system level
● Flat Files/Formatted Files transfer between systems
● IBM MQSeries came along in 1993
● SOAP / XML appeared around 2000
● Proprietary until Advanced Message Queueing Protocol (AMQP) arrived in 2003
● JSON in 2013
● Modelling APIs
● Modelling Event Driven APIs
All contents © MuleSoft, LLC
Is it really Real-Time?
● Real-time or real time describes various operations in computing or other processes that
must guarantee response times within a specified time (deadline), usually a relatively
short time. A real-time process is generally one that happens in defined time steps of
maximum duration and fast enough to affect the environment in which it occurs, such as
inputs to a computing system.
● The basic premise around real-time APIs is that they are event-driven. According to the
event-driven design pattern, a system should react or respond to events as they happen.
All contents © MuleSoft, LLC
Instant confirmation
Initiate an action
$40M
worth in revenue in
capital markets*
0.1%
Additional revenue
on mobile apps
$.5M
Saved in costs for
logistics
Value of
10 ms
35
What are real-time experiences worth to you?
Source: https://perspectives.mvdirona.com/2009/10/the-cost-of-latency/
All contents © MuleSoft, LLC
Scenario: ATM Card Withheld
Event-Driven Automation
Automate Your
Processes Faster
Support Customers via
Multiple Channels
Achieve Single View of
Customer
Event Store
Bank Systems
ATM Card
withheld event
Notify Branch to
start new ATM
Card process
Trigger SMS to
inform customer
ATM Card State
updated
Case created
1
2
3
4
5
All contents © MuleSoft, LLC
Scenario: Cross-Sell/Up-Sell with Social
Listening
Personalized Experience for Customer
Event Store
Bank Systems
LINE Pay
wedding booking
event
Trigger loan offer
promotion
Check customer
credit rating
Pitch promotion
on LINE
1
2
3
4
Real-Time Marketing Offers
Automated Consumer
Journeys
Expand Your Business
through Cross-Sell/Upsell
All contents © MuleSoft, LLC 38
But, building real-time experiences is hard
Business teams want to... IT teams want to...
..and more
Capture and unlock real-time data
Add or modify services with limited impact
Improve latencies and avoid polling madness
Respond in real-time to customers
Compete by expanding business capabilities
Optimize costs spent on resources
..and more
Real time application
All contents © MuleSoft, LLC 39
Is your digital backbone ready to power real-time?
request
response
98.5% of API polls do not return any new information
Excessive coupling limits flexibility to add new services
Failures cascade through all the coupled services
Response times to the customer are slow
Synchronous communication
All contents © MuleSoft, LLC
Event Driven Infrastructure
All contents © MuleSoft, LLC
Event-Driven Architectures: Core concepts
A simple event-driven system - it used to be easy
JMS
Event broker
Account
Change event
Account
Updated!
Event brokers
Event producers Event consumers
All contents © MuleSoft, LLC
Event grid / hubs / mesh...
Message queues
JMS
Streaming platform
Explosion in # enterprise systems + real-time needs
Event driven is no longer just Pub-Sub
Message brokers
Event producers Event consumers
All contents © MuleSoft, LLC
Event Driven vs Synchronous
All contents © MuleSoft, LLC
Queue Processing vs Synchronous
● Reliability
● Demand Throttling
● Load Balancing
● High Availability
● Multiple Recipients
● Internet of Things
● Integration with modern SaaS applications
● Error Handling
● Avoids Polling
All contents © MuleSoft, LLC
Shift to Event Driven
● Req-reply <= 50% of the equation
● The World is Event Driven
● The Web World operates on HTTP and it isn’t designed for Async interactions
● IoT is Async by nature and is getting bigger & HTTP/Req-Reply doesn’t really cut it
● ‘Fire-and-forget’ processing model
○ In certain situations, a formal response is not needed (Although an acknowledgement
may be required)
○ Very useful when the requirement is only to inform a downstream process (Or processes) that
‘something has happened’
All contents © MuleSoft, LLC
Common Patterns
All contents © MuleSoft, LLC
Message Flow
All contents © MuleSoft, LLC
Event-Driven Architectures: Core concepts
48
Publisher Broker Consumer
All contents © MuleSoft, LLC
Event-Driven Architectures: Multi-subscriber
49
Publisher Broker
Subscriber
Subscriber
Subscriber
All contents © MuleSoft, LLC
Single atomic transaction
Event-Driven Architectures: Atomic
Transactions
50
Publisher Broker
Subscriber
Subscriber
Subscriber
All contents © MuleSoft, LLC
Saga: Choreography-based
51
Order Service
Order
Events
Customer
Events
<<Order Aggregate>>
Customer Service
<<CustomerAggregate>>
Order
Created
Credit
Reserved
All contents © MuleSoft, LLC
Broker
Saga: Orchestration-based
52
Customer
Service
Command
<<Order Aggregate>> <<CustomerAggregate>>
Reserve
Credit
Command
Credit
Reserved
Order Controller
Order Service
Create Order Saga
Customer Service
Create
Order Saga
Reply
Customer
Command Handler
Order
Command
Handler
All contents © MuleSoft, LLC
Sagas in Mule
Request
Response
Request
Response
Event Event
Choreography
Orchestration
All contents © MuleSoft, LLC
Message Content
All contents © MuleSoft, LLC
Thin Event Notification
55
Broadcast only the necessary details to notify that an event occurred
Forces subscribers to fetch additional details to complete a task
Use when:
The desire is to prevent subscribers processing stale data. They are forced to fetch the latest data
due to frequent changes or potentially delayed processing
{
“eventType” : “com.example.customer.address”,
“eventId” : “1234567”,
“updatedAt” : “2021-12-25”,
“customerId” : “9876543”
}
All contents © MuleSoft, LLC
Hypermedia-Driven Notification
56
Include hypermedia links in event payloads
Helps consumers find the right API for details
Use when:
You wish to bridge event notifications with API integration
{
“eventType” : “com.example.customer.address”,
“eventId” : “1234567”,
“updatedAt” : “2021-12-25”,
“customerId” : “9876543”,
“_links”: [
{ “rel”:”customer”, “href”:”href”:”/customers/9876543” }
All contents © MuleSoft, LLC
Event-Carried State Transfer
57
Broadcasts all known data at the time of the event
Often contain the entire record, avoiding the need to contact the source system to conduct
further work
Use when:
Subscribers want a snapshot of the data with the event
Sharing data state changes through message streaming (Apache Kafka, Apache Pulsar, etc.) to
support replaying message history.
Using event sourcing /CQRS to capture state changes over time
{
“eventType” : “com.example.customer.address”,
“eventId” : “1234567”,
“updatedAt” : “2021-12-25”,
“customerId” : “9876543”,
“Address” : {
All contents © MuleSoft, LLC
Structured Event Payloads
58
Groups properties as nested structures
Avoids flat structures that require subscribers to figure out how properties are grouped
Helps drive evolvability as property names are scoped to the parent property (e.g. addressLine1)
Use when:
Event payloads require complex data structures
Event payloads have nested 1-to-many relationships as part of an event payload
{
contactDetails:
firstName
lastName
Email
billingAddress:
addressLine1
addressLine2
All contents © MuleSoft, LLC
Offline and Error Recovery Support
59
Supplement event notification channels with APIs that allow offline consumers to catch up
Also allows consumers to identify and troubleshoot failed deliveries
Use when:
Consumers have limited or no access to internal mechanisms to detect errors
When offline support is necessary to keep consumers in-sync
API: Listing recent dispatches
All contents © MuleSoft, LLC
Separate Internal and External Events
60
Design internal events for coordinating implementation details
Design external events for notification and extensibility
Use when:
Event-driven architecture is being used internally, but external events are desired
Prevent leaking implementation details or special knowledge of how your internal systems
operate
{
“eventType”: “authorised”,
“transactionId”: “123456”,
“authorisationServer”: “auth.internal.com”,
“customerId”: “cust1234”,
“transactionAmount”: “1299”,
“transactionCurrency”: “GBP”
…
}
{
“Event”:{
“Type”: “paymentProcessed”,
“OrderId”: “ord1234”,
…
}
}
All contents © MuleSoft, LLC
Mulesoft Implementation
All contents © MuleSoft, LLC
Event grid / hubs / mesh...
Message brokers
JMS
Streaming platform
● What event-driven APIs does
my company have?
● What info to include in the
event?
● What channels? Protocols?
#1: Discovering events and event-driven APIs
Re-use is challenging as custom coding creates black boxes
?
All contents © MuleSoft, LLC
#2: Governing brokers and events consistently
Managing security, access management and validation for APIs and brokers is hard
?
● How are each brokers
managing authentication?
● How do IT apply rules
consistently across brokers,
apps and events?
AMQP
JMS
?
?
● Plaintext
● SASL - Oauth
● mTLS
● LDAP
● IAM users
● IAM Roles
● SecretKey
All contents © MuleSoft, LLC
#3: Monitoring events is …..um “hard”
Even harder to derive insights and take preventive action
Update
account!
SFDC
Updated
Netsuite
error..50
3
!
????????
!
Profile service
SFDC service Netsuite service
● Show me all events related to
customer x?
● How can we look at event
flows, identify malicious
patterns and get alerted?
JMS
Profile
service
All contents © MuleSoft, LLC
Journey to enterprise scale event-driven..
Choose a technology solution that can help you transition seamlessly
DESIGN
with open
standards &
simple
tooling
REUSE
Existing
assets in
design
MANAGE
& SECURE
your APIs
with policies
REGISTER
with event
brokers
`
Now
FY23
Now
FY23
All contents © MuleSoft, LLC
REUSE
Existing
assets in
design
DESIGN
with open
standards
& simple
tooling
REGISTER
with event
brokers
MANAGE
& SECURE
your APIs
with
policies
Journey to enterprise scale event-driven..
#1: Discover and reuse your existing assets and best practices
Discover your reusable assets
easily
Explore your Event-driven APIs
quickly
Acquire the right API with limited
support
Now
All contents © MuleSoft, LLC
REUSE
REST
fragments
in design
DESIGN
with open
standards &
simple
tooling
REGISTER
with event
brokers
MANAGE
& SECURE
your APIs
with
policies
Journey to enterprise scale event-driven..
#2: Use AsyncAPI to establish an enterprise-grade standard
Well-documented contract on
how to interact with services
Discover, reuse, manage and
govern events in the enterprise
Open-source and protocol agnostic allowing
interoperability
Now
All contents © MuleSoft, LLC
Journey to enterprise scale event-driven..
#3: Connect with brokers to stream events across a distributed enterprise
Platform to compose business capabilities
` JMS
Discover Design Manage Secure Monitor
REUSE
REST
fragments
in design
DESIGN
with open
standards
& simple
tooling
REGISTER
with event
brokers
MANAGE
& SECURE
your APIs
with
policies
FY23
All contents © MuleSoft, LLC
Journey to enterprise scale event-driven..
#4: Comprehensively monitor your events and request/response in a single view
Centralized &
proactive
monitoring across
your services
Shopping
API
Monitor user and application
behaviour
🕵
Get alerted proactively on
mission critical operations
🚨
Search through events to
identify the root cause of
issues
🔎
REUSE
REST
fragments
in design
DESIGN
with open
standards
& simple
tooling
REGISTER
with event
brokers
MANAGE
& SECURE
your APIs
with
policies
FY23
All contents © MuleSoft, LLC
“AsyncAPI is an open source initiative that seeks to improve the current state of
Event-Driven Architectures (EDA). Our long-term goal is to make working with EDA’s as
easy as it is to work with REST APIs. That goes from documentation to code
generation, from discovery to event management. Most of the processes you apply to
your REST APIs nowadays would be applicable to your event-driven/asynchronous
APIs too.”
AsyncAPI
71
https://www.asyncapi.com/docs/getting-started
All contents © MuleSoft, LLC
Documentation
&
Code Generation
Event Standards Governance
Benefits of Async API
72
All contents © MuleSoft, LLC
● AsyncAPI started as an adaptation of OAS
● The intention is to leverage some re-use between the two
specifications
● AsyncAPI and OAS are very similar
● Real-world systems may have both RESTful APIs and a
mechanism to handle events
● The ability to share/re-use schemas is valuable
Comparing AsyncAPI to Open API
Specification (OAS)
73
All contents © MuleSoft, LLC
Playground - Async Structure
74
https://www.asyncapi.com/docs/getting-started
All contents © MuleSoft, LLC
Internal and External Brokers
75
Mulesoft provides native queuing with Anypoint MQ (https://docs.mulesoft.com/mq/)
Also provides connectors to other queuing technologies
• JMS - https://docs.mulesoft.com/jms-connector/1.8/
• Amazon SQS - https://docs.mulesoft.com/amazon-sqs-connector/5.11/
• Microsoft MQ - https://docs.mulesoft.com/msmq-connector/2.0/
• Apache Kafka - https://docs.mulesoft.com/kafka-connector/4.6/
• Generic - https://docs.mulesoft.com/amqp-connector/1.7/
All contents © MuleSoft, LLC
Internal and External Brokers
76
All contents © MuleSoft, LLC
Sample Use Case
All contents © MuleSoft, LLC
80
Orders
Salesforce
customers
SAP
customers
Customers
Order status
Mobile API
Process
APIs
Experience
APIs
System
APIs
Using elements of event-driven architecture to cancel an
order
Orders
Anypoint MQ
Event Handler
Publish
message
Consume
message Invoke
All contents © MuleSoft, LLC
81
Orders
Salesforce
customers
SAP
customers
Customers
Order status
Mobile API
Process
APIs
Experience
APIs
System
APIs
Using elements of event-driven architecture to update
customer data
Anypoint MQ
Event Handler
Publish
message
Consume
message
Invoke
Customers
All contents © MuleSoft, LLC
82
Orders
Salesforce
customers
SAP
customers
Customers
Order status
Mobile API
Process
APIs
Experience
APIs
System
APIs
Using API-led connectivity to get order details
Anypoint MQ
Event Handler
Customers
All contents © MuleSoft, LLC
83
Web app
API
Orders
Salesforce
customers
SAP
customers
Order history
Customers
Order status
Mobile API
Process
APIs
Experience
APIs
System
APIs
API-led connectivity and event-driven architecture
together
Anypoint MQ Event Handler
All contents © MuleSoft, LLC
84
Web app
API
Orders
Salesforce
customers
SAP
customers
Order history
Customers
Order status
Mobile API
Process
APIs
Experience
APIs
System
APIs
API-led connectivity and event-driven architecture
together
Anypoint MQ
Event Handler
● Abstract event delivery via a
secured RESTful API.
● Avoid Messaging vendor lock in.
● Enable legacy application to
produce events.
All contents © MuleSoft, LLC
Event Pattern ++ API-Led
Experience
APIs
UPS
Shipments
API
Order Command
API/Integration
Order Query API
Orders Mobile API
Accounts
API
Orders
API
Process
APIs
System
APIs
Read
Write
Read and Write operations segregation
Read is sync call whereas Write is async
Reliability, guaranteed delivery
Write operation can be tuned in
accordance to end system capacity
Publish
Subscribe
Publish
Subscribe
All contents © MuleSoft, LLC
CQRS ++ Event Sourcing Pattern
Experience
APIs
UPS
Shipments
API
Order Command
API/Integration
Order Query API
Orders Mobile API
Accounts
API
Orders
API
Account Order
Details API
Process
APIs
System
APIs
Query/Read
Command/Write
Real-time
Replication/Sync
Write all events to event store Replay, rebuild and query
Read and Write operations
segregation
Read is sync whereas Write is async
Reliability, guaranteed delivery
Write operation can be tuned in
accordance to end system capacity
Read operations can be scaled
independently of write as its reading
from different datastore
If all events are stored in write
datastore then they can be replayed,
rebuilt or queried at any point in time
Publish
Subscribe
Publish
Subscribe
“...you should be very cautious about using CQRS. Many information
systems fit well with the notion of an information base that is updated
in the same way that it's read, adding CQRS to such a system can add
significant complexity. I've certainly seen cases where it's made a
significant drag on productivity, adding an unwarranted amount of risk
to the project, even in the hands of a capable team…” - Martin Fowler,
https://martinfowler.com/bliki/CQRS.html
All contents © MuleSoft, LLC
Flow Processing
All contents © MuleSoft, LLC
Flow Processing
88
Acks / Nacks
Error Handling
Dead letter queue reprocessing
Persistent
FIFO
All contents © MuleSoft, LLC
Tales from the Field
All contents © MuleSoft, LLC
eCommerce Order Processing
90
Advantages of Event Driven Architecture
• Decoupling
• Load Balancing
Object Creation
• Timing
• Trigger
• System of Record
Data format of the Object
Object Transfer
• Reference the object
• Pass the object changes
• Pass the object
Publish/Subscribe or Point to Point
Sequencing
Data Consistency/Freshness
All contents © MuleSoft, LLC
Conclusion
● Event Driven Architecture is here already and proving it’s value
● More advanced Mulesoft tools are arriving to help you build this Architecture
● Ensure that your Reference Architecture includes EDA patterns
● Decide what Real Time means to your Organization, instant->quicker than batch
● Don’t be afraid
All contents © MuleSoft, LLC
Thank you!

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

What’s Mule 4.3? How Does Anytime RTF Help? Our insights explain.
What’s Mule 4.3? How Does Anytime RTF Help? Our insights explain. What’s Mule 4.3? How Does Anytime RTF Help? Our insights explain.
What’s Mule 4.3? How Does Anytime RTF Help? Our insights explain.
 
Introduction to MuleSoft Anytime Platform
Introduction to MuleSoft Anytime PlatformIntroduction to MuleSoft Anytime Platform
Introduction to MuleSoft Anytime Platform
 
Running and Managing Mule Applications
Running and Managing Mule ApplicationsRunning and Managing Mule Applications
Running and Managing Mule Applications
 
Anypoint platform architecture and components
Anypoint platform architecture and componentsAnypoint platform architecture and components
Anypoint platform architecture and components
 
MuleSoft Online Meetup - Salesforce Streaming APIs
MuleSoft Online Meetup - Salesforce Streaming APIsMuleSoft Online Meetup - Salesforce Streaming APIs
MuleSoft Online Meetup - Salesforce Streaming APIs
 
Benefits of integration with the Mulesoft Anypoint Platform
Benefits of integration with the Mulesoft Anypoint PlatformBenefits of integration with the Mulesoft Anypoint Platform
Benefits of integration with the Mulesoft Anypoint Platform
 
Introduction to MuleSoft
Introduction to MuleSoftIntroduction to MuleSoft
Introduction to MuleSoft
 
Product Vision and Roadmap for Anypoint Platform
Product Vision and Roadmap for Anypoint PlatformProduct Vision and Roadmap for Anypoint Platform
Product Vision and Roadmap for Anypoint Platform
 
MuleSoft Architecture Presentation
MuleSoft Architecture PresentationMuleSoft Architecture Presentation
MuleSoft Architecture Presentation
 
Designing Apps for Runtime Fabric: Logging, Monitoring & Object Store Persist...
Designing Apps for Runtime Fabric: Logging, Monitoring & Object Store Persist...Designing Apps for Runtime Fabric: Logging, Monitoring & Object Store Persist...
Designing Apps for Runtime Fabric: Logging, Monitoring & Object Store Persist...
 
MuleSoft Offerings by BasilRoot Technologies
MuleSoft Offerings by BasilRoot TechnologiesMuleSoft Offerings by BasilRoot Technologies
MuleSoft Offerings by BasilRoot Technologies
 
Microservices on Anypoint Platform
Microservices on Anypoint PlatformMicroservices on Anypoint Platform
Microservices on Anypoint Platform
 
MuleSoft Anypoint Platform and Three Tier Architecture
MuleSoft Anypoint  Platform and Three Tier ArchitectureMuleSoft Anypoint  Platform and Three Tier Architecture
MuleSoft Anypoint Platform and Three Tier Architecture
 
The CIO's Guide to Digital Transformation
The CIO's Guide to Digital TransformationThe CIO's Guide to Digital Transformation
The CIO's Guide to Digital Transformation
 
Microservices for Application Modernisation
Microservices for Application ModernisationMicroservices for Application Modernisation
Microservices for Application Modernisation
 
Event Driven Software Architecture Pattern
Event Driven Software Architecture PatternEvent Driven Software Architecture Pattern
Event Driven Software Architecture Pattern
 
Event Driven Architecture
Event Driven ArchitectureEvent Driven Architecture
Event Driven Architecture
 
Migrating from oracle soa suite to microservices on kubernetes
Migrating from oracle soa suite to microservices on kubernetesMigrating from oracle soa suite to microservices on kubernetes
Migrating from oracle soa suite to microservices on kubernetes
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
 
Manchester MuleSoft Meetup #6 - Runtime Fabric with Mulesoft
Manchester MuleSoft Meetup #6 - Runtime Fabric with Mulesoft Manchester MuleSoft Meetup #6 - Runtime Fabric with Mulesoft
Manchester MuleSoft Meetup #6 - Runtime Fabric with Mulesoft
 

Similar a MuleSoft Event Driven Architecture (EDA Patterns in MuleSoft) - VirtualMuleys63

Similar a MuleSoft Event Driven Architecture (EDA Patterns in MuleSoft) - VirtualMuleys63 (20)

Unleash MuleSoft Platform for Enterprise Healthcare Solutions
Unleash MuleSoft Platform for Enterprise Healthcare SolutionsUnleash MuleSoft Platform for Enterprise Healthcare Solutions
Unleash MuleSoft Platform for Enterprise Healthcare Solutions
 
Embarking on MuleSoft Automation Journey via RPA, Composer and Flex Gateway
Embarking on MuleSoft Automation Journey via RPA, Composer and Flex GatewayEmbarking on MuleSoft Automation Journey via RPA, Composer and Flex Gateway
Embarking on MuleSoft Automation Journey via RPA, Composer and Flex Gateway
 
2022-221021003409-5f494fb1.pdf
2022-221021003409-5f494fb1.pdf2022-221021003409-5f494fb1.pdf
2022-221021003409-5f494fb1.pdf
 
Melbourne Virtual MuleSoft Meetup December 2022
Melbourne Virtual MuleSoft Meetup December 2022Melbourne Virtual MuleSoft Meetup December 2022
Melbourne Virtual MuleSoft Meetup December 2022
 
Singapore MuleSoft Meetup - 23 Nov 2022
Singapore MuleSoft Meetup - 23 Nov 2022Singapore MuleSoft Meetup - 23 Nov 2022
Singapore MuleSoft Meetup - 23 Nov 2022
 
2022.06.23 - Sydney Meetup
2022.06.23 - Sydney Meetup2022.06.23 - Sydney Meetup
2022.06.23 - Sydney Meetup
 
Melbourne Virtual MuleSoft Meetup June 2022
Melbourne Virtual MuleSoft Meetup June 2022Melbourne Virtual MuleSoft Meetup June 2022
Melbourne Virtual MuleSoft Meetup June 2022
 
Denver MuleSoft Meetup: Greatest MuleSoft Hits of 2022
Denver MuleSoft Meetup: Greatest MuleSoft Hits of 2022Denver MuleSoft Meetup: Greatest MuleSoft Hits of 2022
Denver MuleSoft Meetup: Greatest MuleSoft Hits of 2022
 
Princeton-NJ-Meetup-Managing CloudHub applications using CloudHub Platform API
Princeton-NJ-Meetup-Managing CloudHub applications using CloudHub Platform APIPrinceton-NJ-Meetup-Managing CloudHub applications using CloudHub Platform API
Princeton-NJ-Meetup-Managing CloudHub applications using CloudHub Platform API
 
Melbourne Virtual MuleSoft Meetup April 2022
Melbourne Virtual MuleSoft Meetup April 2022Melbourne Virtual MuleSoft Meetup April 2022
Melbourne Virtual MuleSoft Meetup April 2022
 
WHISHWORKS-MuleSoft Hyderabad Meetup -Oct 2018
WHISHWORKS-MuleSoft Hyderabad Meetup -Oct 2018WHISHWORKS-MuleSoft Hyderabad Meetup -Oct 2018
WHISHWORKS-MuleSoft Hyderabad Meetup -Oct 2018
 
MuleSoft Meetup Virtual_ 2_Charlotte
MuleSoft Meetup Virtual_ 2_CharlotteMuleSoft Meetup Virtual_ 2_Charlotte
MuleSoft Meetup Virtual_ 2_Charlotte
 
Melbourne Virtual MuleSoft Meetup October 2021
Melbourne Virtual MuleSoft Meetup October 2021Melbourne Virtual MuleSoft Meetup October 2021
Melbourne Virtual MuleSoft Meetup October 2021
 
Discover Salesforce Commerce Cloud and Vlocity Integration Patterns
Discover Salesforce Commerce Cloud and Vlocity Integration PatternsDiscover Salesforce Commerce Cloud and Vlocity Integration Patterns
Discover Salesforce Commerce Cloud and Vlocity Integration Patterns
 
Kochi mulesoft meetup 02
Kochi mulesoft meetup 02Kochi mulesoft meetup 02
Kochi mulesoft meetup 02
 
20220324 - Angel Updates - PKO
20220324 - Angel Updates - PKO20220324 - Angel Updates - PKO
20220324 - Angel Updates - PKO
 
Sustainability Challenge, Postman, Rest sheet and Anypoint provider : MuleSof...
Sustainability Challenge, Postman, Rest sheet and Anypoint provider : MuleSof...Sustainability Challenge, Postman, Rest sheet and Anypoint provider : MuleSof...
Sustainability Challenge, Postman, Rest sheet and Anypoint provider : MuleSof...
 
Kochi Mulesoft Meetup #10 - MuleSoft Composer: Connect apps and data easily w...
Kochi Mulesoft Meetup #10 - MuleSoft Composer: Connect apps and data easily w...Kochi Mulesoft Meetup #10 - MuleSoft Composer: Connect apps and data easily w...
Kochi Mulesoft Meetup #10 - MuleSoft Composer: Connect apps and data easily w...
 
mulecomposer.pdf
mulecomposer.pdfmulecomposer.pdf
mulecomposer.pdf
 
Melbourne Virtual MuleSoft Meetup June 2021
Melbourne Virtual MuleSoft Meetup June 2021Melbourne Virtual MuleSoft Meetup June 2021
Melbourne Virtual MuleSoft Meetup June 2021
 

Más de Angel Alberici

MuleSoft: How to Engage Partners/Customers and API Led with Alexa
MuleSoft: How to Engage Partners/Customers and  API Led with Alexa MuleSoft: How to Engage Partners/Customers and  API Led with Alexa
MuleSoft: How to Engage Partners/Customers and API Led with Alexa
Angel Alberici
 

Más de Angel Alberici (10)

MuleSoft PKO - C4E and Platform Insights
MuleSoft PKO - C4E and Platform InsightsMuleSoft PKO - C4E and Platform Insights
MuleSoft PKO - C4E and Platform Insights
 
MuleSoft Composer - 09122021 - Virtual Muleys
MuleSoft Composer - 09122021 - Virtual Muleys MuleSoft Composer - 09122021 - Virtual Muleys
MuleSoft Composer - 09122021 - Virtual Muleys
 
Metadata definition between flows on Studio 7 : MuleSoft Virtual Muleys Meetups
Metadata definition between flows on Studio 7  : MuleSoft Virtual Muleys MeetupsMetadata definition between flows on Studio 7  : MuleSoft Virtual Muleys Meetups
Metadata definition between flows on Studio 7 : MuleSoft Virtual Muleys Meetups
 
MuleSoft MUnit Test Recorder Meetup
MuleSoft MUnit Test Recorder MeetupMuleSoft MUnit Test Recorder Meetup
MuleSoft MUnit Test Recorder Meetup
 
20210428 - Sustainable Engineering practices & API Communities: Adoption Best...
20210428 - Sustainable Engineering practices & API Communities: Adoption Best...20210428 - Sustainable Engineering practices & API Communities: Adoption Best...
20210428 - Sustainable Engineering practices & API Communities: Adoption Best...
 
MuleSoft: How to Engage Partners/Customers and API Led with Alexa
MuleSoft: How to Engage Partners/Customers and  API Led with Alexa MuleSoft: How to Engage Partners/Customers and  API Led with Alexa
MuleSoft: How to Engage Partners/Customers and API Led with Alexa
 
Sustainability Challenge, Postman, Rest sheet and Anypoint provider : MuleSof...
Sustainability Challenge, Postman, Rest sheet and Anypoint provider : MuleSof...Sustainability Challenge, Postman, Rest sheet and Anypoint provider : MuleSof...
Sustainability Challenge, Postman, Rest sheet and Anypoint provider : MuleSof...
 
Using the Mule 4 SDK to build a connector : MuleSoft Virtual Muleys Meetups
Using the Mule 4 SDK to build a connector  : MuleSoft Virtual Muleys MeetupsUsing the Mule 4 SDK to build a connector  : MuleSoft Virtual Muleys Meetups
Using the Mule 4 SDK to build a connector : MuleSoft Virtual Muleys Meetups
 
Containerising the Mule Runtime with Kubernetes & From Zero to Batch : MuleS...
Containerising the Mule Runtime with Kubernetes & From Zero to Batch  : MuleS...Containerising the Mule Runtime with Kubernetes & From Zero to Batch  : MuleS...
Containerising the Mule Runtime with Kubernetes & From Zero to Batch : MuleS...
 
VPCs, Metrics Framework, Back pressure : MuleSoft Virtual Muleys Meetups
VPCs, Metrics Framework, Back pressure  : MuleSoft Virtual Muleys MeetupsVPCs, Metrics Framework, Back pressure  : MuleSoft Virtual Muleys Meetups
VPCs, Metrics Framework, Back pressure : MuleSoft Virtual Muleys Meetups
 

Último

Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Peter Udo Diehl
 

Último (20)

Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
Agentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdfAgentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdf
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at Comcast
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG Evaluation
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 

MuleSoft Event Driven Architecture (EDA Patterns in MuleSoft) - VirtualMuleys63

  • 1. All contents © MuleSoft, LLC 2nd February 2022 18:00 Europe/CET | 17:00 UK/GMT | 22:30 Delhi, India/IST 9:00 San Francisco/PST | 12:00 New York Event Driven Architecture with Mulesoft David Guest
  • 2. All contents © MuleSoft, LLC Virtual Muleys Meetup (Online Group - English ) Moderator: Angel Alberici February Edition, 2022 Recording
  • 3. All contents © MuleSoft, LLC Virtual Muleys Meetup (Online Group - English) 7 7
  • 4. All contents © MuleSoft, LLC Announcements & Updates
  • 5. All contents © MuleSoft, LLC ● Some of the most popular and useful self-help resources available to MuleSoft customers ● MuleSoft Videos Youtube channel: https://sfdc.co/cmZrjq 6 minutes on Customer facing self-help resources | Friends of Max overview 11
  • 6. All contents © MuleSoft, LLC Product Roadmap December 2021 https://www.mulesoft.com/demo/customers Watch it if you haven’t!
  • 7. All contents © MuleSoft, LLC MuleSoft Partner Kick Off 2022 - 24th March MuleSoft’s largest partner event of the year - PKO ’22 - is coming back! PKO ’22 will be packed with all the information that partners need to thrive with MuleSoft in 2022. Save the date!
  • 8. All contents © MuleSoft, LLC What’s new ● IBM + Mule - Extending Runtime Fabric to run on Red Hat Openshift (here) ● MuleSoft Transform: Announcement in the next couple of weeks. ● Aligning Integration Strategy with Business Objectives - Check it out here. ● Data + APIs - Data economics and composable data, and shown how APIs can support an enterprise-wide data strategy. Check out the articles in order here: one, two, and three. 15 ● Roadmap Update - High level view of 14th December: ○ Universal API Management; ○ support for designing & discovering event-driven APIs; ○ Enhanced API Governance; ○ Mule 4.4; ○ AWS Transit Gateway; ○ Cloudhub 2.0 ○ Connectors such as MQTT, Outlook 365, Shopify, and loads more ○ Accelerators for Retail, Healthcare, SAP, and Financial Services ○ And a whole lot more!
  • 9. All contents © MuleSoft, LLC What’s new: Training ● 3 Day Fundamentals - We are now offering a 3 days version of the Development: Fundamentals course, which requires learners to have completed an Intro to Anypoint Platform Workshop or the Getting Started with Anypoint Platform course. ● Earn a certification attempt - Learners will be able to earn their MCD - L1 (Mule 4) certification attempt by completing the self-paced “Anypoint Platform Development: Fundamentals” course. The exam will then appear in their learner dashboard for scheduling. ● Flex - The training team are now offering ‘Flex’ courses which take place over a weekend or broken up over half days. 16
  • 10. All contents © MuleSoft, LLC Same address: https://knowledgehub.mulesoft.com/s/ Catalyst Knowledge Hub: We changed its name again! 17
  • 11. All contents © MuleSoft, LLC ● Azure Git Repository Clone Utility Scripts - Batch Updates - Utility PowerShell scripts, shell scripts, and git commands and the steps that need to be followed to clone all the repositories from Azure DevOps Git Repository and do checkouts, rebase, commits, push, etc in batch mode( more than one repository at a time) ● Mule Development Best Practices - Mule Development - best practices and standards to apply in the implementation/development phase of the API Development Life Cycle. ● Workday Business Process - Slack Integration - This is a starter utility that might be useful for someone trying to implement a Slack-ops type of communication standard where Workday is the data source. Catalyst Knowledge Hub: 18
  • 12. All contents © MuleSoft, LLC 2nd February 2022 18:00 Europe/CET | 17:00 UK/GMT | 22:30 Delhi, India/IST 9:00 San Francisco/PST | 12:00 New York Event Driven Architecture with Mulesoft David Guest
  • 13. All contents © MuleSoft, LLC Meetup - Event Driven Architecture David Guest, Customer Success Architect
  • 14. All contents © MuleSoft, LLC Agenda 1. Level Set 2. Event Driven (Async) vs Synchronous 3. Event Driven Infrastructure 4. Common Patterns 5. Mulesoft Implementation 6. Tales from the Field
  • 15. All contents © MuleSoft, LLC Level Set
  • 16. All contents © MuleSoft, LLC History ● Internal messaging systems at application/operating system level ● Flat Files/Formatted Files transfer between systems ● IBM MQSeries came along in 1993 ● SOAP / XML appeared around 2000 ● Proprietary until Advanced Message Queueing Protocol (AMQP) arrived in 2003 ● JSON in 2013 ● Modelling APIs ● Modelling Event Driven APIs
  • 17. All contents © MuleSoft, LLC Is it really Real-Time? ● Real-time or real time describes various operations in computing or other processes that must guarantee response times within a specified time (deadline), usually a relatively short time. A real-time process is generally one that happens in defined time steps of maximum duration and fast enough to affect the environment in which it occurs, such as inputs to a computing system. ● The basic premise around real-time APIs is that they are event-driven. According to the event-driven design pattern, a system should react or respond to events as they happen.
  • 18. All contents © MuleSoft, LLC Instant confirmation Initiate an action $40M worth in revenue in capital markets* 0.1% Additional revenue on mobile apps $.5M Saved in costs for logistics Value of 10 ms 35 What are real-time experiences worth to you? Source: https://perspectives.mvdirona.com/2009/10/the-cost-of-latency/
  • 19. All contents © MuleSoft, LLC Scenario: ATM Card Withheld Event-Driven Automation Automate Your Processes Faster Support Customers via Multiple Channels Achieve Single View of Customer Event Store Bank Systems ATM Card withheld event Notify Branch to start new ATM Card process Trigger SMS to inform customer ATM Card State updated Case created 1 2 3 4 5
  • 20. All contents © MuleSoft, LLC Scenario: Cross-Sell/Up-Sell with Social Listening Personalized Experience for Customer Event Store Bank Systems LINE Pay wedding booking event Trigger loan offer promotion Check customer credit rating Pitch promotion on LINE 1 2 3 4 Real-Time Marketing Offers Automated Consumer Journeys Expand Your Business through Cross-Sell/Upsell
  • 21. All contents © MuleSoft, LLC 38 But, building real-time experiences is hard Business teams want to... IT teams want to... ..and more Capture and unlock real-time data Add or modify services with limited impact Improve latencies and avoid polling madness Respond in real-time to customers Compete by expanding business capabilities Optimize costs spent on resources ..and more Real time application
  • 22. All contents © MuleSoft, LLC 39 Is your digital backbone ready to power real-time? request response 98.5% of API polls do not return any new information Excessive coupling limits flexibility to add new services Failures cascade through all the coupled services Response times to the customer are slow Synchronous communication
  • 23. All contents © MuleSoft, LLC Event Driven Infrastructure
  • 24. All contents © MuleSoft, LLC Event-Driven Architectures: Core concepts A simple event-driven system - it used to be easy JMS Event broker Account Change event Account Updated! Event brokers Event producers Event consumers
  • 25. All contents © MuleSoft, LLC Event grid / hubs / mesh... Message queues JMS Streaming platform Explosion in # enterprise systems + real-time needs Event driven is no longer just Pub-Sub Message brokers Event producers Event consumers
  • 26. All contents © MuleSoft, LLC Event Driven vs Synchronous
  • 27. All contents © MuleSoft, LLC Queue Processing vs Synchronous ● Reliability ● Demand Throttling ● Load Balancing ● High Availability ● Multiple Recipients ● Internet of Things ● Integration with modern SaaS applications ● Error Handling ● Avoids Polling
  • 28. All contents © MuleSoft, LLC Shift to Event Driven ● Req-reply <= 50% of the equation ● The World is Event Driven ● The Web World operates on HTTP and it isn’t designed for Async interactions ● IoT is Async by nature and is getting bigger & HTTP/Req-Reply doesn’t really cut it ● ‘Fire-and-forget’ processing model ○ In certain situations, a formal response is not needed (Although an acknowledgement may be required) ○ Very useful when the requirement is only to inform a downstream process (Or processes) that ‘something has happened’
  • 29. All contents © MuleSoft, LLC Common Patterns
  • 30. All contents © MuleSoft, LLC Message Flow
  • 31. All contents © MuleSoft, LLC Event-Driven Architectures: Core concepts 48 Publisher Broker Consumer
  • 32. All contents © MuleSoft, LLC Event-Driven Architectures: Multi-subscriber 49 Publisher Broker Subscriber Subscriber Subscriber
  • 33. All contents © MuleSoft, LLC Single atomic transaction Event-Driven Architectures: Atomic Transactions 50 Publisher Broker Subscriber Subscriber Subscriber
  • 34. All contents © MuleSoft, LLC Saga: Choreography-based 51 Order Service Order Events Customer Events <<Order Aggregate>> Customer Service <<CustomerAggregate>> Order Created Credit Reserved
  • 35. All contents © MuleSoft, LLC Broker Saga: Orchestration-based 52 Customer Service Command <<Order Aggregate>> <<CustomerAggregate>> Reserve Credit Command Credit Reserved Order Controller Order Service Create Order Saga Customer Service Create Order Saga Reply Customer Command Handler Order Command Handler
  • 36. All contents © MuleSoft, LLC Sagas in Mule Request Response Request Response Event Event Choreography Orchestration
  • 37. All contents © MuleSoft, LLC Message Content
  • 38. All contents © MuleSoft, LLC Thin Event Notification 55 Broadcast only the necessary details to notify that an event occurred Forces subscribers to fetch additional details to complete a task Use when: The desire is to prevent subscribers processing stale data. They are forced to fetch the latest data due to frequent changes or potentially delayed processing { “eventType” : “com.example.customer.address”, “eventId” : “1234567”, “updatedAt” : “2021-12-25”, “customerId” : “9876543” }
  • 39. All contents © MuleSoft, LLC Hypermedia-Driven Notification 56 Include hypermedia links in event payloads Helps consumers find the right API for details Use when: You wish to bridge event notifications with API integration { “eventType” : “com.example.customer.address”, “eventId” : “1234567”, “updatedAt” : “2021-12-25”, “customerId” : “9876543”, “_links”: [ { “rel”:”customer”, “href”:”href”:”/customers/9876543” }
  • 40. All contents © MuleSoft, LLC Event-Carried State Transfer 57 Broadcasts all known data at the time of the event Often contain the entire record, avoiding the need to contact the source system to conduct further work Use when: Subscribers want a snapshot of the data with the event Sharing data state changes through message streaming (Apache Kafka, Apache Pulsar, etc.) to support replaying message history. Using event sourcing /CQRS to capture state changes over time { “eventType” : “com.example.customer.address”, “eventId” : “1234567”, “updatedAt” : “2021-12-25”, “customerId” : “9876543”, “Address” : {
  • 41. All contents © MuleSoft, LLC Structured Event Payloads 58 Groups properties as nested structures Avoids flat structures that require subscribers to figure out how properties are grouped Helps drive evolvability as property names are scoped to the parent property (e.g. addressLine1) Use when: Event payloads require complex data structures Event payloads have nested 1-to-many relationships as part of an event payload { contactDetails: firstName lastName Email billingAddress: addressLine1 addressLine2
  • 42. All contents © MuleSoft, LLC Offline and Error Recovery Support 59 Supplement event notification channels with APIs that allow offline consumers to catch up Also allows consumers to identify and troubleshoot failed deliveries Use when: Consumers have limited or no access to internal mechanisms to detect errors When offline support is necessary to keep consumers in-sync API: Listing recent dispatches
  • 43. All contents © MuleSoft, LLC Separate Internal and External Events 60 Design internal events for coordinating implementation details Design external events for notification and extensibility Use when: Event-driven architecture is being used internally, but external events are desired Prevent leaking implementation details or special knowledge of how your internal systems operate { “eventType”: “authorised”, “transactionId”: “123456”, “authorisationServer”: “auth.internal.com”, “customerId”: “cust1234”, “transactionAmount”: “1299”, “transactionCurrency”: “GBP” … } { “Event”:{ “Type”: “paymentProcessed”, “OrderId”: “ord1234”, … } }
  • 44. All contents © MuleSoft, LLC Mulesoft Implementation
  • 45. All contents © MuleSoft, LLC Event grid / hubs / mesh... Message brokers JMS Streaming platform ● What event-driven APIs does my company have? ● What info to include in the event? ● What channels? Protocols? #1: Discovering events and event-driven APIs Re-use is challenging as custom coding creates black boxes ?
  • 46. All contents © MuleSoft, LLC #2: Governing brokers and events consistently Managing security, access management and validation for APIs and brokers is hard ? ● How are each brokers managing authentication? ● How do IT apply rules consistently across brokers, apps and events? AMQP JMS ? ? ● Plaintext ● SASL - Oauth ● mTLS ● LDAP ● IAM users ● IAM Roles ● SecretKey
  • 47. All contents © MuleSoft, LLC #3: Monitoring events is …..um “hard” Even harder to derive insights and take preventive action Update account! SFDC Updated Netsuite error..50 3 ! ???????? ! Profile service SFDC service Netsuite service ● Show me all events related to customer x? ● How can we look at event flows, identify malicious patterns and get alerted? JMS Profile service
  • 48. All contents © MuleSoft, LLC Journey to enterprise scale event-driven.. Choose a technology solution that can help you transition seamlessly DESIGN with open standards & simple tooling REUSE Existing assets in design MANAGE & SECURE your APIs with policies REGISTER with event brokers ` Now FY23 Now FY23
  • 49. All contents © MuleSoft, LLC REUSE Existing assets in design DESIGN with open standards & simple tooling REGISTER with event brokers MANAGE & SECURE your APIs with policies Journey to enterprise scale event-driven.. #1: Discover and reuse your existing assets and best practices Discover your reusable assets easily Explore your Event-driven APIs quickly Acquire the right API with limited support Now
  • 50. All contents © MuleSoft, LLC REUSE REST fragments in design DESIGN with open standards & simple tooling REGISTER with event brokers MANAGE & SECURE your APIs with policies Journey to enterprise scale event-driven.. #2: Use AsyncAPI to establish an enterprise-grade standard Well-documented contract on how to interact with services Discover, reuse, manage and govern events in the enterprise Open-source and protocol agnostic allowing interoperability Now
  • 51. All contents © MuleSoft, LLC Journey to enterprise scale event-driven.. #3: Connect with brokers to stream events across a distributed enterprise Platform to compose business capabilities ` JMS Discover Design Manage Secure Monitor REUSE REST fragments in design DESIGN with open standards & simple tooling REGISTER with event brokers MANAGE & SECURE your APIs with policies FY23
  • 52. All contents © MuleSoft, LLC Journey to enterprise scale event-driven.. #4: Comprehensively monitor your events and request/response in a single view Centralized & proactive monitoring across your services Shopping API Monitor user and application behaviour 🕵 Get alerted proactively on mission critical operations 🚨 Search through events to identify the root cause of issues 🔎 REUSE REST fragments in design DESIGN with open standards & simple tooling REGISTER with event brokers MANAGE & SECURE your APIs with policies FY23
  • 53. All contents © MuleSoft, LLC “AsyncAPI is an open source initiative that seeks to improve the current state of Event-Driven Architectures (EDA). Our long-term goal is to make working with EDA’s as easy as it is to work with REST APIs. That goes from documentation to code generation, from discovery to event management. Most of the processes you apply to your REST APIs nowadays would be applicable to your event-driven/asynchronous APIs too.” AsyncAPI 71 https://www.asyncapi.com/docs/getting-started
  • 54. All contents © MuleSoft, LLC Documentation & Code Generation Event Standards Governance Benefits of Async API 72
  • 55. All contents © MuleSoft, LLC ● AsyncAPI started as an adaptation of OAS ● The intention is to leverage some re-use between the two specifications ● AsyncAPI and OAS are very similar ● Real-world systems may have both RESTful APIs and a mechanism to handle events ● The ability to share/re-use schemas is valuable Comparing AsyncAPI to Open API Specification (OAS) 73
  • 56. All contents © MuleSoft, LLC Playground - Async Structure 74 https://www.asyncapi.com/docs/getting-started
  • 57. All contents © MuleSoft, LLC Internal and External Brokers 75 Mulesoft provides native queuing with Anypoint MQ (https://docs.mulesoft.com/mq/) Also provides connectors to other queuing technologies • JMS - https://docs.mulesoft.com/jms-connector/1.8/ • Amazon SQS - https://docs.mulesoft.com/amazon-sqs-connector/5.11/ • Microsoft MQ - https://docs.mulesoft.com/msmq-connector/2.0/ • Apache Kafka - https://docs.mulesoft.com/kafka-connector/4.6/ • Generic - https://docs.mulesoft.com/amqp-connector/1.7/
  • 58. All contents © MuleSoft, LLC Internal and External Brokers 76
  • 59. All contents © MuleSoft, LLC Sample Use Case
  • 60. All contents © MuleSoft, LLC 80 Orders Salesforce customers SAP customers Customers Order status Mobile API Process APIs Experience APIs System APIs Using elements of event-driven architecture to cancel an order Orders Anypoint MQ Event Handler Publish message Consume message Invoke
  • 61. All contents © MuleSoft, LLC 81 Orders Salesforce customers SAP customers Customers Order status Mobile API Process APIs Experience APIs System APIs Using elements of event-driven architecture to update customer data Anypoint MQ Event Handler Publish message Consume message Invoke Customers
  • 62. All contents © MuleSoft, LLC 82 Orders Salesforce customers SAP customers Customers Order status Mobile API Process APIs Experience APIs System APIs Using API-led connectivity to get order details Anypoint MQ Event Handler Customers
  • 63. All contents © MuleSoft, LLC 83 Web app API Orders Salesforce customers SAP customers Order history Customers Order status Mobile API Process APIs Experience APIs System APIs API-led connectivity and event-driven architecture together Anypoint MQ Event Handler
  • 64. All contents © MuleSoft, LLC 84 Web app API Orders Salesforce customers SAP customers Order history Customers Order status Mobile API Process APIs Experience APIs System APIs API-led connectivity and event-driven architecture together Anypoint MQ Event Handler ● Abstract event delivery via a secured RESTful API. ● Avoid Messaging vendor lock in. ● Enable legacy application to produce events.
  • 65. All contents © MuleSoft, LLC Event Pattern ++ API-Led Experience APIs UPS Shipments API Order Command API/Integration Order Query API Orders Mobile API Accounts API Orders API Process APIs System APIs Read Write Read and Write operations segregation Read is sync call whereas Write is async Reliability, guaranteed delivery Write operation can be tuned in accordance to end system capacity Publish Subscribe Publish Subscribe
  • 66. All contents © MuleSoft, LLC CQRS ++ Event Sourcing Pattern Experience APIs UPS Shipments API Order Command API/Integration Order Query API Orders Mobile API Accounts API Orders API Account Order Details API Process APIs System APIs Query/Read Command/Write Real-time Replication/Sync Write all events to event store Replay, rebuild and query Read and Write operations segregation Read is sync whereas Write is async Reliability, guaranteed delivery Write operation can be tuned in accordance to end system capacity Read operations can be scaled independently of write as its reading from different datastore If all events are stored in write datastore then they can be replayed, rebuilt or queried at any point in time Publish Subscribe Publish Subscribe “...you should be very cautious about using CQRS. Many information systems fit well with the notion of an information base that is updated in the same way that it's read, adding CQRS to such a system can add significant complexity. I've certainly seen cases where it's made a significant drag on productivity, adding an unwarranted amount of risk to the project, even in the hands of a capable team…” - Martin Fowler, https://martinfowler.com/bliki/CQRS.html
  • 67. All contents © MuleSoft, LLC Flow Processing
  • 68. All contents © MuleSoft, LLC Flow Processing 88 Acks / Nacks Error Handling Dead letter queue reprocessing Persistent FIFO
  • 69. All contents © MuleSoft, LLC Tales from the Field
  • 70. All contents © MuleSoft, LLC eCommerce Order Processing 90 Advantages of Event Driven Architecture • Decoupling • Load Balancing Object Creation • Timing • Trigger • System of Record Data format of the Object Object Transfer • Reference the object • Pass the object changes • Pass the object Publish/Subscribe or Point to Point Sequencing Data Consistency/Freshness
  • 71. All contents © MuleSoft, LLC Conclusion ● Event Driven Architecture is here already and proving it’s value ● More advanced Mulesoft tools are arriving to help you build this Architecture ● Ensure that your Reference Architecture includes EDA patterns ● Decide what Real Time means to your Organization, instant->quicker than batch ● Don’t be afraid
  • 72. All contents © MuleSoft, LLC Thank you!