SlideShare a Scribd company logo
From codebase to database:
Automation via workflows
A way of writing customizable logic.
patelmilanp
patelmilan-p
Agenda
● What is workflow as a concept
● Some examples of workflow
● Automate workflows using traditional coding techniques
● Problem with traditional techniques
● Design a technique using event based architecture to solve
the problem
● Use Cases
● Benefits / Advantages over traditional methods
● Overview: our implementation of this technique
● Challenges we are facing with this design
● Dictionary meaning:
The sequence of processes through which a piece of work passes from initiation
to completion.
● It is a sequence of operations, declared as work of a person or group/organization.
● From a higher-level perspective, workflow may be considered a view or
representation of real work.
● Workflows may be viewed as one fundamental building block to be combined
with other parts of an organization's structure.
● History:
One of the earliest usages of the term 'work flow' was in a railway engineering
journal from 1921.
Workflow as a concept

Recommended for you

Confluent Messaging Modernization Forum
Confluent Messaging Modernization ForumConfluent Messaging Modernization Forum
Confluent Messaging Modernization Forum

Confluent provides a platform for modernizing enterprise messaging infrastructure by leveraging Kafka. Kafka uses an immutable log to share data across producers and consumers in a scalable, fault-tolerant, and efficient manner. This allows enterprises to build real-time applications and enable data-in-motion across the organization. Confluent offers tools like Schema Registry, ksqlDB, and connectors to help standardize data, build stream processing applications, and integrate Kafka with other systems.

messaging modernizationconfluent
Microservices, Kubernetes, and Application Modernization Done Right
Microservices, Kubernetes, and Application Modernization Done RightMicroservices, Kubernetes, and Application Modernization Done Right
Microservices, Kubernetes, and Application Modernization Done Right

In this talk by David Ogren, Enterprise Architect at Lightbend, we draw from experiences helping our clients successfully create, migrate to, and manage cloud-native system architectures. We look at some of the common pitfalls and anti-patterns of modernization efforts, and some of the best practices for taking an incremental approach to transforming legacy systems. See the full post with video on the Lightbend blog: https://www.lightbend.com/blog/microservices-kubernetes-application-modernization

microservicesreactive systemsnot just async
Dynatrace FreeTrial Test Drive
Dynatrace FreeTrial Test DriveDynatrace FreeTrial Test Drive
Dynatrace FreeTrial Test Drive

The document outlines an agenda for a Dynatrace free trial test drive. It includes an overview of Dynatrace application monitoring, what activities will be done during the test drive, and useful resources. The architecture of the Dynatrace solution is shown, with the Dynatrace server processing data and the frontend server supporting user analysis. Screenshots of the Dynatrace user interface are provided to demonstrate transaction flows, hotspots identification, and performance analysis.

Sample Workflow
An example workflow for the purpose to this talk.
A simplistic workflow from medical services domain
Appointment
Patient schedules an appointment.
Arrival
Patient gets to the clinic.
Visit
Patient talks with the doctor.
Send a notification via sms to patient
& doctor.
Send a reminder sms to patient
15 mins before the appointment.
Automated workflow via
Traditional coding
technique
class Appointment < ActiveRecord::Base
belongs_to :doctor
belongs_to :patient
after_create :send_sms_to_doctor_and_patient
after_create :remind_patient_before_hand
def remind_patient_before_hand(appointment)
MailerWorker.perform_at(
(appointment.scheduled_time - 15.minutes),
appointment.patient_id)
end
end
Problems with this method:
● Suppose we try to sell this to different doctors, and found out that every doctor’s
workflow is little bit different.
● How can we achieve this kind of customizability in our application to cater for
different requirements ?
● Suppose, we came up with settings feature where a set of settings can be
enabled/disabled to handle different requirements. (but is it a feasible solution ?)
● So now we will design a solution based on event driven architecture, which is fully
customizable and can handle requirement differences easily.

Recommended for you

A practical introduction to Event Sourcing and CQRS
A practical introduction to Event Sourcing and CQRSA practical introduction to Event Sourcing and CQRS
A practical introduction to Event Sourcing and CQRS

Event Sourcing is supposed to be a great thing: silver bullet; at least. But only if your business case requires it. And if you event-source, you of course need CQRS. Unless you don't. After all, if it's business critical, you really want to use DDD. Enough of the theory? How about some practical introduction to the world of commands, aggregates, events, projectors and process managers? After this session you'll surely have a better idea of what all of this is about. https://www.youtube.com/watch?v=cUXi9fUqWQ0

flow frameworkphpevent sourcing
Moving Legacy Apps to Cloud: How to Avoid Risk
Moving Legacy Apps to Cloud: How to Avoid RiskMoving Legacy Apps to Cloud: How to Avoid Risk
Moving Legacy Apps to Cloud: How to Avoid Risk

** Watch the video to accompany these slides: https://www.cloverdx.com/webinars/avoiding-risk-when-moving-legacy-apps-to-cloud ** Legacy systems can be critical to business success, but because they're frequently old, they often don't work well in the modern world and lag behind in features and convenience. Migrating to a more modern system is often viewed as risky and expensive. But it doesn't have to be. Watch this video to discover: - Why would you want to migrate your legacy application to the cloud - Common migration approaches - Ways to make the migration faster and painless - How to minimize risk during the migration process More CloverDX webinars: https://www.cloverdx.com/webinars Twitter: https://twitter.com/cloverdx LinkedIn: https://www.linkedin.com/company/cloverdx/ Get a free 45 day trial of the CloverDX Data Management Platform: https://www.cloverdx.com/trial-platform

data migrationenterprise softwarecloud
Event Driven Architecture
Event Driven ArchitectureEvent Driven Architecture
Event Driven Architecture

A whirlwind tour of Event Driven Architecture, extensibility, Domain Driven Design, Command and Query Responsibility Segregation (CQRS) and Complex Event Processing

sapo codebits eda 2010 ddd cqrs events data aggreg
Event driven architecture (EDA)
● It’s a software architecture pattern promoting the production, detection,
consumption of, and reaction to events.
● Key aspects:
1. Type of interaction: Event-driven
2. Initiator: Event
3. Participants: Open-ended
● Some principles of EDA:
1. “Real-time” events as they happen at the producer
2. One-way “fire-and-forget”
3. Immediate action at the consumers
4. Informational (“someone logged in”), not commands (“audit this”)
EDA (generic block diagram)
Business
Processes
Services State
Machines
Monitors /
Probes
Business
Processes
Services State
Machines
Monitors /
Probes
Event Publishers
Event Subscribers
Event processing engine
Event Handler
Event Emitter
Event Channels
Event Flow
Design a system using EDA to solve our
problem
System comprised of following entities
System’s primary focus should be on the domain & domain logic.
● Domain events:
○ A Domain Event is something that happened that the domain expert cares about.
○ By exposing relevant Domain Events on a shared event bus we can isolate cross cutting functions to
separate system.
● Conditions:
○ Often domain logic accompanies with some conditional scenarios.
○ Through this entity, we decide whether to execute a given action after evaluating defined
conditions. Conditions may be optional.
● Actions:
○ A way of reacting to domain events in the system.
○ We can perform any activity in the system when an event is triggered.

