SlideShare a Scribd company logo
A Cloud- and
Container-Based
Approach to
Microservices-
Powered
Workflows
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 1
Lucas Jellema, CTO of AMIS
CodeOne 2018, San Francisco, USA
Lucas Jellema
Architect / Developer
1994 started in IT at Oracle
2002 joined AMIS
Currently CTO & Solution Architect
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 2
Overview
• Definitions – what is workflow | microservice
• And what are objectives & requirements
• Bare essence of workflow
• Challenges with workflows – especially in a microservices world
• Approaches
• Orchestrated
• Choreographed
• Hybrid
• Required components
• Tools & technologies
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 3
Defining Workflow
• Cross domain cutting concern
• Composite transaction
• Multi-step chain
• Long running process
• System initiated human participation
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 4
Objectives
• Flows completed
• In time
• Following the plan
• Handling of non-happy situations
• Efficient execution
• Regarding resource usage (compute and human)
• Agility – easily adaptable
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 5
Examples
• From Webshop Order to Fulfillment and Invoice
• CI/CD Pipeline – from source code to running container
• Composite Order (“concert ticket, flight ticket, hotel reservation, car rental”)
• Travel Approval process
• CQRS-style refresh of query-stores upon update of command-database
• Bid management process
• From Blood Sample to Lab Results and Notification
• Nightly job to process data [in several steps]
• Process complex incoming message into
multiple domains [and data stores]
• From “order food to deliver meal”
• ChatBot – conversation flow
• Synchronous Service Call Retry
• …
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 6
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 7
Source: https://thenewstack.io/5-workflow-automation-use-cases-you-might-not-have-considered/
Constituents of a Workflow
• Activities (& actor roles)
• Flow logic
• Sequence
• Conditional
• Events (including time)
• Loop
• Parallellism
• Deadlines
• Events and Signals that trigger or influence
• Transaction boundaries
• Succeed or rollback together
• Exceptions, non-happy-flow, compensation handlers
• State – data associated with an instance of a workflow
• Including the progress & status of the instance (where are we at?)
• Business indicators (per instance and across instances) & business monitoring
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 8
Workflow Design | Blueprint
• Communication with business
• Input for implementation of workflow
• Input for implementing business monitoring & reporting
• Input for a workflow engine – to execute
• Examples of formal notation methods:
• BPMN
• BPEL
• CMMN
• Harel Statecharts
• State Diagrams
• Petri net
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 9
Examples of workflow designs
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 10
At the core
• The logical definition of the workflow
combined with
the current state of the instance
and the current time (or other external conditions)
• To produce
one or more “To Do items” for activity types in the context of the workflow instance
• Including non-happy exception items (for example when previous to-do item timed out)
• The To Do items should be made available to actors (for example microservices)
• Including (reference to the) state
• Actors can ‘take on’ a To Do item – typically exclusively
• They can read and extend the state of the workflow instance
(Including completing | failing | returning the task)
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 11
Tasks go through states
• Task == Workflow Step == Activity
• Each state change requires reevaluating the workflow-instance
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 12
Workflow instances go through states
Business state and Operational state
• New
• Running
• Waiting on
• Actors
• Events
• Failed
• Completed
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 13
Microservices
• Business Agility
• Functionality: quick, cheap, effortless and risk free
• IT Agility
• Non-functionality: scale, resilience, infrastructure & location
• Independent components
• Asynchronous communication – whenever possible
• Encapsulated
• Location does not matter
• Strictly within one domain, owned by one team
• Not too big or complex
• Horizontally Scalable (multiple instances )
• Ephemeral, Stateless
• Enabling Automated DevOps
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 14
• Manage data context for Workflow instance
• Persist
• Share
• Update
• Derive next state
• from data context
• Event (time)
• Workflow definition
To make workflows work in a microservices arena…
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 15
• Ensure workflow instances are completed according to plan
• Agile evolution of workflow definitions (and data structure)
• Short & Long-running workflow
• Provide business insight in status and progress
Workflow in Microservices Land • Prevent multiple actors from working
on the same task
• Detect tasks not picked up or
abandoned
• Act on events & functional timeouts
• Microservice (& Lambda [Stateless] Functions)
• Assume that ownership for each workflow lies in one domain
• Someone cares – because of what that team tries to achieve
• Preferably Asynchronous communication
• Multiple instances of actor
• Distributed/unknown | changing location
• Poly-tech implementations
• Frequent scale & redeploy & replace (plus A/B and Canary)
• Smart Endpoints, Dumb Pipes
• Cloud – wide area network
• Containers – ephemeral (stateless), restart, multi-instance
Approaches
• Orchestration
• Choreography
• Hybrid
• Coordinated | Facilitated Choreography
• Mixing orchestration and choreography
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 16
Orchestration
• Central coordination
• Flow logic
• Actor invocation (synchronous?) and communication
• Transaction
• Exception, Timeout and Event & Signal handling
• Workflow instance state & data content
• Within and/or across domains
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 17
Workflow Orchestration Engine
actor
actor
actor
Orchestration – challenges & undesirabilities
• Hard dependency on actors: what, where, how to invoke
• Any change in actor may impact central orchestrator
• Monolithic orchestrator may become bottleneck
• Physically (defying Ops – scale, patch, …)
• Mentally (god service, omniscient )
• (in the past?) very not agile:
• running instances, changing data structure & workflow definitions
• Several products provide(d) this capability – and have sometimes made life hard and given
workflow orchestration a bad name
• Oracle BPM Suite, Camunda, jBPM, Activiti, Pega Systems, Tallyfy, Bizagi, Oracle Integration
Cloud (PCS), IBM Business Process Manager, Red Hat Process Automation Manager
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 18
Choreography
• No one is owner of the workflow instance
• Full independence between all actors
• Microservices know nothing about each other
• Events trigger them into action
• Their end state is published through an event
• The workflow does not explicitly exist
• Arises as sequence of independent microservice actions
• Microservice need to know about the event that should trigger them
• Highly flexible
• As long as actors are acting on events – they can be anywhere, scaled in
anyway, doing anything and be implemented in any technology
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 19
Example of Choreography – Flowing Retail – Process Order
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 20
Source: Bernd Rücker, https://github.com/berndruecker/flowing-retail
ShipmentInventoryPayment
Shop &
Checkout
Example of Event Driven Choreography – Flowing Retail
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 21
Order
Completed
Pure Choreography - demo
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 22
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 23
Code in Actor
Inventory
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 24
Choreography Challenges
• How to share the workflow state (“data context”)
• Hard to implement flow logic – e.g. conditional actions or loops
• Hard to handle parallel activities on same “instance”
• State is payload of event
• Changing the implicit workflow requires changing the microservices
• The way they respond to events
• Tracing the workflow is hard
• Detecting and fixing stuck and failing
workflow instances is hard
• Who determines if
the Order is completed?
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 25
Order
Completed
Event Driven Pitfall regarding workflows and pure
choreography
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 26
Guided Choreography
• Workflow definition exists
• Workflow definition is instantiated as routing slip that is included in events
• Available to each actor
• Actors determine if the routing slip for an instance allows | prompts them to act
• If so, they perform work then update routing slip and publish an event
• And so on
• Extremely flexible
• Deploy and redeploy actors as desired
• A/B and Canary testing
• Modifying workflow definitions
• Potentially even for running instances
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 27
Workflow
[Event]
Monitor
Guided Choreography with Routing Slip
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 28
Workflow Initiator
Workflow
definitions
Workflow event
EventBus
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 28
Actor
Actor
Actor
Check if the routing slip
contains a task that this
actor can perform and
that is released for
execution
Check if the routing slip
contains a task that this
actor can perform and
that is released for
execution
Check if the routing slip
contains a task that this
actor can perform and
that is released for
execution
Check if the routing slip
contains a task that this
actor can perform and
that is released for
execution
Check if the routing slip
contains a task that this
actor can perform and
that is released for
execution
Check if the routing slip
contains a task that this
actor can perform and
that is released for
execution
Payload
Instance Identifier
Workflow Definition Identifier
State (associated data)
Tasks
- Activity type
- Identifier
- Status (new | done | waiting | failed)
- Conditions/Dependencies
Audit
If it is, then perform the
task and publish a new
workflow event with
updated state, task &
audit
Workflow event
Routing Slip
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 29
Retrieve
Payment
checkout
Retrieve
Goods
Ship
Goods
Cancel
Order
Challenges with Guided Choreography – Routing Slip
• Prevent multiple actors picking up the same task in an instance (concurrency)
• Exclusively claim a task
• Handle state updates by actors on parallel tasks (split brain state of routing slip)
• Perhaps store state in distributed cache
• Potentially inefficient as each actor evaluates all workflow events
• For all workflows and all instances
• Detect failing instances
• Handle timers and signals
A Cloud- and Container-Based Approach to Microservices-Powered Workflows
done
Best of Both Worlds: Hybrid – Coordinated Choreography
• Asynchronous communication based on queues | commands | events
• Distributed, stateless, horizontally scalable workflow engine
• Data context (“state”)
• State transition (workflow logic)
• Communication (Event) handling
• Publish tasks, receive task updates
• Handle external and time triggers
• Detect abandoned tasks, failing workflows
• Publish metrics for monitoring workflow instances
• Governance on [definitions of] Workflows and Events
• Ensure that events are understood and an actor is available for each task
[event]
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 31
Commands are Events that express what should happen
• Example: the Retrieve Payment event
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 32
Decider – state engine
• Take workflow definition
• Take state & state change [events]
• Take context (time)
• Derive new state
• Status of workflow instance
• Status of activities
• Update persisted state
• Inform task dispatcher
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 33
Workflow
Instance State
Workflow
Definitions
Task
Queue/Dispatcher
Signals &
Events
Decider
Workflow definition management
• Hold definitions of multiple workflows
• And the associated data structures
and event messages
• Manage multiple versions of each workflow definition
• and validity period for each version
• Aid upgrade of running instances
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 34
Workflow
Definitions
Task dispatcher & Actors
• Publish task & data context
• Allow actors to pick up [and claim] task
• Detect unclaimed tasks and <do something>
• Detect timed out tasks | failing actors
• Detect regularly completed tasks
• Task dispatcher & Actors publish metrics
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 35A Cloud- and Container-Based Approach to Microservices-Powered Workflows 35
Task
Queue/Dispatcher
Actor
ActorActor
Topic/
Queue
Publish tasks to be
performed; with exactly
once delivery
Task
Heart
beat
Task
Update
Detect failed
actor/reschedule task
Interrupt running
task (send signal)
Facilitated Choreography
or: Orcheography
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 36
Workflow
Instance State
Workflow
Definitions
Task
Queue/Dispatcher
Actor
ActorActor
Topic/
Queue
SweeperSignals &
Events
Decider
Derive new state (status & actions
to release) from workflow definition,
current state, context (e.g. time)
Publish tasks to be
performed; with exactly
once delivery
Detect abandoned
| stuck workflow
instancesHandle external events and
signals that could impact running
instances (note: event from one
workflow instance can be signal to
other)
Produce
time(out) events
for workflow
instances
Task
Heart
beat
Detect failed
actor/reschedule task
Deploy minor and
major versions of
workflow definitions
Hold data context for
workflow instance
Interrupt running
task (send signal)
Orcheography
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 37
Additionally in our workflow execution toolset
• Human participants
• Allocate
• Notify
• Provide multichannel Task UI
• Task Management
• Business indicators
• Find WIP, Waste, Bottlenecks
• Monitoring
• Individual instances & Aggregates per Workflow
• Technical/IT perspective & Business Activity
• Rule Engine (for business logic inside the workflow)
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 38
Involving Human Actors in Workflow
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 39
Human ParticipantWorkflow
allocate
Who should
perform this
task?
notify
How to inform task-
holder about new |
expiring todo item?
multi-channel
task specific user interface
task management (todo list,
claim | reject | delegate task)
Enable human
to perform task
(data, status)?
Enable human
to manage all
her tasks
Microservice is actor as far as workflow engine should know –
it decides if and how to involve a human
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 40
µ
Workflow
Task
Queue/Dispatcher
Notification
Service
Multi Channel Facilities
(chatbot, portal, mobile)
Generic Task
Management
application
Task
specific
UI
Directory
Microservice is actor – proxy for the human contributor(s)
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 41
µ
Notification
Service
Multi Channel Facilities
(chatbot, portal, mobile)
Generic Task
Management
application
Task
specific
UI
Directory
Facilities for
Workflow Management
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 42
Workflow &
Task Metrics
Workflow
Instance State
Workflow
Definitions
Task
Queue/Dispatcher
Monitoring
& Reporting
Actor
Actor
Topic/
Queue
SweeperSignals &
Events
Decider
Derive new state (status & actions
to release) from workflow definition,
current state, context (e.g. time)
Publish tasks to be
performed; with exactly
once delivery
Detect abandoned
| stuck workflow
instancesHandle external
events and signals
that could impact
running instances
Produce
time(out) events
for workflow
instances
Task
Heart
beat
Detect failed
actor/reschedule task
Deploy minor and
major versions of
workflow definitions
Hold data context for
workflow instance
Interrupt running
task (send signal)
Actor
Allocation,
Notification,
Task Mgt
Rule
Evaluation
Orchestration with proxy actors for
decoupled (microservice) actors
A Cloud- and Container-Based Approach to Microservices-Powered Workflows
Orchestration engine
Proxy
Actor
Proxy
Actor
Proxy
Actor
Proxy
Actor
µ µ λ SOAP
API Gateway
Enterprise
Service Bus
Multi-instance,
Distributed,Scalable
Flexible workflow definition
Shared, flexible instance
state
Workflow
Instance State
µµµ
SOAP
SOAP
Hybrid (2)
• Embrace (or at least allow) synchronous orchestration within a domain or bounded context
• For (parts of) flows that are the responsbility within a domain – and a team
• And use (facilitated) choreography for flows stretching across domains
• To retain strong decoupling and flexibility between domains
• Perhaps a Proxy service can consume the “choreographed” event and turn it in locally
orchestrated logic
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 44
Cross Bounded Context |
Domain
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 45
Facilitated Choreography
Orchestrator
Orchestrator
Facilitated
Choreography
Workflow & Task
Metrics Workflow
Instance
State
Workflow
Definitions
Task
Queue/Dispatcher
µ
µ µ
λ
µ
λ
µ
Proxy
Actor
Cross Domain
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 46
Facilitated Choreography
Orchestrator
Orchestrator
Facilitated
Choreography
Workflow & Task
Metrics Workflow
Instance
State
Workflow
Definitions
Task
Queue/Dispatcher
µ
µ µ
λ
µ
λ
µ
Proxy
Actor
Demo Hybrid Orchestration (Orcheography) – Flowing Retail
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 47
Place
Order
Demo Orcheographed Workflow
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 48
Orchestrator
Proxy
Actor
Order Context
Checkout Context
OrderPlaced
Event
Event Bus
Payment Context
Inventory ContextShipment Context
GoodsShipped
Event GoodsFetched
Event
PaymentReceived
Event
Proxy
Actor
Proxy
Actor
Retrieve
Payment
Fetch Goods Ship Goods
µ
µ
µ
µ
µ
µ
Ship Goods Fetch Goods
Retrieve
Payment
Orchestrator
Demo Orcheographed Workflow
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 49
Orchestrator
Proxy
Actor
Order Context
Checkout Context
OrderPlaced
Event
Event Bus
Payment Context
Inventory ContextShipment Context
GoodsShipped
Event GoodsFetched
Event
PaymentReceived
Event
Proxy
Actor
Proxy
Actor
Retrieve
Payment
Fetch Goods Ship Goods
µ
µ
µ
µ
µ
µ
Ship Goods Fetch Goods
Retrieve
Payment
Orchestrator
Demo Orcheographed Workflow
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 50
Event Bus
Summary
• Workflows exist – also in microservice environments
• Short running composite transactions  Long running business process
• Responsibility for running workflow instances can be a cross cutting concern – outside the
scope of any individual microservice
• All generic workflow components need to be agile, scalable, distributed, cloud-enabled
• For resilience, scale, flexible evolution, optimal use of resources
• A lot can happen over the lifetime of a workflow instance – that need to be catered for
• Events, changes in data context, modification of workflow definition Scenarios
• Workflows within single bounded context could be pure orchestration
• Workflows across bounded contexts should use decoupled, choreographed workflow
coordination [between bounded contexts]
• That can span across technologies, physical locations, vendors and clouds
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 51
Summary
• Several frameworks, services and tools are available for supporting workflow
management (e.g. AWS SWF, Zeebe, Camunda, Baker, Cadence, Conductor, Project
Fn Flow , Azure Logic Apps)
• Born from real life needs
• Microservice oriented and [hybrid] cloud enabled
• At heart pre-configured combinations of queue, event bus, NoSQL data store, rule
engine, …
• Roll your own can be fun –
and also quite challenging
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 52
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 53
Source: https://www.infoq.com/articles/events-workflow-automation
Thank you
Dank je wel
• Blog: technology.amis.nl
• Email: lucas.jellema@amis.nl
• : @lucasjellema
• : lucas-jellema
• : www.amis.nl, info@amis.nl
Challenges
• Exactly once delivery of task to actor
• Lock? Queue? Direct call?
• Detect failed | abandoned task execution (& reschedule)
• Heartbeat? Timeout?
• Compensation (for failed transaction)
• Timer events
• Handle Signals/Events to impact running instance
• Correlation (tags/indexes) to locate impacted instances
• Communicate with/interrupt actors
• Monitor individual instances and across instances
• Deal with peak load and high priority instances and tasks
• Distributed, scaled & Ephemeral actors and workflow engine
• How to design workflow in a way that users understand, IT-staff can create
and workflow engines can process
A Cloud- and Container-Based Approach to Microservices-Powered Workflows 55