Recommended for you

Unlocking the Power of Salesforce Integrations with Confluent
Unlocking the Power of Salesforce Integrations with ConfluentUnlocking the Power of Salesforce Integrations with Confluent
Unlocking the Power of Salesforce Integrations with Confluent

Salesforce currently has 150,000 customers across the world who use Salesforce in some capacity. If you are one of those customers, you've likely had to work through how to integrate it with your other back office systems: ERP, Marketing Automation, BI systems, etc. Or perhaps you're a brand new Salesforce customer and are just now trying to understand what options exist for integration. It is undeniable that the rate of integrating with Salesforce is increasing, and extracting the valuable data that is in Salesforce is not always an easy feat when you have to consider how to do this best in your own unique environment. In this webinar, Big Compass and Confluent will talk about the various techniques for getting data out of Salesforce, and how Confluent and Kafka can play an integral role in not only brokering these messages at an incredibly fast and scalable rate, but to also make it very easy to exchange data with Salesforce. YOU WILL LEARN: What integration capabilities exist within Salesforce How Confluent can be used to integrate with Salesforce Techniques in Confluent for pub/sub, streaming, and building business logic using KSQL and Kafka Streams Patterns of Salesforce integration in general and specifically with Confluent Strengths and weaknesses of each pattern and scenarios where they work best WHO SHOULD ATTEND: IT leaders who are looking for the most efficient methods for integration with Salesforce Developers/System Integrators who are interested in seeing Salesforce integration techniques Anyone in the Salesforce ecosystem who is interested in integration REASONS TO ATTEND: Learn about methods of Salesforce integration and explore Confluent’s built-in capabilities if you're considering an off-the-shelf solution

confluentkafkasalesforce
Five Trends in Real Time Applications
Five Trends in Real Time ApplicationsFive Trends in Real Time Applications
Five Trends in Real Time Applications

Speakers: David Menninger, SVP and Research Director, Ventana Research + Joanna Schloss, Analytics, Data and Information Management Subject Matter Expert, Confluent Can your organization react to customer events as they occur? Can your organization detect anomalies before they cause problems? Can your organization process streaming data in real time? Real time and event-driven architectures are emerging as key components in developing streaming applications. Nearly half of organizations consider it essential to process event data within seconds of its occurrence. Yet less than one third are satisfied with their ability to do so today. In this webinar featuring Dave Menninger of Ventana Research, learn from the firm’s benchmark research about what streaming data is and why it is important. Joanna Schloss also joins to discuss how event-streaming platforms deliver real time actionability on data as it arrives into the business. Join us to hear how other organizations are managing streaming data and how you can adopt and deploy real time processing capabilities. In this webinar you will: -Get valuable market research data about how other organizations are managing streaming data -Learn how real time processing is a key component of a digital transformation strategy -Hear real world use cases of streaming data in action -Review architectural approaches for adding real time, streaming data capabilities to your applications Watch the recording: https://videos.confluent.io/watch/AoXiYayC1s23awqJBcQvPZ?

real timestreaming dataresearch
Dynatrace
DynatraceDynatrace
Dynatrace

Dynatrace is an APM solution that provides deep visibility into application performance across complex, distributed environments. It uses PurePath technology to capture timing and code-level context for all transactions end-to-end. This allows Dynatrace to identify performance issues and their root causes faster than other tools. Dynatrace can monitor Apache Tomcat servers and provide metrics on JVM performance, database queries, requests, and more. It helps diagnose common issues like inefficient database access, microservice problems, and coding issues.

monitoring toolpurnimadynatrace
● We will create a workflow as:
○ Triggering Event:
■ New appointment scheduled event.
○ Action:
■ Send a notification sms to doctor & patient with appointment time.
■ Send a reminder to patient 15 mins before appointment time.
● Let’s name this workflow as ‘notification_workflow’
Automate the sample workflow with this event-driven
system
● We can have a workflow model to save our
custom workflows to database.
● Instead of sending notification directly in
appointment’s callback, we now publish
appointment scheduled(created) event in it.
● Consider we have some method to subscribe a
workflow to any domain event. Using that we
can now register our notification_workflow to
appointment scheduled event.
● We can implement some sort of Event
processing engine which will find all the
workflows registered on a triggered event &
can execute them all.
● We can provide a GUI interface for creating &
editing workflows. This way every health
provider can create custom workflows
according to his needs.
class Worflow < ActiveRecord::Base
has_many :conditions
has_many :actions
def execute
# evaluate conditions & execute actions
...
end
end
class Appointment < ActiveRecord::Base
belongs_to :doctor
belongs_to :patient
after_create :new_appointment_created_event
end
register(notification_workflow,
:new_appointment_created)
# some method in Event processing engine.
def execute(worflow_id)
workflow = Workflow.find(workflow_id)
workflow.execute()
end
● Notifications module
○ Notifications can be a cross cutting concern in many systems, which makes it a perfect contestant
for using EDA.
○ For example: A system consisting of monitoring & reporting service
■ Monitoring service - want’s to send notification when some metric goes above threshold
value.
■ Reporting service - send different types of reports via notifications.
● Implement hooks within some service
○ For example: A popular code hosting platform ‘Github’ provides a webhook service.
■ It allows external services to be notified with a POST request, when certain events happen
within your repository.
Use cases for EDA
Workflows via Event driven architecture

Recommended for you

Transform Fearlessly to Serverless with Dynatrace 2 - DEM07 - Toronto AWS Summit
Transform Fearlessly to Serverless with Dynatrace 2 - DEM07 - Toronto AWS SummitTransform Fearlessly to Serverless with Dynatrace 2 - DEM07 - Toronto AWS Summit
Transform Fearlessly to Serverless with Dynatrace 2 - DEM07 - Toronto AWS Summit

When breaking your monolith into components, services or even functions you must understand WHERE and HOW you break your existing code base and architecture into smaller units to allow it to SCALE, PERFORM and make it EASY enough to operate! This session shows how Dynatrace redefined their architecture; which migration capabilities Dynatrace engineers built into their product; and how the lessons learned can benefit all of us to transform Fearless from Monolith to Serverless!

awsawstorsummit2018torsummit2018
Cloudstate - Towards Stateful Serverless
Cloudstate - Towards Stateful ServerlessCloudstate - Towards Stateful Serverless
Cloudstate - Towards Stateful Serverless

The document discusses stateful serverless computing and the CloudState project. It begins by outlining some technical requirements for building general-purpose applications in a serverless environment, including support for state management, distributed coordination, and predictable performance. It then introduces CloudState, an open-source project that aims to make stateful serverless applications easier to build by abstracting over complex distributed systems concerns like state management, databases, and infrastructure. CloudState provides client libraries in multiple languages and supports powerful state models and databases. It also handles operations when deployed as a managed service. The document concludes by describing CloudState's architecture, which uses Akka, gRPC, Kubernetes, and databases.

cloudstateserverlessstateful
Designing microservices
Designing microservicesDesigning microservices
Designing microservices

This document discusses designing microservices architectures. It begins by defining microservices as small, autonomous services that work together. The benefits of microservices include continuous innovation, independent deployments, and fault isolation. Challenges include complexity, testing, and service discovery. Key principles in designing microservices are modeling them around business domains, making each independently deployable, and decentralizing all components. Additional topics covered include service boundaries, communication patterns, data management, and monitoring microservices applications. The document provides examples and recommendations for implementing microservices on Azure.

● Fully Customizable
● Highly Scalable
● Easily extensible
● Efficiently handle crosscutting concerns by decoupled system.
Advantages of EDA over traditional methods
High level overview of ‘our’ implementation of EDA
Workflow
Branch 1 Branch 2
Trigger branch
● Binary tree structure
● Introduced notion of branches
● Branch can be action branch or
condition branch
● Workflow has one compulsory branch
called trigger branch
● Action branches are always present at
leaf nodes of the tree
Challenges we are facing in this system
● Activities performed in workflow actions can trigger other events implicitly
triggering other workflows subscribed to that event which can result into a
loop of workflows triggering each other leading to deadlock conditions.
How this problem can be solved efficiently ? (Think)
Open for discussions !
References
● Wikipedia
● http://www.slideshare.net/stnor/event-driven-architecture-3395407

Recommended for you

CEP and SOA: An Open Event-Driven Architecture for Risk Management
CEP and SOA: An Open Event-Driven Architecture for Risk ManagementCEP and SOA: An Open Event-Driven Architecture for Risk Management
CEP and SOA: An Open Event-Driven Architecture for Risk Management

CEP and SOA: An Open Event-Driven Architecture for Risk Management, March 14, 2007, IIT Financial Services 2007, Lisbon, Portugal, Tim Bass, CISSP, Principal Global Architect, Director Emerging Technologies Group

timbasslisbon
Introduction to Rundeck
Introduction to Rundeck Introduction to Rundeck
Introduction to Rundeck

Learn live from one of Rundeck's expert field engineers. Find out why and how so many leading enterprises run their operations with Rundeck.

rundeckdevopssre
Effective Akka v2.0 - Jamie Allen
Effective Akka v2.0 - Jamie AllenEffective Akka v2.0 - Jamie Allen
Effective Akka v2.0 - Jamie Allen

The document discusses using actors to handle asynchronous requests that require aggregating responses from multiple services. It proposes using a "cameo actor" to encapsulate the request context and define the behavior for handling partial or complete responses. The cameo actor would send the initial requests, set a timeout, and send the final response before shutting down once the work is complete. This approach avoids issues with capturing the correct sender reference and state management compared to using anonymous actors or futures directly.

Thank You
patelmilanp
patelmilan-p

More Related Content

What's hot

Google Cloud and Confluent Streaming: Generating Real Value From Real Time | ...
Google Cloud and Confluent Streaming: Generating Real Value From Real Time | ...Google Cloud and Confluent Streaming: Generating Real Value From Real Time | ...
Google Cloud and Confluent Streaming: Generating Real Value From Real Time | ...
confluent
 
Digital Transformation with Kubernetes, Containers, and Microservices
Digital Transformation with Kubernetes, Containers, and MicroservicesDigital Transformation with Kubernetes, Containers, and Microservices
Digital Transformation with Kubernetes, Containers, and Microservices
Lightbend
 
Building Event Driven Systems
Building Event Driven SystemsBuilding Event Driven Systems
Building Event Driven Systems
WSO2
 
Confluent Messaging Modernization Forum
Confluent Messaging Modernization ForumConfluent Messaging Modernization Forum
Confluent Messaging Modernization Forum
confluent
 
Microservices, Kubernetes, and Application Modernization Done Right
Microservices, Kubernetes, and Application Modernization Done RightMicroservices, Kubernetes, and Application Modernization Done Right
Microservices, Kubernetes, and Application Modernization Done Right
Lightbend
 
Dynatrace FreeTrial Test Drive
Dynatrace FreeTrial Test DriveDynatrace FreeTrial Test Drive
Dynatrace FreeTrial Test Drive
Jerry Tan
 
A practical introduction to Event Sourcing and CQRS
A practical introduction to Event Sourcing and CQRSA practical introduction to Event Sourcing and CQRS
A practical introduction to Event Sourcing and CQRS
Robert Lemke
 
Moving Legacy Apps to Cloud: How to Avoid Risk
Moving Legacy Apps to Cloud: How to Avoid RiskMoving Legacy Apps to Cloud: How to Avoid Risk
Moving Legacy Apps to Cloud: How to Avoid Risk
CloverDX
 
Event Driven Architecture
Event Driven ArchitectureEvent Driven Architecture
Event Driven Architecture
Lourens Naudé
 
Unlocking the Power of Salesforce Integrations with Confluent
Unlocking the Power of Salesforce Integrations with ConfluentUnlocking the Power of Salesforce Integrations with Confluent
Unlocking the Power of Salesforce Integrations with Confluent
AaronLieberman5
 
Five Trends in Real Time Applications
Five Trends in Real Time ApplicationsFive Trends in Real Time Applications
Five Trends in Real Time Applications
confluent
 
Dynatrace
DynatraceDynatrace
Dynatrace
Purnima Kurella
 
Transform Fearlessly to Serverless with Dynatrace 2 - DEM07 - Toronto AWS Summit
Transform Fearlessly to Serverless with Dynatrace 2 - DEM07 - Toronto AWS SummitTransform Fearlessly to Serverless with Dynatrace 2 - DEM07 - Toronto AWS Summit
Transform Fearlessly to Serverless with Dynatrace 2 - DEM07 - Toronto AWS Summit
Amazon Web Services
 