More Related Content

PPTX
Implementing Microservices on Oracle Cloud: Open, Manageable, Polyglot, and S...
PPTX
Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...
PPTX
50 Shades of Data - how, when and why Big, Fast, Relational, NoSQL, Elastic, ...
PPTX
Business and IT agility through DevOps and microservice architecture powered ...
PPTX
Changing Views on Integration (AUSOUG Webinar Series, May 2020)
PPTX
Oracle Cloud Native Application Development (Meetup, 20th January 2020)
PPTX
AMIS Oracle OpenWorld & CodeOne Review - Pillar 2 - Custom Application Develo...
PPTX
Introduction to Java Cloud Service
Implementing Microservices on Oracle Cloud: Open, Manageable, Polyglot, and S...
Oracle JavaScript Extension Toolkit Web Components Bring Agility to App Devel...
50 Shades of Data - how, when and why Big, Fast, Relational, NoSQL, Elastic, ...
Business and IT agility through DevOps and microservice architecture powered ...
Changing Views on Integration (AUSOUG Webinar Series, May 2020)
Oracle Cloud Native Application Development (Meetup, 20th January 2020)
AMIS Oracle OpenWorld & CodeOne Review - Pillar 2 - Custom Application Develo...
Introduction to Java Cloud Service

What's hot (20)