Cloudstate - Towards Stateful Serverless
Cloudstate - Towards Stateful ServerlessCloudstate - Towards Stateful Serverless
Cloudstate - Towards Stateful Serverless
Lightbend
 
Designing microservices
Designing microservicesDesigning microservices
Designing microservices
Masashi Narumoto
 
CEP and SOA: An Open Event-Driven Architecture for Risk Management
CEP and SOA: An Open Event-Driven Architecture for Risk ManagementCEP and SOA: An Open Event-Driven Architecture for Risk Management
CEP and SOA: An Open Event-Driven Architecture for Risk Management
Tim Bass
 
Introduction to Rundeck
Introduction to Rundeck Introduction to Rundeck
Introduction to Rundeck
Rundeck
 
Effective Akka v2.0 - Jamie Allen
Effective Akka v2.0 - Jamie AllenEffective Akka v2.0 - Jamie Allen
Effective Akka v2.0 - Jamie Allen
JAXLondon_Conference
 
Three Pillars, Zero Answers: Rethinking Observability
Three Pillars, Zero Answers: Rethinking ObservabilityThree Pillars, Zero Answers: Rethinking Observability
Three Pillars, Zero Answers: Rethinking Observability
DevOps.com
 
Microservices event-driven-saga
Microservices event-driven-sagaMicroservices event-driven-saga
Microservices event-driven-saga
Vijay Redkar
 

What's hot (20)

Google Cloud and Confluent Streaming: Generating Real Value From Real Time | ...
Google Cloud and Confluent Streaming: Generating Real Value From Real Time | ...Google Cloud and Confluent Streaming: Generating Real Value From Real Time | ...
Google Cloud and Confluent Streaming: Generating Real Value From Real Time | ...
 
Digital Transformation with Kubernetes, Containers, and Microservices
Digital Transformation with Kubernetes, Containers, and MicroservicesDigital Transformation with Kubernetes, Containers, and Microservices
Digital Transformation with Kubernetes, Containers, and Microservices
 
Building Event Driven Systems
Building Event Driven SystemsBuilding Event Driven Systems
Building Event Driven Systems
 
Confluent Messaging Modernization Forum
Confluent Messaging Modernization ForumConfluent Messaging Modernization Forum
Confluent Messaging Modernization Forum
 
Microservices, Kubernetes, and Application Modernization Done Right
Microservices, Kubernetes, and Application Modernization Done RightMicroservices, Kubernetes, and Application Modernization Done Right
Microservices, Kubernetes, and Application Modernization Done Right
 
Dynatrace FreeTrial Test Drive
Dynatrace FreeTrial Test DriveDynatrace FreeTrial Test Drive
Dynatrace FreeTrial Test Drive
 
A practical introduction to Event Sourcing and CQRS
A practical introduction to Event Sourcing and CQRSA practical introduction to Event Sourcing and CQRS
A practical introduction to Event Sourcing and CQRS
 
Moving Legacy Apps to Cloud: How to Avoid Risk
Moving Legacy Apps to Cloud: How to Avoid RiskMoving Legacy Apps to Cloud: How to Avoid Risk
Moving Legacy Apps to Cloud: How to Avoid Risk
 
Event Driven Architecture
Event Driven ArchitectureEvent Driven Architecture
Event Driven Architecture
 
Unlocking the Power of Salesforce Integrations with Confluent
Unlocking the Power of Salesforce Integrations with ConfluentUnlocking the Power of Salesforce Integrations with Confluent
Unlocking the Power of Salesforce Integrations with Confluent
 
Five Trends in Real Time Applications
Five Trends in Real Time ApplicationsFive Trends in Real Time Applications
Five Trends in Real Time Applications
 
Dynatrace
DynatraceDynatrace
Dynatrace
 
Transform Fearlessly to Serverless with Dynatrace 2 - DEM07 - Toronto AWS Summit
Transform Fearlessly to Serverless with Dynatrace 2 - DEM07 - Toronto AWS SummitTransform Fearlessly to Serverless with Dynatrace 2 - DEM07 - Toronto AWS Summit
Transform Fearlessly to Serverless with Dynatrace 2 - DEM07 - Toronto AWS Summit
 
Cloudstate - Towards Stateful Serverless
Cloudstate - Towards Stateful ServerlessCloudstate - Towards Stateful Serverless
Cloudstate - Towards Stateful Serverless
 
Designing microservices
Designing microservicesDesigning microservices
Designing microservices
 
CEP and SOA: An Open Event-Driven Architecture for Risk Management
CEP and SOA: An Open Event-Driven Architecture for Risk ManagementCEP and SOA: An Open Event-Driven Architecture for Risk Management
CEP and SOA: An Open Event-Driven Architecture for Risk Management
 
Introduction to Rundeck
Introduction to Rundeck Introduction to Rundeck
Introduction to Rundeck
 
Effective Akka v2.0 - Jamie Allen
Effective Akka v2.0 - Jamie AllenEffective Akka v2.0 - Jamie Allen
Effective Akka v2.0 - Jamie Allen
 
Three Pillars, Zero Answers: Rethinking Observability
Three Pillars, Zero Answers: Rethinking ObservabilityThree Pillars, Zero Answers: Rethinking Observability
Three Pillars, Zero Answers: Rethinking Observability
 
Microservices event-driven-saga
Microservices event-driven-sagaMicroservices event-driven-saga
Microservices event-driven-saga
 

Viewers also liked

Event Driven Architecture
Event Driven ArchitectureEvent Driven Architecture
Event Driven Architecture
Stefan Norberg
 
Lighning Talk: Event-Driven architecture for microservices
Lighning Talk: Event-Driven architecture for microservicesLighning Talk: Event-Driven architecture for microservices
Lighning Talk: Event-Driven architecture for microservices
Martins Sipenko
 
Event driven-automation and workflows
Event driven-automation and workflowsEvent driven-automation and workflows
Event driven-automation and workflows
Dmitri Zimine
 
Xavient overview
Xavient overviewXavient overview
Xavient overview
Neeraj Sabharwal
 
Event Driven Architecture
Event Driven ArchitectureEvent Driven Architecture
Event Driven Architecture
Fabien Doiron
 
The Impact of Messaging Standards on Event-Driven Architecture and IoT
The Impact of Messaging Standards on Event-Driven Architecture and IoTThe Impact of Messaging Standards on Event-Driven Architecture and IoT
The Impact of Messaging Standards on Event-Driven Architecture and IoT
Solace
 
Event Driven Architecture
Event Driven ArchitectureEvent Driven Architecture
Event Driven Architecture
Chris Patterson
 
Event-driven BPM the JBoss way
Event-driven BPM the JBoss wayEvent-driven BPM the JBoss way
Event-driven BPM the JBoss way
Kris Verlaenen
 

Viewers also liked (8)

Event Driven Architecture
Event Driven ArchitectureEvent Driven Architecture
Event Driven Architecture
 
Lighning Talk: Event-Driven architecture for microservices
Lighning Talk: Event-Driven architecture for microservicesLighning Talk: Event-Driven architecture for microservices
Lighning Talk: Event-Driven architecture for microservices
 
Event driven-automation and workflows
Event driven-automation and workflowsEvent driven-automation and workflows
Event driven-automation and workflows
 
Xavient overview
Xavient overviewXavient overview
Xavient overview
 
Event Driven Architecture
Event Driven ArchitectureEvent Driven Architecture
Event Driven Architecture
 
The Impact of Messaging Standards on Event-Driven Architecture and IoT
The Impact of Messaging Standards on Event-Driven Architecture and IoTThe Impact of Messaging Standards on Event-Driven Architecture and IoT
The Impact of Messaging Standards on Event-Driven Architecture and IoT
 
Event Driven Architecture
Event Driven ArchitectureEvent Driven Architecture
Event Driven Architecture
 
Event-driven BPM the JBoss way
Event-driven BPM the JBoss wayEvent-driven BPM the JBoss way
Event-driven BPM the JBoss way
 

Similar to Workflows via Event driven architecture

OOSE UNIT-1.pdf
OOSE UNIT-1.pdfOOSE UNIT-1.pdf
OOSE UNIT-1.pdf
KarumuriJayasri
 
Requirements Analysis
Requirements AnalysisRequirements Analysis
Requirements Analysis
Sibel Kuzgun AKIN
 
WF_in_retail_banking_enterprise_systems
WF_in_retail_banking_enterprise_systemsWF_in_retail_banking_enterprise_systems
WF_in_retail_banking_enterprise_systems
Oleh Zheleznyak
 
Pdf mbs workflow
Pdf mbs workflowPdf mbs workflow
Pdf mbs workflow
Tauhidul Islam
 
Asp Abstracts, Sample Copy 15+ Abstracts
Asp Abstracts, Sample Copy 15+ AbstractsAsp Abstracts, Sample Copy 15+ Abstracts
Asp Abstracts, Sample Copy 15+ Abstracts
ncct
 
Go Observability (in practice)
Go Observability (in practice)Go Observability (in practice)
Go Observability (in practice)
Eran Levy
 
Computers in management
Computers in managementComputers in management
Computers in management
Kinshook Chaturvedi
 
SAP workflow events
SAP workflow eventsSAP workflow events
SAP workflow events
Norikkon, LLC.
 
Are processes masquerading as projects hurting your business
Are processes masquerading as projects hurting your businessAre processes masquerading as projects hurting your business
Are processes masquerading as projects hurting your business
Ben Bradley
 
OSDC 2018 | From Monolith to Microservices by Paul Puschmann_
OSDC 2018 | From Monolith to Microservices by Paul Puschmann_OSDC 2018 | From Monolith to Microservices by Paul Puschmann_
OSDC 2018 | From Monolith to Microservices by Paul Puschmann_
NETWAYS
 
Apache Cassandra Lunch #102: Choreography vs Orchestration
Apache Cassandra Lunch #102: Choreography vs OrchestrationApache Cassandra Lunch #102: Choreography vs Orchestration
Apache Cassandra Lunch #102: Choreography vs Orchestration
Anant Corporation
 
Dot Net performance monitoring
 Dot Net performance monitoring Dot Net performance monitoring
Dot Net performance monitoring
Kranthi Paidi
 
Microservices and Prometheus (Microservices NYC 2016)
Microservices and Prometheus (Microservices NYC 2016)Microservices and Prometheus (Microservices NYC 2016)
Microservices and Prometheus (Microservices NYC 2016)
Brian Brazil
 
Scalability truths and serverless architectures
Scalability truths and serverless architecturesScalability truths and serverless architectures
Scalability truths and serverless architectures
Regunath B
 
Apache flink
Apache flinkApache flink
Apache flink
pranay kumar
 
2017 Melbourne YOW! CTO Summit - Monolith to micro-services with CQRS & Event...
2017 Melbourne YOW! CTO Summit - Monolith to micro-services with CQRS & Event...2017 Melbourne YOW! CTO Summit - Monolith to micro-services with CQRS & Event...
2017 Melbourne YOW! CTO Summit - Monolith to micro-services with CQRS & Event...
Douglas English
 
Using Kafka on Event-driven Microservices Architectures - Apache Kafka Meetup
Using Kafka on Event-driven Microservices Architectures - Apache Kafka MeetupUsing Kafka on Event-driven Microservices Architectures - Apache Kafka Meetup
Using Kafka on Event-driven Microservices Architectures - Apache Kafka Meetup
Stratio
 
Get More Out of Your PeopleSoft Applications Using Tools that You May Not Eve...
Get More Out of Your PeopleSoft Applications Using Tools that You May Not Eve...Get More Out of Your PeopleSoft Applications Using Tools that You May Not Eve...
Get More Out of Your PeopleSoft Applications Using Tools that You May Not Eve...
Smart ERP Solutions, Inc.
 
Project management part 2
Project management part 2Project management part 2
Project management part 2
Anjan Mahanta
 
Your data is in Prometheus, now what? (CurrencyFair Engineering Meetup, 2016)
Your data is in Prometheus, now what? (CurrencyFair Engineering Meetup, 2016)Your data is in Prometheus, now what? (CurrencyFair Engineering Meetup, 2016)
Your data is in Prometheus, now what? (CurrencyFair Engineering Meetup, 2016)
Brian Brazil
 

Similar to Workflows via Event driven architecture (20)

OOSE UNIT-1.pdf
OOSE UNIT-1.pdfOOSE UNIT-1.pdf
OOSE UNIT-1.pdf
 
Requirements Analysis
Requirements AnalysisRequirements Analysis
Requirements Analysis
 
WF_in_retail_banking_enterprise_systems
WF_in_retail_banking_enterprise_systemsWF_in_retail_banking_enterprise_systems
WF_in_retail_banking_enterprise_systems
 
Pdf mbs workflow
Pdf mbs workflowPdf mbs workflow
Pdf mbs workflow
 
Asp Abstracts, Sample Copy 15+ Abstracts
Asp Abstracts, Sample Copy 15+ AbstractsAsp Abstracts, Sample Copy 15+ Abstracts
Asp Abstracts, Sample Copy 15+ Abstracts
 