PDF
Cisco's MultiCloud Strategy
PPTX
OAC - From Cloud Entry to Data Engineering to Data Science
PPTX
Microservices in the Enterprise
PPTX
PPTX
Oracle application container cloud back end integration using node final
PDF
Closer Look at Cloud Centric Architectures
PDF
Migrating from Java EE to cloud-native Reactive systems
PDF
Microservices, Kubernetes, and Application Modernization Done Right
PPTX
How does the Cloud Foundry Diego Project Run at Scale, and Updates on .NET Su...
PDF
Stay productive while slicing up the monolith
PDF
Northwestern Mutual Journey – Transform BI Space to Cloud
PDF
How would ESBs look like, if they were done today.
PDF
Working and Features of HTML5 and PhoneGap - An Overview
PDF
MongoDB-as-a-Service on Pivotal Cloud Foundry
PDF
Cloudlytics: In Depth S3 & CloudFront Log Analysis - Featuring Reports
PDF
RHTE2015_CloudForms_Containers
PDF
Manatee to Dolphin: Transitioning to a Startup Mentality
PPTX
Microsoft ignite 2018 SQL server 2019 big data clusters - deep dive session
PDF
Modern big data and machine learning in the era of cloud, docker and kubernetes
PPTX
Oracle Management Cloud - introduction, overview and getting started (AMIS, 2...
Cisco's MultiCloud Strategy
OAC - From Cloud Entry to Data Engineering to Data Science
Microservices in the Enterprise
Oracle application container cloud back end integration using node final
Closer Look at Cloud Centric Architectures
Migrating from Java EE to cloud-native Reactive systems
Microservices, Kubernetes, and Application Modernization Done Right
How does the Cloud Foundry Diego Project Run at Scale, and Updates on .NET Su...
Stay productive while slicing up the monolith
Northwestern Mutual Journey – Transform BI Space to Cloud
How would ESBs look like, if they were done today.
Working and Features of HTML5 and PhoneGap - An Overview
MongoDB-as-a-Service on Pivotal Cloud Foundry
Cloudlytics: In Depth S3 & CloudFront Log Analysis - Featuring Reports
RHTE2015_CloudForms_Containers
Manatee to Dolphin: Transitioning to a Startup Mentality
Microsoft ignite 2018 SQL server 2019 big data clusters - deep dive session
Modern big data and machine learning in the era of cloud, docker and kubernetes
Oracle Management Cloud - introduction, overview and getting started (AMIS, 2...
Ad

Similar to A Cloud- and Container-Based Approach to Microservices-Powered Workflows (CodeOne 2018, San Francisco) (20)

PDF
CQRS + Event Sourcing
PPTX
Live Introduction to the Cloud Native Microservices Platform – open, manageab...
PPTX
In-Stream Processing Service Blueprint, Reference architecture for real-time ...
PDF
Cloud-native Data
PDF
Cloud-Native-Data with Cornelia Davis
PPTX
AMIS OOW Review 2012 - Deel 5 Coherence - Paco van der Linden
PPTX
Comparing Cloud platforms and tools
PPTX
Comparing Cloud Providers, Platforms and Tools
PDF
Cloud Computing Essentials in Alibaba Cloud
PDF
Operational-Analytics
PPTX
Impact of cloud services on the work of oracle technology experts
PPTX
Impact of cloud services on the work of oracle technology experts
PDF
Cloud Services Integration Automation-External
PPTX
Modernizing your Application Architecture with Microservices
PPTX
Serverless microservices
PPTX
Iot cloud service v2.0
PDF
The Gib Five - Modern IT Architecture
PPTX
Risc and velostrata 2 28 2018 lessons_in_cloud_migration
PPTX
Modern Architecture in the Cloud of 2018
PDF
Data Engineer, Patterns & Architecture The future: Deep-dive into Microservic...
CQRS + Event Sourcing
Live Introduction to the Cloud Native Microservices Platform – open, manageab...
In-Stream Processing Service Blueprint, Reference architecture for real-time ...
Cloud-native Data
Cloud-Native-Data with Cornelia Davis
AMIS OOW Review 2012 - Deel 5 Coherence - Paco van der Linden
Comparing Cloud platforms and tools
Comparing Cloud Providers, Platforms and Tools
Cloud Computing Essentials in Alibaba Cloud
Operational-Analytics
Impact of cloud services on the work of oracle technology experts
Impact of cloud services on the work of oracle technology experts
Cloud Services Integration Automation-External
Modernizing your Application Architecture with Microservices
Serverless microservices
Iot cloud service v2.0
The Gib Five - Modern IT Architecture
Risc and velostrata 2 28 2018 lessons_in_cloud_migration
Modern Architecture in the Cloud of 2018
Data Engineer, Patterns & Architecture The future: Deep-dive into Microservic...
Ad

More from Lucas Jellema (20)

PPTX
Introduction to web application development with Vue (for absolute beginners)...
PPTX
Making the Shift Left - Bringing Ops to Dev before bringing applications to p...
PPTX
Lightweight coding in powerful Cloud Development Environments (DigitalXchange...
PPTX
Apache Superset - open source data exploration and visualization (Conclusion ...
PPTX
CONNECTING THE REAL WORLD TO ENTERPRISE IT – HOW IoT DRIVES OUR ENERGY TRANSI...
PPTX
Help me move away from Oracle - or not?! (Oracle Community Tour EMEA - LVOUG...
PPTX
Op je vingers tellen... tot 1000!
PPTX
IoT - from prototype to enterprise platform (DigitalXchange 2022)
PPTX
Who Wants to Become an IT Architect-A Look at the Bigger Picture - DigitalXch...
PPTX
Steampipe - use SQL to retrieve data from cloud, platforms and files (Code Ca...
PPTX
Automation of Software Engineering with OCI DevOps Build and Deployment Pipel...
PPTX
Introducing Dapr.io - the open source personal assistant to microservices and...
PPTX
How and Why you can and should Participate in Open Source Projects (AMIS, Sof...
PPTX
Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...
PPTX
Microservices, Node, Dapr and more - Part One (Fontys Hogeschool, Spring 2022)
PPTX
6Reinventing Oracle Systems in a Cloudy World (RMOUG Trainingdays, February 2...
PPTX
Help me move away from Oracle! (RMOUG Training Days 2022, February 2022)
PPTX
Tech Talks 101 - DevOps (jan 2022)
PPTX
Conclusion Code Cafe - Microcks for Mocking and Testing Async APIs (January 2...
PPTX
Cloud Native Application Development - build fast, low TCO, scalable & agile ...
Introduction to web application development with Vue (for absolute beginners)...
Making the Shift Left - Bringing Ops to Dev before bringing applications to p...
Lightweight coding in powerful Cloud Development Environments (DigitalXchange...
Apache Superset - open source data exploration and visualization (Conclusion ...
CONNECTING THE REAL WORLD TO ENTERPRISE IT – HOW IoT DRIVES OUR ENERGY TRANSI...
Help me move away from Oracle - or not?! (Oracle Community Tour EMEA - LVOUG...
Op je vingers tellen... tot 1000!
IoT - from prototype to enterprise platform (DigitalXchange 2022)
Who Wants to Become an IT Architect-A Look at the Bigger Picture - DigitalXch...
Steampipe - use SQL to retrieve data from cloud, platforms and files (Code Ca...
Automation of Software Engineering with OCI DevOps Build and Deployment Pipel...
Introducing Dapr.io - the open source personal assistant to microservices and...
How and Why you can and should Participate in Open Source Projects (AMIS, Sof...
Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...
Microservices, Node, Dapr and more - Part One (Fontys Hogeschool, Spring 2022)
6Reinventing Oracle Systems in a Cloudy World (RMOUG Trainingdays, February 2...
Help me move away from Oracle! (RMOUG Training Days 2022, February 2022)
Tech Talks 101 - DevOps (jan 2022)
Conclusion Code Cafe - Microcks for Mocking and Testing Async APIs (January 2...
Cloud Native Application Development - build fast, low TCO, scalable & agile ...

Recently uploaded (20)

PPT
Introduction Database Management System for Course Database
PDF
Understanding NFT Marketplace Development_ Trends and Innovations.pdf
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
Essential Infomation Tech presentation.pptx
PDF
System and Network Administration Chapter 2
PDF
PTS Company Brochure 2025 (1).pdf.......
PPTX
Odoo POS Development Services by CandidRoot Solutions
PPTX
L1 - Introduction to python Backend.pptx
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
Safe Confined Space Entry Monitoring_ Singapore Experts.pptx
PPTX
Online Work Permit System for Fast Permit Processing
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
top salesforce developer skills in 2025.pdf
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
Digital Strategies for Manufacturing Companies
PDF
Softaken Excel to vCard Converter Software.pdf
Introduction Database Management System for Course Database
Understanding NFT Marketplace Development_ Trends and Innovations.pdf
VVF-Customer-Presentation2025-Ver1.9.pptx
How to Choose the Right IT Partner for Your Business in Malaysia
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Essential Infomation Tech presentation.pptx
System and Network Administration Chapter 2
PTS Company Brochure 2025 (1).pdf.......
Odoo POS Development Services by CandidRoot Solutions
L1 - Introduction to python Backend.pptx
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Safe Confined Space Entry Monitoring_ Singapore Experts.pptx
Online Work Permit System for Fast Permit Processing
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
top salesforce developer skills in 2025.pdf
How Creative Agencies Leverage Project Management Software.pdf
Digital Strategies for Manufacturing Companies
Softaken Excel to vCard Converter Software.pdf

A Cloud- and Container-Based Approach to Microservices-Powered Workflows (CodeOne 2018, San Francisco)

  • 1. A Cloud- and Container-Based Approach to Microservices- Powered Workflows A Cloud- and Container-Based Approach to Microservices-Powered Workflows 1 Lucas Jellema, CTO of AMIS CodeOne 2018, San Francisco, USA
  • 2. Lucas Jellema Architect / Developer 1994 started in IT at Oracle 2002 joined AMIS Currently CTO & Solution Architect A Cloud- and Container-Based Approach to Microservices-Powered Workflows 2
  • 3. Overview • Definitions – what is workflow | microservice • And what are objectives & requirements • Bare essence of workflow • Challenges with workflows – especially in a microservices world • Approaches • Orchestrated • Choreographed • Hybrid • Required components • Tools & technologies A Cloud- and Container-Based Approach to Microservices-Powered Workflows 3
  • 4. Defining Workflow • Cross domain cutting concern • Composite transaction • Multi-step chain • Long running process • System initiated human participation A Cloud- and Container-Based Approach to Microservices-Powered Workflows 4
  • 5. Objectives • Flows completed • In time • Following the plan • Handling of non-happy situations • Efficient execution • Regarding resource usage (compute and human) • Agility – easily adaptable A Cloud- and Container-Based Approach to Microservices-Powered Workflows 5
  • 6. Examples • From Webshop Order to Fulfillment and Invoice • CI/CD Pipeline – from source code to running container • Composite Order (“concert ticket, flight ticket, hotel reservation, car rental”) • Travel Approval process • CQRS-style refresh of query-stores upon update of command-database • Bid management process • From Blood Sample to Lab Results and Notification • Nightly job to process data [in several steps] • Process complex incoming message into multiple domains [and data stores] • From “order food to deliver meal” • ChatBot – conversation flow • Synchronous Service Call Retry • … A Cloud- and Container-Based Approach to Microservices-Powered Workflows 6
  • 7. A Cloud- and Container-Based Approach to Microservices-Powered Workflows 7 Source: https://thenewstack.io/5-workflow-automation-use-cases-you-might-not-have-considered/
  • 8. Constituents of a Workflow • Activities (& actor roles) • Flow logic • Sequence • Conditional • Events (including time) • Loop • Parallellism • Deadlines • Events and Signals that trigger or influence • Transaction boundaries • Succeed or rollback together • Exceptions, non-happy-flow, compensation handlers • State – data associated with an instance of a workflow • Including the progress & status of the instance (where are we at?) • Business indicators (per instance and across instances) & business monitoring A Cloud- and Container-Based Approach to Microservices-Powered Workflows 8
  • 9. Workflow Design | Blueprint • Communication with business • Input for implementation of workflow • Input for implementing business monitoring & reporting • Input for a workflow engine – to execute • Examples of formal notation methods: • BPMN • BPEL • CMMN • Harel Statecharts • State Diagrams • Petri net A Cloud- and Container-Based Approach to Microservices-Powered Workflows 9
  • 10. Examples of workflow designs A Cloud- and Container-Based Approach to Microservices-Powered Workflows 10
  • 11. At the core • The logical definition of the workflow combined with the current state of the instance and the current time (or other external conditions) • To produce one or more “To Do items” for activity types in the context of the workflow instance • Including non-happy exception items (for example when previous to-do item timed out) • The To Do items should be made available to actors (for example microservices) • Including (reference to the) state • Actors can ‘take on’ a To Do item – typically exclusively • They can read and extend the state of the workflow instance (Including completing | failing | returning the task) A Cloud- and Container-Based Approach to Microservices-Powered Workflows 11
  • 12. Tasks go through states • Task == Workflow Step == Activity • Each state change requires reevaluating the workflow-instance A Cloud- and Container-Based Approach to Microservices-Powered Workflows 12
  • 13. Workflow instances go through states Business state and Operational state • New • Running • Waiting on • Actors • Events • Failed • Completed A Cloud- and Container-Based Approach to Microservices-Powered Workflows 13
  • 14. Microservices • Business Agility • Functionality: quick, cheap, effortless and risk free • IT Agility • Non-functionality: scale, resilience, infrastructure & location • Independent components • Asynchronous communication – whenever possible • Encapsulated • Location does not matter • Strictly within one domain, owned by one team • Not too big or complex • Horizontally Scalable (multiple instances ) • Ephemeral, Stateless • Enabling Automated DevOps A Cloud- and Container-Based Approach to Microservices-Powered Workflows 14
  • 15. • Manage data context for Workflow instance • Persist • Share • Update • Derive next state • from data context • Event (time) • Workflow definition To make workflows work in a microservices arena… A Cloud- and Container-Based Approach to Microservices-Powered Workflows 15 • Ensure workflow instances are completed according to plan • Agile evolution of workflow definitions (and data structure) • Short & Long-running workflow • Provide business insight in status and progress Workflow in Microservices Land • Prevent multiple actors from working on the same task • Detect tasks not picked up or abandoned • Act on events & functional timeouts • Microservice (& Lambda [Stateless] Functions) • Assume that ownership for each workflow lies in one domain • Someone cares – because of what that team tries to achieve • Preferably Asynchronous communication • Multiple instances of actor • Distributed/unknown | changing location • Poly-tech implementations • Frequent scale & redeploy & replace (plus A/B and Canary) • Smart Endpoints, Dumb Pipes • Cloud – wide area network • Containers – ephemeral (stateless), restart, multi-instance
  • 16. Approaches • Orchestration • Choreography • Hybrid • Coordinated | Facilitated Choreography • Mixing orchestration and choreography A Cloud- and Container-Based Approach to Microservices-Powered Workflows 16
  • 17. Orchestration • Central coordination • Flow logic • Actor invocation (synchronous?) and communication • Transaction • Exception, Timeout and Event & Signal handling • Workflow instance state & data content • Within and/or across domains A Cloud- and Container-Based Approach to Microservices-Powered Workflows 17 Workflow Orchestration Engine actor actor actor
  • 18. Orchestration – challenges & undesirabilities • Hard dependency on actors: what, where, how to invoke • Any change in actor may impact central orchestrator • Monolithic orchestrator may become bottleneck • Physically (defying Ops – scale, patch, …) • Mentally (god service, omniscient ) • (in the past?) very not agile: • running instances, changing data structure & workflow definitions • Several products provide(d) this capability – and have sometimes made life hard and given workflow orchestration a bad name • Oracle BPM Suite, Camunda, jBPM, Activiti, Pega Systems, Tallyfy, Bizagi, Oracle Integration Cloud (PCS), IBM Business Process Manager, Red Hat Process Automation Manager A Cloud- and Container-Based Approach to Microservices-Powered Workflows 18
  • 19. Choreography • No one is owner of the workflow instance • Full independence between all actors • Microservices know nothing about each other • Events trigger them into action • Their end state is published through an event • The workflow does not explicitly exist • Arises as sequence of independent microservice actions • Microservice need to know about the event that should trigger them • Highly flexible • As long as actors are acting on events – they can be anywhere, scaled in anyway, doing anything and be implemented in any technology A Cloud- and Container-Based Approach to Microservices-Powered Workflows 19
  • 20. Example of Choreography – Flowing Retail – Process Order A Cloud- and Container-Based Approach to Microservices-Powered Workflows 20 Source: Bernd Rücker, https://github.com/berndruecker/flowing-retail ShipmentInventoryPayment Shop & Checkout
  • 21. Example of Event Driven Choreography – Flowing Retail A Cloud- and Container-Based Approach to Microservices-Powered Workflows 21 Order Completed
  • 22. Pure Choreography - demo A Cloud- and Container-Based Approach to Microservices-Powered Workflows 22
  • 23. A Cloud- and Container-Based Approach to Microservices-Powered Workflows 23
  • 24. Code in Actor Inventory A Cloud- and Container-Based Approach to Microservices-Powered Workflows 24
  • 25. Choreography Challenges • How to share the workflow state (“data context”) • Hard to implement flow logic – e.g. conditional actions or loops • Hard to handle parallel activities on same “instance” • State is payload of event • Changing the implicit workflow requires changing the microservices • The way they respond to events • Tracing the workflow is hard • Detecting and fixing stuck and failing workflow instances is hard • Who determines if the Order is completed? A Cloud- and Container-Based Approach to Microservices-Powered Workflows 25 Order Completed
  • 26. Event Driven Pitfall regarding workflows and pure choreography A Cloud- and Container-Based Approach to Microservices-Powered Workflows 26
  • 27. Guided Choreography • Workflow definition exists • Workflow definition is instantiated as routing slip that is included in events • Available to each actor • Actors determine if the routing slip for an instance allows | prompts them to act • If so, they perform work then update routing slip and publish an event • And so on • Extremely flexible • Deploy and redeploy actors as desired • A/B and Canary testing • Modifying workflow definitions • Potentially even for running instances A Cloud- and Container-Based Approach to Microservices-Powered Workflows 27
  • 28. Workflow [Event] Monitor Guided Choreography with Routing Slip A Cloud- and Container-Based Approach to Microservices-Powered Workflows 28 Workflow Initiator Workflow definitions Workflow event EventBus A Cloud- and Container-Based Approach to Microservices-Powered Workflows 28 Actor Actor Actor Check if the routing slip contains a task that this actor can perform and that is released for execution Check if the routing slip contains a task that this actor can perform and that is released for execution Check if the routing slip contains a task that this actor can perform and that is released for execution Check if the routing slip contains a task that this actor can perform and that is released for execution Check if the routing slip contains a task that this actor can perform and that is released for execution Check if the routing slip contains a task that this actor can perform and that is released for execution Payload Instance Identifier Workflow Definition Identifier State (associated data) Tasks - Activity type - Identifier - Status (new | done | waiting | failed) - Conditions/Dependencies Audit If it is, then perform the task and publish a new workflow event with updated state, task & audit Workflow event
  • 29. Routing Slip A Cloud- and Container-Based Approach to Microservices-Powered Workflows 29 Retrieve Payment checkout Retrieve Goods Ship Goods Cancel Order
  • 30. Challenges with Guided Choreography – Routing Slip • Prevent multiple actors picking up the same task in an instance (concurrency) • Exclusively claim a task • Handle state updates by actors on parallel tasks (split brain state of routing slip) • Perhaps store state in distributed cache • Potentially inefficient as each actor evaluates all workflow events • For all workflows and all instances • Detect failing instances • Handle timers and signals A Cloud- and Container-Based Approach to Microservices-Powered Workflows done
  • 31. Best of Both Worlds: Hybrid – Coordinated Choreography • Asynchronous communication based on queues | commands | events • Distributed, stateless, horizontally scalable workflow engine • Data context (“state”) • State transition (workflow logic) • Communication (Event) handling • Publish tasks, receive task updates • Handle external and time triggers • Detect abandoned tasks, failing workflows • Publish metrics for monitoring workflow instances • Governance on [definitions of] Workflows and Events • Ensure that events are understood and an actor is available for each task [event] A Cloud- and Container-Based Approach to Microservices-Powered Workflows 31
  • 32. Commands are Events that express what should happen • Example: the Retrieve Payment event A Cloud- and Container-Based Approach to Microservices-Powered Workflows 32
  • 33. Decider – state engine • Take workflow definition • Take state & state change [events] • Take context (time) • Derive new state • Status of workflow instance • Status of activities • Update persisted state • Inform task dispatcher A Cloud- and Container-Based Approach to Microservices-Powered Workflows 33 Workflow Instance State Workflow Definitions Task Queue/Dispatcher Signals & Events Decider
  • 34. Workflow definition management • Hold definitions of multiple workflows • And the associated data structures and event messages • Manage multiple versions of each workflow definition • and validity period for each version • Aid upgrade of running instances A Cloud- and Container-Based Approach to Microservices-Powered Workflows 34 Workflow Definitions
  • 35. Task dispatcher & Actors • Publish task & data context • Allow actors to pick up [and claim] task • Detect unclaimed tasks and <do something> • Detect timed out tasks | failing actors • Detect regularly completed tasks • Task dispatcher & Actors publish metrics A Cloud- and Container-Based Approach to Microservices-Powered Workflows 35A Cloud- and Container-Based Approach to Microservices-Powered Workflows 35 Task Queue/Dispatcher Actor ActorActor Topic/ Queue Publish tasks to be performed; with exactly once delivery Task Heart beat Task Update Detect failed actor/reschedule task Interrupt running task (send signal)
  • 36. Facilitated Choreography or: Orcheography A Cloud- and Container-Based Approach to Microservices-Powered Workflows 36 Workflow Instance State Workflow Definitions Task Queue/Dispatcher Actor ActorActor Topic/ Queue SweeperSignals & Events Decider Derive new state (status & actions to release) from workflow definition, current state, context (e.g. time) Publish tasks to be performed; with exactly once delivery Detect abandoned | stuck workflow instancesHandle external events and signals that could impact running instances (note: event from one workflow instance can be signal to other) Produce time(out) events for workflow instances Task Heart beat Detect failed actor/reschedule task Deploy minor and major versions of workflow definitions Hold data context for workflow instance Interrupt running task (send signal)
  • 37. Orcheography A Cloud- and Container-Based Approach to Microservices-Powered Workflows 37
  • 38. Additionally in our workflow execution toolset • Human participants • Allocate • Notify • Provide multichannel Task UI • Task Management • Business indicators • Find WIP, Waste, Bottlenecks • Monitoring • Individual instances & Aggregates per Workflow • Technical/IT perspective & Business Activity • Rule Engine (for business logic inside the workflow) A Cloud- and Container-Based Approach to Microservices-Powered Workflows 38
  • 39. Involving Human Actors in Workflow A Cloud- and Container-Based Approach to Microservices-Powered Workflows 39 Human ParticipantWorkflow allocate Who should perform this task? notify How to inform task- holder about new | expiring todo item? multi-channel task specific user interface task management (todo list, claim | reject | delegate task) Enable human to perform task (data, status)? Enable human to manage all her tasks
  • 40. Microservice is actor as far as workflow engine should know – it decides if and how to involve a human A Cloud- and Container-Based Approach to Microservices-Powered Workflows 40 µ Workflow Task Queue/Dispatcher Notification Service Multi Channel Facilities (chatbot, portal, mobile) Generic Task Management application Task specific UI Directory
  • 41. Microservice is actor – proxy for the human contributor(s) A Cloud- and Container-Based Approach to Microservices-Powered Workflows 41 µ Notification Service Multi Channel Facilities (chatbot, portal, mobile) Generic Task Management application Task specific UI Directory
  • 42. Facilities for Workflow Management A Cloud- and Container-Based Approach to Microservices-Powered Workflows 42 Workflow & Task Metrics Workflow Instance State Workflow Definitions Task Queue/Dispatcher Monitoring & Reporting Actor Actor Topic/ Queue SweeperSignals & Events Decider Derive new state (status & actions to release) from workflow definition, current state, context (e.g. time) Publish tasks to be performed; with exactly once delivery Detect abandoned | stuck workflow instancesHandle external events and signals that could impact running instances Produce time(out) events for workflow instances Task Heart beat Detect failed actor/reschedule task Deploy minor and major versions of workflow definitions Hold data context for workflow instance Interrupt running task (send signal) Actor Allocation, Notification, Task Mgt Rule Evaluation
  • 43. Orchestration with proxy actors for decoupled (microservice) actors A Cloud- and Container-Based Approach to Microservices-Powered Workflows Orchestration engine Proxy Actor Proxy Actor Proxy Actor Proxy Actor µ µ λ SOAP API Gateway Enterprise Service Bus Multi-instance, Distributed,Scalable Flexible workflow definition Shared, flexible instance state Workflow Instance State µµµ SOAP SOAP
  • 44. Hybrid (2) • Embrace (or at least allow) synchronous orchestration within a domain or bounded context • For (parts of) flows that are the responsbility within a domain – and a team • And use (facilitated) choreography for flows stretching across domains • To retain strong decoupling and flexibility between domains • Perhaps a Proxy service can consume the “choreographed” event and turn it in locally orchestrated logic A Cloud- and Container-Based Approach to Microservices-Powered Workflows 44
  • 45. Cross Bounded Context | Domain A Cloud- and Container-Based Approach to Microservices-Powered Workflows 45 Facilitated Choreography Orchestrator Orchestrator Facilitated Choreography Workflow & Task Metrics Workflow Instance State Workflow Definitions Task Queue/Dispatcher µ µ µ λ µ λ µ Proxy Actor
  • 46. Cross Domain A Cloud- and Container-Based Approach to Microservices-Powered Workflows 46 Facilitated Choreography Orchestrator Orchestrator Facilitated Choreography Workflow & Task Metrics Workflow Instance State Workflow Definitions Task Queue/Dispatcher µ µ µ λ µ λ µ Proxy Actor
  • 47. Demo Hybrid Orchestration (Orcheography) – Flowing Retail A Cloud- and Container-Based Approach to Microservices-Powered Workflows 47 Place Order
  • 48. Demo Orcheographed Workflow A Cloud- and Container-Based Approach to Microservices-Powered Workflows 48 Orchestrator Proxy Actor Order Context Checkout Context OrderPlaced Event Event Bus Payment Context Inventory ContextShipment Context GoodsShipped Event GoodsFetched Event PaymentReceived Event Proxy Actor Proxy Actor Retrieve Payment Fetch Goods Ship Goods µ µ µ µ µ µ Ship Goods Fetch Goods Retrieve Payment Orchestrator
  • 49. Demo Orcheographed Workflow A Cloud- and Container-Based Approach to Microservices-Powered Workflows 49 Orchestrator Proxy Actor Order Context Checkout Context OrderPlaced Event Event Bus Payment Context Inventory ContextShipment Context GoodsShipped Event GoodsFetched Event PaymentReceived Event Proxy Actor Proxy Actor Retrieve Payment Fetch Goods Ship Goods µ µ µ µ µ µ Ship Goods Fetch Goods Retrieve Payment Orchestrator
  • 50. Demo Orcheographed Workflow A Cloud- and Container-Based Approach to Microservices-Powered Workflows 50 Event Bus
  • 51. Summary • Workflows exist – also in microservice environments • Short running composite transactions  Long running business process • Responsibility for running workflow instances can be a cross cutting concern – outside the scope of any individual microservice • All generic workflow components need to be agile, scalable, distributed, cloud-enabled • For resilience, scale, flexible evolution, optimal use of resources • A lot can happen over the lifetime of a workflow instance – that need to be catered for • Events, changes in data context, modification of workflow definition Scenarios • Workflows within single bounded context could be pure orchestration • Workflows across bounded contexts should use decoupled, choreographed workflow coordination [between bounded contexts] • That can span across technologies, physical locations, vendors and clouds A Cloud- and Container-Based Approach to Microservices-Powered Workflows 51
  • 52. Summary • Several frameworks, services and tools are available for supporting workflow management (e.g. AWS SWF, Zeebe, Camunda, Baker, Cadence, Conductor, Project Fn Flow , Azure Logic Apps) • Born from real life needs • Microservice oriented and [hybrid] cloud enabled • At heart pre-configured combinations of queue, event bus, NoSQL data store, rule engine, … • Roll your own can be fun – and also quite challenging A Cloud- and Container-Based Approach to Microservices-Powered Workflows 52
  • 53. A Cloud- and Container-Based Approach to Microservices-Powered Workflows 53 Source: https://www.infoq.com/articles/events-workflow-automation
  • 54. Thank you Dank je wel • Blog: technology.amis.nl • Email: [email protected] • : @lucasjellema • : lucas-jellema • : www.amis.nl, [email protected]
  • 55. Challenges • Exactly once delivery of task to actor • Lock? Queue? Direct call? • Detect failed | abandoned task execution (& reschedule) • Heartbeat? Timeout? • Compensation (for failed transaction) • Timer events • Handle Signals/Events to impact running instance • Correlation (tags/indexes) to locate impacted instances • Communicate with/interrupt actors • Monitor individual instances and across instances • Deal with peak load and high priority instances and tasks • Distributed, scaled & Ephemeral actors and workflow engine • How to design workflow in a way that users understand, IT-staff can create and workflow engines can process A Cloud- and Container-Based Approach to Microservices-Powered Workflows 55

Editor's Notes

  • #2: A Cloud- and Container-Based Approach to Microservices-Powered Workflows  Microservices are independent—sure. Complex transactions and workflows may still require contributions from several microservices. This session describes how microservices can seemingly collaborate without sacrificing their independence. Workflow choreography, rather than orchestration, and events for data exchange, rather than synchronous interactions, are key to implementing workflows in a robust, flexible, and scalable way that can deal with horizontal and stateless and even serverless scalability and continuous, flexible upgrades. Generic capabilities are introduced for monitoring, workflow instance recovery, scheduling, human notifications, and routing slip management. Live demonstrations illustrate and prove the proposed approach. https://dzone.com/articles/patterns-for-microservices-sync-vs-async https://blog.bernd-ruecker.com/hack-day-experiments-with-the-cloud-and-orchestration-of-serverless-functions-2f8aeb51e343 https://zeebe.io/what-is-zeebe/ https://zeebe.io/blog/2018/09/microservices-orchestration-survey-results-recap/ https://github.com/berndruecker/flowing-retail https://www.infoq.com/presentations/event-flow-distributed-systems
  • #7: https://docs.microsoft.com/en-us/azure/architecture/microservices/ingestion-workflow
  • #8: https://thenewstack.io/5-workflow-automation-use-cases-you-might-not-have-considered/
  • #10: https://www.wikiwand.com/en/Petri_net Around slide 9  or 10 you might want to highlight that some workflows are just documentation (traditional process modelling sort of say) and others are execution which is what you’re focusing on
  • #11: https://netflix.github.io/conductor/metadata/kitchensink/ https://github.com/ing-bank/baker https://thenewstack.io/5-workflow-automation-use-cases-you-might-not-have-considered/
  • #13: Picture from Conductor https://netflix.github.io/conductor/metadata/
  • #45: https://stackoverflow.com/questions/29117570/orchestrating-microservices
  • #49: https://github.com/berndruecker/flowing-retail/blob/master/kafka/java/order-camunda/src/main/resources/order.bpmn
  • #50: https://github.com/berndruecker/flowing-retail/blob/master/kafka/java/order-camunda/src/main/resources/order.bpmn
  • #54: https://www.infoq.com/articles/events-workflow-automation