Go Observability (in practice)
Go Observability (in practice)Go Observability (in practice)
Go Observability (in practice)
 
Computers in management
Computers in managementComputers in management
Computers in management
 
SAP workflow events
SAP workflow eventsSAP workflow events
SAP workflow events
 
Are processes masquerading as projects hurting your business
Are processes masquerading as projects hurting your businessAre processes masquerading as projects hurting your business
Are processes masquerading as projects hurting your business
 
OSDC 2018 | From Monolith to Microservices by Paul Puschmann_
OSDC 2018 | From Monolith to Microservices by Paul Puschmann_OSDC 2018 | From Monolith to Microservices by Paul Puschmann_
OSDC 2018 | From Monolith to Microservices by Paul Puschmann_
 
Apache Cassandra Lunch #102: Choreography vs Orchestration
Apache Cassandra Lunch #102: Choreography vs OrchestrationApache Cassandra Lunch #102: Choreography vs Orchestration
Apache Cassandra Lunch #102: Choreography vs Orchestration
 
Dot Net performance monitoring
 Dot Net performance monitoring Dot Net performance monitoring
Dot Net performance monitoring
 
Microservices and Prometheus (Microservices NYC 2016)
Microservices and Prometheus (Microservices NYC 2016)Microservices and Prometheus (Microservices NYC 2016)
Microservices and Prometheus (Microservices NYC 2016)
 
Scalability truths and serverless architectures
Scalability truths and serverless architecturesScalability truths and serverless architectures
Scalability truths and serverless architectures
 
Apache flink
Apache flinkApache flink
Apache flink
 
2017 Melbourne YOW! CTO Summit - Monolith to micro-services with CQRS & Event...
2017 Melbourne YOW! CTO Summit - Monolith to micro-services with CQRS & Event...2017 Melbourne YOW! CTO Summit - Monolith to micro-services with CQRS & Event...
2017 Melbourne YOW! CTO Summit - Monolith to micro-services with CQRS & Event...
 
Using Kafka on Event-driven Microservices Architectures - Apache Kafka Meetup
Using Kafka on Event-driven Microservices Architectures - Apache Kafka MeetupUsing Kafka on Event-driven Microservices Architectures - Apache Kafka Meetup
Using Kafka on Event-driven Microservices Architectures - Apache Kafka Meetup
 
Get More Out of Your PeopleSoft Applications Using Tools that You May Not Eve...
Get More Out of Your PeopleSoft Applications Using Tools that You May Not Eve...Get More Out of Your PeopleSoft Applications Using Tools that You May Not Eve...
Get More Out of Your PeopleSoft Applications Using Tools that You May Not Eve...
 
Project management part 2
Project management part 2Project management part 2
Project management part 2
 
Your data is in Prometheus, now what? (CurrencyFair Engineering Meetup, 2016)
Your data is in Prometheus, now what? (CurrencyFair Engineering Meetup, 2016)Your data is in Prometheus, now what? (CurrencyFair Engineering Meetup, 2016)
Your data is in Prometheus, now what? (CurrencyFair Engineering Meetup, 2016)
 

Recently uploaded

A Comparative Analysis of Functional and Non-Functional Testing.pdf
A Comparative Analysis of Functional and Non-Functional Testing.pdfA Comparative Analysis of Functional and Non-Functional Testing.pdf
A Comparative Analysis of Functional and Non-Functional Testing.pdf
kalichargn70th171
 
dachnug51 - HCL Sametime 12 as a Software Appliance.pdf
dachnug51 - HCL Sametime 12 as a Software Appliance.pdfdachnug51 - HCL Sametime 12 as a Software Appliance.pdf
dachnug51 - HCL Sametime 12 as a Software Appliance.pdf
DNUG e.V.
 
Independence Day Hasn’t Always Been a U.S. Holiday.pdf
Independence Day Hasn’t Always Been a U.S. Holiday.pdfIndependence Day Hasn’t Always Been a U.S. Holiday.pdf
Independence Day Hasn’t Always Been a U.S. Holiday.pdf
Livetecs LLC
 
ENISA Threat Landscape 2023 documentation
ENISA Threat Landscape 2023 documentationENISA Threat Landscape 2023 documentation
ENISA Threat Landscape 2023 documentation
sofiafernandezon
 
Abortion pills in Fujairah *((+971588192166*)☎️)¥) **Effective Abortion Pills...
Abortion pills in Fujairah *((+971588192166*)☎️)¥) **Effective Abortion Pills...Abortion pills in Fujairah *((+971588192166*)☎️)¥) **Effective Abortion Pills...
Abortion pills in Fujairah *((+971588192166*)☎️)¥) **Effective Abortion Pills...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
Responsibilities of Fleet Managers and How TrackoBit Can Assist.pdf
Responsibilities of Fleet Managers and How TrackoBit Can Assist.pdfResponsibilities of Fleet Managers and How TrackoBit Can Assist.pdf
Responsibilities of Fleet Managers and How TrackoBit Can Assist.pdf
Trackobit
 
React vs Next js: Which is Better for Web Development? - Semiosis Software Pr...
React vs Next js: Which is Better for Web Development? - Semiosis Software Pr...React vs Next js: Which is Better for Web Development? - Semiosis Software Pr...
React vs Next js: Which is Better for Web Development? - Semiosis Software Pr...
Semiosis Software Private Limited
 
Addressing the Top 9 User Pain Points with Visual Design Elements.pptx
Addressing the Top 9 User Pain Points with Visual Design Elements.pptxAddressing the Top 9 User Pain Points with Visual Design Elements.pptx
Addressing the Top 9 User Pain Points with Visual Design Elements.pptx
Sparity1
 
BITCOIN HEIST RANSOMEWARE ATTACK PREDICTION
BITCOIN HEIST RANSOMEWARE ATTACK PREDICTIONBITCOIN HEIST RANSOMEWARE ATTACK PREDICTION
BITCOIN HEIST RANSOMEWARE ATTACK PREDICTION
ssuser2b426d1
 
introduction of Ansys software and basic and advance knowledge of modelling s...
introduction of Ansys software and basic and advance knowledge of modelling s...introduction of Ansys software and basic and advance knowledge of modelling s...
introduction of Ansys software and basic and advance knowledge of modelling s...
sachin chaurasia
 
React Native vs Flutter - SSTech System
React Native vs Flutter  - SSTech SystemReact Native vs Flutter  - SSTech System
React Native vs Flutter - SSTech System
SSTech System
 
MVP Mobile Application - Codearrest.pptx
MVP Mobile Application - Codearrest.pptxMVP Mobile Application - Codearrest.pptx
MVP Mobile Application - Codearrest.pptx
Mitchell Marsh
 
Google ML-Kit - Understanding on-device machine learning
Google ML-Kit - Understanding on-device machine learningGoogle ML-Kit - Understanding on-device machine learning
Google ML-Kit - Understanding on-device machine learning
VishrutGoyani1
 
Top 10 Tips To Get Google AdSense For Your Website
Top 10 Tips To Get Google AdSense For Your WebsiteTop 10 Tips To Get Google AdSense For Your Website
Top 10 Tips To Get Google AdSense For Your Website
e-Definers Technology
 
dachnug51 - All you ever wanted to know about domino licensing.pdf
dachnug51 - All you ever wanted to know about domino licensing.pdfdachnug51 - All you ever wanted to know about domino licensing.pdf
dachnug51 - All you ever wanted to know about domino licensing.pdf
DNUG e.V.
 
Splunk_Remote_Work_Insights_Overview.pptx
Splunk_Remote_Work_Insights_Overview.pptxSplunk_Remote_Work_Insights_Overview.pptx
Splunk_Remote_Work_Insights_Overview.pptx
sudsdeep
 
dachnug51 - Whats new in domino 14 .pdf
dachnug51 - Whats new in domino 14  .pdfdachnug51 - Whats new in domino 14  .pdf
dachnug51 - Whats new in domino 14 .pdf
DNUG e.V.
 
Prada Group Reports Strong Growth in First Quarter …
Prada Group Reports Strong Growth in First Quarter …Prada Group Reports Strong Growth in First Quarter …
Prada Group Reports Strong Growth in First Quarter …
908dutch
 
NBFC Software: Optimize Your Non-Banking Financial Company
NBFC Software: Optimize Your Non-Banking Financial CompanyNBFC Software: Optimize Your Non-Banking Financial Company
NBFC Software: Optimize Your Non-Banking Financial Company
NBFC Softwares
 
Wired_2.0_Create_AmsterdamJUG_09072024.pptx
Wired_2.0_Create_AmsterdamJUG_09072024.pptxWired_2.0_Create_AmsterdamJUG_09072024.pptx
Wired_2.0_Create_AmsterdamJUG_09072024.pptx
SimonedeGijt
 

Recently uploaded (20)

A Comparative Analysis of Functional and Non-Functional Testing.pdf
A Comparative Analysis of Functional and Non-Functional Testing.pdfA Comparative Analysis of Functional and Non-Functional Testing.pdf
A Comparative Analysis of Functional and Non-Functional Testing.pdf
 
dachnug51 - HCL Sametime 12 as a Software Appliance.pdf
dachnug51 - HCL Sametime 12 as a Software Appliance.pdfdachnug51 - HCL Sametime 12 as a Software Appliance.pdf
dachnug51 - HCL Sametime 12 as a Software Appliance.pdf
 
Independence Day Hasn’t Always Been a U.S. Holiday.pdf
Independence Day Hasn’t Always Been a U.S. Holiday.pdfIndependence Day Hasn’t Always Been a U.S. Holiday.pdf
Independence Day Hasn’t Always Been a U.S. Holiday.pdf
 
ENISA Threat Landscape 2023 documentation
ENISA Threat Landscape 2023 documentationENISA Threat Landscape 2023 documentation
ENISA Threat Landscape 2023 documentation
 
Abortion pills in Fujairah *((+971588192166*)☎️)¥) **Effective Abortion Pills...
Abortion pills in Fujairah *((+971588192166*)☎️)¥) **Effective Abortion Pills...Abortion pills in Fujairah *((+971588192166*)☎️)¥) **Effective Abortion Pills...
Abortion pills in Fujairah *((+971588192166*)☎️)¥) **Effective Abortion Pills...
 
Responsibilities of Fleet Managers and How TrackoBit Can Assist.pdf
Responsibilities of Fleet Managers and How TrackoBit Can Assist.pdfResponsibilities of Fleet Managers and How TrackoBit Can Assist.pdf
Responsibilities of Fleet Managers and How TrackoBit Can Assist.pdf
 
React vs Next js: Which is Better for Web Development? - Semiosis Software Pr...
React vs Next js: Which is Better for Web Development? - Semiosis Software Pr...React vs Next js: Which is Better for Web Development? - Semiosis Software Pr...
React vs Next js: Which is Better for Web Development? - Semiosis Software Pr...
 
Addressing the Top 9 User Pain Points with Visual Design Elements.pptx
Addressing the Top 9 User Pain Points with Visual Design Elements.pptxAddressing the Top 9 User Pain Points with Visual Design Elements.pptx
Addressing the Top 9 User Pain Points with Visual Design Elements.pptx
 
BITCOIN HEIST RANSOMEWARE ATTACK PREDICTION
BITCOIN HEIST RANSOMEWARE ATTACK PREDICTIONBITCOIN HEIST RANSOMEWARE ATTACK PREDICTION
BITCOIN HEIST RANSOMEWARE ATTACK PREDICTION
 
introduction of Ansys software and basic and advance knowledge of modelling s...
introduction of Ansys software and basic and advance knowledge of modelling s...introduction of Ansys software and basic and advance knowledge of modelling s...
introduction of Ansys software and basic and advance knowledge of modelling s...
 
React Native vs Flutter - SSTech System
React Native vs Flutter  - SSTech SystemReact Native vs Flutter  - SSTech System
React Native vs Flutter - SSTech System
 
MVP Mobile Application - Codearrest.pptx
MVP Mobile Application - Codearrest.pptxMVP Mobile Application - Codearrest.pptx
MVP Mobile Application - Codearrest.pptx
 
Google ML-Kit - Understanding on-device machine learning
Google ML-Kit - Understanding on-device machine learningGoogle ML-Kit - Understanding on-device machine learning
Google ML-Kit - Understanding on-device machine learning
 
Top 10 Tips To Get Google AdSense For Your Website
Top 10 Tips To Get Google AdSense For Your WebsiteTop 10 Tips To Get Google AdSense For Your Website
Top 10 Tips To Get Google AdSense For Your Website
 
dachnug51 - All you ever wanted to know about domino licensing.pdf
dachnug51 - All you ever wanted to know about domino licensing.pdfdachnug51 - All you ever wanted to know about domino licensing.pdf
dachnug51 - All you ever wanted to know about domino licensing.pdf
 
Splunk_Remote_Work_Insights_Overview.pptx
Splunk_Remote_Work_Insights_Overview.pptxSplunk_Remote_Work_Insights_Overview.pptx
Splunk_Remote_Work_Insights_Overview.pptx
 
dachnug51 - Whats new in domino 14 .pdf
dachnug51 - Whats new in domino 14  .pdfdachnug51 - Whats new in domino 14  .pdf
dachnug51 - Whats new in domino 14 .pdf
 
Prada Group Reports Strong Growth in First Quarter …
Prada Group Reports Strong Growth in First Quarter …Prada Group Reports Strong Growth in First Quarter …
Prada Group Reports Strong Growth in First Quarter …
 
NBFC Software: Optimize Your Non-Banking Financial Company
NBFC Software: Optimize Your Non-Banking Financial CompanyNBFC Software: Optimize Your Non-Banking Financial Company
NBFC Software: Optimize Your Non-Banking Financial Company
 
Wired_2.0_Create_AmsterdamJUG_09072024.pptx
Wired_2.0_Create_AmsterdamJUG_09072024.pptxWired_2.0_Create_AmsterdamJUG_09072024.pptx
Wired_2.0_Create_AmsterdamJUG_09072024.pptx
 

Workflows via Event driven architecture

  • 1. From codebase to database: Automation via workflows A way of writing customizable logic. patelmilanp patelmilan-p
  • 2. Agenda ● What is workflow as a concept ● Some examples of workflow ● Automate workflows using traditional coding techniques ● Problem with traditional techniques ● Design a technique using event based architecture to solve the problem
  • 3. ● Use Cases ● Benefits / Advantages over traditional methods ● Overview: our implementation of this technique ● Challenges we are facing with this design
  • 4. ● Dictionary meaning: The sequence of processes through which a piece of work passes from initiation to completion. ● It is a sequence of operations, declared as work of a person or group/organization. ● From a higher-level perspective, workflow may be considered a view or representation of real work. ● Workflows may be viewed as one fundamental building block to be combined with other parts of an organization's structure. ● History: One of the earliest usages of the term 'work flow' was in a railway engineering journal from 1921. Workflow as a concept
  • 5. Sample Workflow An example workflow for the purpose to this talk.
  • 6. A simplistic workflow from medical services domain Appointment Patient schedules an appointment. Arrival Patient gets to the clinic. Visit Patient talks with the doctor. Send a notification via sms to patient & doctor. Send a reminder sms to patient 15 mins before the appointment.
  • 7. Automated workflow via Traditional coding technique class Appointment < ActiveRecord::Base belongs_to :doctor belongs_to :patient after_create :send_sms_to_doctor_and_patient after_create :remind_patient_before_hand def remind_patient_before_hand(appointment) MailerWorker.perform_at( (appointment.scheduled_time - 15.minutes), appointment.patient_id) end end
  • 8. Problems with this method: ● Suppose we try to sell this to different doctors, and found out that every doctor’s workflow is little bit different. ● How can we achieve this kind of customizability in our application to cater for different requirements ? ● Suppose, we came up with settings feature where a set of settings can be enabled/disabled to handle different requirements. (but is it a feasible solution ?) ● So now we will design a solution based on event driven architecture, which is fully customizable and can handle requirement differences easily.
  • 9. Event driven architecture (EDA) ● It’s a software architecture pattern promoting the production, detection, consumption of, and reaction to events. ● Key aspects: 1. Type of interaction: Event-driven 2. Initiator: Event 3. Participants: Open-ended ● Some principles of EDA: 1. “Real-time” events as they happen at the producer 2. One-way “fire-and-forget” 3. Immediate action at the consumers 4. Informational (“someone logged in”), not commands (“audit this”)
  • 10. EDA (generic block diagram) Business Processes Services State Machines Monitors / Probes Business Processes Services State Machines Monitors / Probes Event Publishers Event Subscribers Event processing engine Event Handler Event Emitter Event Channels Event Flow
  • 11. Design a system using EDA to solve our problem
  • 12. System comprised of following entities System’s primary focus should be on the domain & domain logic. ● Domain events: ○ A Domain Event is something that happened that the domain expert cares about. ○ By exposing relevant Domain Events on a shared event bus we can isolate cross cutting functions to separate system. ● Conditions: ○ Often domain logic accompanies with some conditional scenarios. ○ Through this entity, we decide whether to execute a given action after evaluating defined conditions. Conditions may be optional. ● Actions: ○ A way of reacting to domain events in the system. ○ We can perform any activity in the system when an event is triggered.
  • 13. ● We will create a workflow as: ○ Triggering Event: ■ New appointment scheduled event. ○ Action: ■ Send a notification sms to doctor & patient with appointment time. ■ Send a reminder to patient 15 mins before appointment time. ● Let’s name this workflow as ‘notification_workflow’ Automate the sample workflow with this event-driven system
  • 14. ● We can have a workflow model to save our custom workflows to database. ● Instead of sending notification directly in appointment’s callback, we now publish appointment scheduled(created) event in it. ● Consider we have some method to subscribe a workflow to any domain event. Using that we can now register our notification_workflow to appointment scheduled event. ● We can implement some sort of Event processing engine which will find all the workflows registered on a triggered event & can execute them all. ● We can provide a GUI interface for creating & editing workflows. This way every health provider can create custom workflows according to his needs. class Worflow < ActiveRecord::Base has_many :conditions has_many :actions def execute # evaluate conditions & execute actions ... end end class Appointment < ActiveRecord::Base belongs_to :doctor belongs_to :patient after_create :new_appointment_created_event end register(notification_workflow, :new_appointment_created) # some method in Event processing engine. def execute(worflow_id) workflow = Workflow.find(workflow_id) workflow.execute() end
  • 15. ● Notifications module ○ Notifications can be a cross cutting concern in many systems, which makes it a perfect contestant for using EDA. ○ For example: A system consisting of monitoring & reporting service ■ Monitoring service - want’s to send notification when some metric goes above threshold value. ■ Reporting service - send different types of reports via notifications. ● Implement hooks within some service ○ For example: A popular code hosting platform ‘Github’ provides a webhook service. ■ It allows external services to be notified with a POST request, when certain events happen within your repository. Use cases for EDA
  • 17. ● Fully Customizable ● Highly Scalable ● Easily extensible ● Efficiently handle crosscutting concerns by decoupled system. Advantages of EDA over traditional methods
  • 18. High level overview of ‘our’ implementation of EDA Workflow Branch 1 Branch 2 Trigger branch ● Binary tree structure ● Introduced notion of branches ● Branch can be action branch or condition branch ● Workflow has one compulsory branch called trigger branch ● Action branches are always present at leaf nodes of the tree
  • 19. Challenges we are facing in this system ● Activities performed in workflow actions can trigger other events implicitly triggering other workflows subscribed to that event which can result into a loop of workflows triggering each other leading to deadlock conditions. How this problem can be solved efficiently ? (Think) Open for discussions !