SlideShare a Scribd company logo
SOA, EDA, BPM, and CEP are all Complementary:
Practical Examples in Open Source Software
Travis Carlson
MuleSoft, Inc., San Francisco, CA, U.S.A.
travis.carlson@mulesoft.com
Abstract. As David Luckham writes in his article “SOA, EDA, BPM and CEP
are all Complementary”, there is a great potential for synergy when these
technologies work together to create enterprise middleware solutions. In this
paper we shall see examples of combining these approaches using open source
software as well as a real-world customer use case.
Keywords: SOA, EDA, BPM, Business Process Management, Event-driven
BPM, CEP, Complex Event Processing, Business Rules, ESB
1 Introduction
As David Luckham writes in his article “SOA, EDA, BPM and CEP are all
Complementary” [1], there is a great potential for synergy when these technologies
work together to create enterprise middleware solutions. In this paper we shall see
examples of combining these approaches using open source software as well as a real-
world customer use case.
Open Source Software
Open source is a development method for software that harnesses the power of
distributed peer review and transparency of process. The promise of open source is
better quality, higher reliability, more flexibility, lower cost, and an end to predatory
vendor lock-in. [2]
Mule ESB 1
is a lightweight integration platform and service container, providing
features for web services, message routing, mediation, transformation and transaction
management. It is distributed under the CPAL license.
jBPM 2
is a flexible business process management suite which is distributed under
the LGPL license.
Drools 3
is a platform for business rules, workflow and event processing/temporal
reasoning, distributed under the ASL license.
All of these licenses are of the “business-friendly” type 4
, which makes them viable
from a legal standpoint for enterprise middleware.
1 http://www.mulesoft.org
2 http://www.jboss.org/jbpm
3 http://www.jboss.org/drools
4 http://www.supportforge.biz/content/view/16/33/
2 SOA/EDA and Business Process Management (BPM)
On its own, an Enterprise Service Bus is an ideal platform for service-oriented event-
driven architectures. It does a good job at interfacing between heterogeneous
technologies as well as routing and transforming messages. However, when a
considerable amount of business logic is involved, the amount of custom code
becomes difficult to maintain and the logic governing interaction between services is
not easily visible. This is when a Business Process Management (BPM) engine
becomes a good complement.
Example
Following is a simple example of how an event-driven process application can be
implemented using Mule ESB with jBPM. The example is an application which
receives a customer request for a loan, queries the customer's credit profile from an
external service, selects a bank based on the result of this query, then queries the bank
for their interest rate and returns this quote to the customer. The credit agency request
is via JMS, while the bank request is via SOAP. The orchestration of services and
requests is handled elegantly by the BPM engine.
Mule ESB Configuration Snippet
<cxf:endpoint name="BigBank" address="http://bank1.com/loanquote"
clientClass="org.mule.example.loanbroker.LoanQuote"
operation="GetQuote" wsdlPort="LoanQuoteSoap"
wsdlLocation="classpath:loanquote.wsdl" />
<service name="ProcessEngine">
<inbound>
<jms:inbound-endpoint queue="customer.requests" />
<jms:inbound-endpoint queue="credit.profiles" />
</inbound>
<bpm:component>
<bpm:process name="LoanBroker"
resource="loan-broker-process.jpdl.xml" />
</bpm:component>
</service>
jBPM Process Definition Snippet
<!-- Request received from customer -->
<mule-receive name="incomingCustomerRequest"
endpoint="CustomerRequests" var="customerRequest">
<transition to="sendToCreditAgency" />
</mule-receive>
<!-- Send customer info. to credit agency -->
<mule-send name="sendToCreditAgency"
expr="#{customerRequest.customer}" endpoint="CreditAgency"
synchronous="false">
<transition to="waitForCreditAgency" />
</mule-send>
<!-- Wait for the customer's credit profile to arrive. -->
<mule-receive name="waitForCreditAgency"
endpoint="CreditProfiles" var="creditProfile">
<transition to="prepareLoanQuoteRequest" />
</mule-receive>
<!-- Send the request to one of three banks, depending on the loan
amount and customer credit info. -->
<decision name="sendToBanks">
<transition to="sendToBigBank">
<condition expr="#{customerRequest.loanAmount >= 20000}" />
<condition expr="#{creditProfile.creditHistory >= 24}" />
<condition expr="#{creditProfile.creditScore >= 5}" />
</transition>
<transition to="sendToMediumBank">
<condition expr="#{customerRequest.loanAmount >= 10000}" />
<condition expr="#{creditProfile.creditHistory >= 12}" />
<condition expr="#{creditProfile.creditScore >= 3}" />
</transition>
<transition to="sendToSmallBank">
<condition expr="#{creditProfile.creditHistory >= 6}" />
<condition expr="#{creditProfile.creditScore >= 1}" />
</transition>
<!-- If the credit info. doesn't meet minimum requirements based
on the loan amount, the loan is just denied. -->
<transition to="loanDenied" />
</decision>
<mule-send name="sendToBigBank" expr="#{loanRequest}"
endpoint="BigBank" var="loanQuote"
type="org.mule.example.loanbroker.messages.LoanQuote">
<transition to="sendCustomerResponse" />
</mule-send>
3 SOA/EDA and Business Rules
Another way to complement an event-driven service-oriented application is by adding
Business Rules. This might be instead of BPM or in addition to it, as each one is
better suited for certain types of business logic.
Example
Following is a simple example of how business rules could be used to implement an
SLA function for an event-driven SOA application using Mule with Drools. The
example is an application which receives a stream of on-line support tickets via a JMS
topic, processes them (via a human being), and publishes them to a “completed”
topic. A rules engine snoops on the incoming and completed ticket streams and
escalates a ticket's status if its defined SLA is not being met. A ticket escalation
causes a row to be inserted into a reporting database.
Mule ESB Configuration Snippet
<service name="supportQueue">
<inbound>
<jms:inbound-endpoint topic="incoming.tickets" />
</inbound>
<component class="org.mule.example.sla.SupportAgent" />
<outbound>
<pass-through-router>
<jms:outbound-endpoint topic="completed.tickets" />
</pass-through-router>
</outbound>
</service>
<service name="rulesEngine">
<inbound>
<jms:inbound-endpoint topic="incoming.tickets" />
<jms:inbound-endpoint topic="completed.tickets" />
</inbound>
<rules:component>
<rules:rules resource="SupportSLA.drl" />
</rules:component>
</service>
<service name="reporting">
<inbound>
<jms:inbound-endpoint topic="escalated.tickets" />
</inbound>
<outbound>
<pass-through-router>
<jdbc:outbound-endpoint queryKey="insertEscalatedTicket" />
</pass-through-router>
</outbound>
</service>
Drools Configuration Snippet
rule "Silver Priority"
duration 5000
when
customer : Customer( subscription == "Silver" )
ticket : Ticket( customerId == customer.id, status == "New" )
then
modify( ticket ) { setStatus( "Escalated" ) };
end
rule "Gold Priority"
duration 3000
when
customer : Customer( subscription == "Gold" )
ticket : Ticket( customerId == customer.id, status == "New" )
then
modify( ticket ) { setStatus( "Escalated" ) };
end
rule "Escalate Ticket"
when
ticket : Ticket( status == "Escalated" )
then
mule.generateMessage("jms://escalated.tickets", ticket);
end
4 SOA/EDA and Complex Event Processing (CEP)
Complex Event Processing can also complement an event-driven service-oriented
application if the business logic calls for temporal reasoning within a stream or cloud
of events. Once again, this could be instead of or in addition to BPM and Business
Rules, as each one is better suited for certain types of business logic.
Example
Following is a simple example of how CEP could work within an event-driven
service-oriented application using Mule with Drools. The example is an application
which polls a public web service for real-time stock tick updates via SOAP requests
and posts the updates to a JMS queue. The queue is subscribed to by a CEP engine
which detects large drops in stock value and generates alert messages (meta-events)
which get logged and routed to human analysts via e-mail.
Mule ESB Configuration Snippet
<service name="stockTickFeed">
<inbound>
<cxf:inbound-endpoint
address="http://www.webservicex.net/stockquote.asmx"
clientClass="net.webservicex.StockQuote"
operation="GetQuote" wsdlPort="StockQuoteSoap"
wsdlLocation="stockquote.wsdl" />
</inbound>
<outbound>
<pass-through-router>
<jms:outbound-endpoint queue="stock.tick" />
</pass-through-router>
</outbound>
</service>
<service name="rulesEngine">
<inbound>
<jms:inbound-endpoint queue="stock.tick" />
</inbound>
<rules:component>
<rules:rules resource="StockAnalysis.drl"
entryPoint="StockTick Stream" agendaGroup="evaluation" />
</rules:component>
</service>
<service name="rulesAlerts">
<inbound>
<jms:inbound-endpoint queue="stock.alerts" />
</inbound>
<log-component />
<outbound>
<multicasting-router>
<smtp:outbound-endpoint address="analyst1@acme.com" />
<smtp:outbound-endpoint address="analyst2@acme.com" />
</multicasting-router>
</outbound>
</service>
Drools Configuration Snippet
rule "Update stock price"
when
$cp : Company( $sb : symbol )
$st : StockTick( symbol == $sb, $pr : price )
from entry-point "StockTick Stream"
then
modify( $cp ) { currentPrice = $pr }
modify( $st ) { delta = $cp.delta }
end
rule "Sudden drop"
when
$st : StockTick( $sb : symbol, $ts : timestamp,
$pr : price, $dt : delta < -0.05 )
from entry-point "StockTick Stream"
not( StockTick( symbol == $sb, timestamp > $ts )
from entry-point "StockTick Stream" )
then
msg = "***** Drop >5%: "+$sb+" delta: "+StockTick.percent($dt)
+" price: $"+$pr + " *****";
mule.generateMessage("jms://stock.alerts", msg);
end
5 Customer Use Case
As real-world validation of the concepts in this paper, a large event-driven business
process application has been recently implemented using Mule ESB with jBPM for a
high-profile customer. A description of the architecture is as follows.
Web form submissions create incoming events on a JMS queue. These events are
subscribed to by Mule and routed to one of several jBPM processes which model the
business logic. The event-driven processes make synchronous and/or asynchronous
calls to Siebel via SOAP web services. There are 5 complex processes plus 7 basic
processes that ultimately call one of the complex processes. Processes invoke each
other by sending events. Exceptions in message processing cause erroneous messages
to be redirected to error queues. Historical process information is kept in an Oracle
database to act as a data warehouse.
Fig. 1. Graphical process definition from customer use case
References
1. Complex Event Processing, http://complexevents.com/2007/04/30/soa-eda-bpm-and-cep-
are-all-complementary, http://complexevents.com/2007/07/08/soa-eda-bpm-and-cep-are-all-
complementary-part-2
2. Open Source Initiative, http://www.opensource.org

More Related Content

Similar to SOA, EDA, BPM, and CEP are all Complementary: Practical Examples in Open Source Software

Micro service architecture
Micro service architectureMicro service architecture
Micro service architecture
uEngine Solutions
 
Venkataraman Raghunathan
Venkataraman RaghunathanVenkataraman Raghunathan
Venkataraman Raghunathan
Venkataraman Raghunathan
 
MaheshCV_Yepme
MaheshCV_YepmeMaheshCV_Yepme
MaheshCV_Yepme
Mahesh Mahawar
 
Transforming Financial Services with Event Streaming Data
Transforming Financial Services with Event Streaming DataTransforming Financial Services with Event Streaming Data
Transforming Financial Services with Event Streaming Data
confluent
 
M.E Computer Science Server Computing Projects
M.E Computer Science Server Computing ProjectsM.E Computer Science Server Computing Projects
M.E Computer Science Server Computing Projects
Vijay Karan
 
M phil-computer-science-server-computing-projects
M phil-computer-science-server-computing-projectsM phil-computer-science-server-computing-projects
M phil-computer-science-server-computing-projects
Vijay Karan
 
M.Phil Computer Science Server Computing Projects
M.Phil Computer Science Server Computing ProjectsM.Phil Computer Science Server Computing Projects
M.Phil Computer Science Server Computing Projects
Vijay Karan
 
Knowledge management and information system
Knowledge management and information systemKnowledge management and information system
Knowledge management and information system
nihad341
 
MeasureWorks - Why your customers don't like to wait!
MeasureWorks - Why your customers don't like to wait!MeasureWorks - Why your customers don't like to wait!
MeasureWorks - Why your customers don't like to wait!
MeasureWorks
 
Cloud computing pioneers - remarkable examples 2010-11-05
Cloud computing pioneers - remarkable examples 2010-11-05Cloud computing pioneers - remarkable examples 2010-11-05
Cloud computing pioneers - remarkable examples 2010-11-05
Abe Pachikara
 
Building Serverless EDA w_ AWS Lambda (1).pptx
Building Serverless EDA w_ AWS Lambda (1).pptxBuilding Serverless EDA w_ AWS Lambda (1).pptx
Building Serverless EDA w_ AWS Lambda (1).pptx
Ahmed791434
 
WebAssembler.NET® Business Process Management System
WebAssembler.NET® Business Process Management SystemWebAssembler.NET® Business Process Management System
WebAssembler.NET® Business Process Management System
AlfaSoft_Moldova
 
Capacity Planning and Headroom Analysis for Taming Database Replication Latency
Capacity Planning and Headroom Analysis for Taming Database Replication LatencyCapacity Planning and Headroom Analysis for Taming Database Replication Latency
Capacity Planning and Headroom Analysis for Taming Database Replication Latency
Zhenyun Zhuang
 
annukurni_resume
annukurni_resumeannukurni_resume
annukurni_resume
Annapurna Kurni
 
MongoDB in a Mainframe World
MongoDB in a Mainframe WorldMongoDB in a Mainframe World
MongoDB in a Mainframe World
MongoDB
 
End to End Vertical OBA's
End to End Vertical OBA'sEnd to End Vertical OBA's
End to End Vertical OBA's
Mike Walker
 
SOA in Financial Services
SOA in Financial ServicesSOA in Financial Services
SOA in Financial Services
Mike Walker
 
Office Developers Conference - Financial Services OBAs
Office Developers Conference - Financial Services OBAsOffice Developers Conference - Financial Services OBAs
Office Developers Conference - Financial Services OBAs
Mike Walker
 
Microsoft Lending Reference Architecture
Microsoft Lending Reference ArchitectureMicrosoft Lending Reference Architecture
Microsoft Lending Reference Architecture
Mike Walker
 
CV_PurnimaBalla_WCS-Consultant_7Yrs
CV_PurnimaBalla_WCS-Consultant_7YrsCV_PurnimaBalla_WCS-Consultant_7Yrs
CV_PurnimaBalla_WCS-Consultant_7Yrs
Purnima Balla
 

Similar to SOA, EDA, BPM, and CEP are all Complementary: Practical Examples in Open Source Software (20)

Micro service architecture
Micro service architectureMicro service architecture
Micro service architecture
 
Venkataraman Raghunathan
Venkataraman RaghunathanVenkataraman Raghunathan
Venkataraman Raghunathan
 
MaheshCV_Yepme
MaheshCV_YepmeMaheshCV_Yepme
MaheshCV_Yepme
 
Transforming Financial Services with Event Streaming Data
Transforming Financial Services with Event Streaming DataTransforming Financial Services with Event Streaming Data
Transforming Financial Services with Event Streaming Data
 
M.E Computer Science Server Computing Projects
M.E Computer Science Server Computing ProjectsM.E Computer Science Server Computing Projects
M.E Computer Science Server Computing Projects
 
M phil-computer-science-server-computing-projects
M phil-computer-science-server-computing-projectsM phil-computer-science-server-computing-projects
M phil-computer-science-server-computing-projects
 
M.Phil Computer Science Server Computing Projects
M.Phil Computer Science Server Computing ProjectsM.Phil Computer Science Server Computing Projects
M.Phil Computer Science Server Computing Projects
 
Knowledge management and information system
Knowledge management and information systemKnowledge management and information system
Knowledge management and information system
 
MeasureWorks - Why your customers don't like to wait!
MeasureWorks - Why your customers don't like to wait!MeasureWorks - Why your customers don't like to wait!
MeasureWorks - Why your customers don't like to wait!
 
Cloud computing pioneers - remarkable examples 2010-11-05
Cloud computing pioneers - remarkable examples 2010-11-05Cloud computing pioneers - remarkable examples 2010-11-05
Cloud computing pioneers - remarkable examples 2010-11-05
 
Building Serverless EDA w_ AWS Lambda (1).pptx
Building Serverless EDA w_ AWS Lambda (1).pptxBuilding Serverless EDA w_ AWS Lambda (1).pptx
Building Serverless EDA w_ AWS Lambda (1).pptx
 
WebAssembler.NET® Business Process Management System
WebAssembler.NET® Business Process Management SystemWebAssembler.NET® Business Process Management System
WebAssembler.NET® Business Process Management System
 
Capacity Planning and Headroom Analysis for Taming Database Replication Latency
Capacity Planning and Headroom Analysis for Taming Database Replication LatencyCapacity Planning and Headroom Analysis for Taming Database Replication Latency
Capacity Planning and Headroom Analysis for Taming Database Replication Latency
 
annukurni_resume
annukurni_resumeannukurni_resume
annukurni_resume
 
MongoDB in a Mainframe World
MongoDB in a Mainframe WorldMongoDB in a Mainframe World
MongoDB in a Mainframe World
 
End to End Vertical OBA's
End to End Vertical OBA'sEnd to End Vertical OBA's
End to End Vertical OBA's
 
SOA in Financial Services
SOA in Financial ServicesSOA in Financial Services
SOA in Financial Services
 
Office Developers Conference - Financial Services OBAs
Office Developers Conference - Financial Services OBAsOffice Developers Conference - Financial Services OBAs
Office Developers Conference - Financial Services OBAs
 
Microsoft Lending Reference Architecture
Microsoft Lending Reference ArchitectureMicrosoft Lending Reference Architecture
Microsoft Lending Reference Architecture
 
CV_PurnimaBalla_WCS-Consultant_7Yrs
CV_PurnimaBalla_WCS-Consultant_7YrsCV_PurnimaBalla_WCS-Consultant_7Yrs
CV_PurnimaBalla_WCS-Consultant_7Yrs
 

Recently uploaded

655221243123332131-Complete-MERN-stack.pdf
655221243123332131-Complete-MERN-stack.pdf655221243123332131-Complete-MERN-stack.pdf
655221243123332131-Complete-MERN-stack.pdf
KhnhTrn343305
 
How To Fill Timesheet in TaskSprint: Quick Guide 2024
How To Fill Timesheet in TaskSprint: Quick Guide 2024How To Fill Timesheet in TaskSprint: Quick Guide 2024
How To Fill Timesheet in TaskSprint: Quick Guide 2024
TaskSprint | Employee Efficiency Software
 
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
 
NYGGS 360: A Complete ERP for Construction Innovation
NYGGS 360: A Complete ERP for Construction InnovationNYGGS 360: A Complete ERP for Construction Innovation
NYGGS 360: A Complete ERP for Construction Innovation
NYGGS Construction ERP Software
 
Comprehensive Vulnerability Assessments Process _ Aardwolf Security.docx
Comprehensive Vulnerability Assessments Process _ Aardwolf Security.docxComprehensive Vulnerability Assessments Process _ Aardwolf Security.docx
Comprehensive Vulnerability Assessments Process _ Aardwolf Security.docx
Aardwolf Security
 
Top Chinese Government-backed APT Groups
Top Chinese Government-backed APT GroupsTop Chinese Government-backed APT Groups
Top Chinese Government-backed APT Groups
SOCRadar
 
ThaiPy meetup - Indexes and Django
ThaiPy meetup - Indexes and DjangoThaiPy meetup - Indexes and Django
ThaiPy meetup - Indexes and Django
akshesh doshi
 
Maximizing Efficiency and Profitability: Optimizing Data Systems, Enhancing C...
Maximizing Efficiency and Profitability: Optimizing Data Systems, Enhancing C...Maximizing Efficiency and Profitability: Optimizing Data Systems, Enhancing C...
Maximizing Efficiency and Profitability: Optimizing Data Systems, Enhancing C...
OnePlan Solutions
 
ERP Software Solutions Provider in Coimbatore
ERP Software Solutions Provider in CoimbatoreERP Software Solutions Provider in Coimbatore
ERP Software Solutions Provider in Coimbatore
Nextskill Technologies
 
Folding Cheat Sheet #7 - seventh in a series
Folding Cheat Sheet #7 - seventh in a seriesFolding Cheat Sheet #7 - seventh in a series
Folding Cheat Sheet #7 - seventh in a series
Philip Schwarz
 
11 Top Cross Browser Testing Tools to Know About.pdf
11 Top Cross Browser Testing Tools to Know About.pdf11 Top Cross Browser Testing Tools to Know About.pdf
11 Top Cross Browser Testing Tools to Know About.pdf
kalichargn70th171
 
AWS DevOps-Tutorial CHANAKYA SRIYAN DUKKA.
AWS DevOps-Tutorial CHANAKYA SRIYAN DUKKA.AWS DevOps-Tutorial CHANAKYA SRIYAN DUKKA.
AWS DevOps-Tutorial CHANAKYA SRIYAN DUKKA.
Srinivas Dukka
 
Safe Work Permit Management Software for Hot Work Permits
Safe Work Permit Management Software for Hot Work PermitsSafe Work Permit Management Software for Hot Work Permits
Safe Work Permit Management Software for Hot Work Permits
sheqnetworkmarketing
 
Odoo E-commerce website development guides
Odoo E-commerce website development guidesOdoo E-commerce website development guides
Odoo E-commerce website development guides
jhkdigitalmarketing
 
Celebrity Girls Call Mumbai 🛵🚡9910780858 💃 Choose Best And Top Girl Service A...
Celebrity Girls Call Mumbai 🛵🚡9910780858 💃 Choose Best And Top Girl Service A...Celebrity Girls Call Mumbai 🛵🚡9910780858 💃 Choose Best And Top Girl Service A...
Celebrity Girls Call Mumbai 🛵🚡9910780858 💃 Choose Best And Top Girl Service A...
norina2645
 
當測試開始左移
當測試開始左移當測試開始左移
當測試開始左移
Jersey (CHE-PING) Su
 
Independent Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class H...
Independent Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class H...Independent Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class H...
Independent Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class H...
aslasdfmkhan4750
 
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
 
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
ThousandEyes
 
IoT In Manufacturing_ Use Cases, Benefits, and Challenges.pdf
IoT In Manufacturing_ Use Cases, Benefits, and Challenges.pdfIoT In Manufacturing_ Use Cases, Benefits, and Challenges.pdf
IoT In Manufacturing_ Use Cases, Benefits, and Challenges.pdf
mohitd6
 

Recently uploaded (20)

655221243123332131-Complete-MERN-stack.pdf
655221243123332131-Complete-MERN-stack.pdf655221243123332131-Complete-MERN-stack.pdf
655221243123332131-Complete-MERN-stack.pdf
 
How To Fill Timesheet in TaskSprint: Quick Guide 2024
How To Fill Timesheet in TaskSprint: Quick Guide 2024How To Fill Timesheet in TaskSprint: Quick Guide 2024
How To Fill Timesheet in TaskSprint: Quick Guide 2024
 
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
 
NYGGS 360: A Complete ERP for Construction Innovation
NYGGS 360: A Complete ERP for Construction InnovationNYGGS 360: A Complete ERP for Construction Innovation
NYGGS 360: A Complete ERP for Construction Innovation
 
Comprehensive Vulnerability Assessments Process _ Aardwolf Security.docx
Comprehensive Vulnerability Assessments Process _ Aardwolf Security.docxComprehensive Vulnerability Assessments Process _ Aardwolf Security.docx
Comprehensive Vulnerability Assessments Process _ Aardwolf Security.docx
 
Top Chinese Government-backed APT Groups
Top Chinese Government-backed APT GroupsTop Chinese Government-backed APT Groups
Top Chinese Government-backed APT Groups
 
ThaiPy meetup - Indexes and Django
ThaiPy meetup - Indexes and DjangoThaiPy meetup - Indexes and Django
ThaiPy meetup - Indexes and Django
 
Maximizing Efficiency and Profitability: Optimizing Data Systems, Enhancing C...
Maximizing Efficiency and Profitability: Optimizing Data Systems, Enhancing C...Maximizing Efficiency and Profitability: Optimizing Data Systems, Enhancing C...
Maximizing Efficiency and Profitability: Optimizing Data Systems, Enhancing C...
 
ERP Software Solutions Provider in Coimbatore
ERP Software Solutions Provider in CoimbatoreERP Software Solutions Provider in Coimbatore
ERP Software Solutions Provider in Coimbatore
 
Folding Cheat Sheet #7 - seventh in a series
Folding Cheat Sheet #7 - seventh in a seriesFolding Cheat Sheet #7 - seventh in a series
Folding Cheat Sheet #7 - seventh in a series
 
11 Top Cross Browser Testing Tools to Know About.pdf
11 Top Cross Browser Testing Tools to Know About.pdf11 Top Cross Browser Testing Tools to Know About.pdf
11 Top Cross Browser Testing Tools to Know About.pdf
 
AWS DevOps-Tutorial CHANAKYA SRIYAN DUKKA.
AWS DevOps-Tutorial CHANAKYA SRIYAN DUKKA.AWS DevOps-Tutorial CHANAKYA SRIYAN DUKKA.
AWS DevOps-Tutorial CHANAKYA SRIYAN DUKKA.
 
Safe Work Permit Management Software for Hot Work Permits
Safe Work Permit Management Software for Hot Work PermitsSafe Work Permit Management Software for Hot Work Permits
Safe Work Permit Management Software for Hot Work Permits
 
Odoo E-commerce website development guides
Odoo E-commerce website development guidesOdoo E-commerce website development guides
Odoo E-commerce website development guides
 
Celebrity Girls Call Mumbai 🛵🚡9910780858 💃 Choose Best And Top Girl Service A...
Celebrity Girls Call Mumbai 🛵🚡9910780858 💃 Choose Best And Top Girl Service A...Celebrity Girls Call Mumbai 🛵🚡9910780858 💃 Choose Best And Top Girl Service A...
Celebrity Girls Call Mumbai 🛵🚡9910780858 💃 Choose Best And Top Girl Service A...
 
當測試開始左移
當測試開始左移當測試開始左移
當測試開始左移
 
Independent Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class H...
Independent Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class H...Independent Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class H...
Independent Girls Call ServiCe Hyderabad 0000000000 Tanisha Best High Class H...
 
React Native vs Flutter - SSTech System
React Native vs Flutter  - SSTech SystemReact Native vs Flutter  - SSTech System
React Native vs Flutter - SSTech System
 
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
Cisco Live Announcements: New ThousandEyes Release Highlights - July 2024
 
IoT In Manufacturing_ Use Cases, Benefits, and Challenges.pdf
IoT In Manufacturing_ Use Cases, Benefits, and Challenges.pdfIoT In Manufacturing_ Use Cases, Benefits, and Challenges.pdf
IoT In Manufacturing_ Use Cases, Benefits, and Challenges.pdf
 

SOA, EDA, BPM, and CEP are all Complementary: Practical Examples in Open Source Software

  • 1. SOA, EDA, BPM, and CEP are all Complementary: Practical Examples in Open Source Software Travis Carlson MuleSoft, Inc., San Francisco, CA, U.S.A. travis.carlson@mulesoft.com Abstract. As David Luckham writes in his article “SOA, EDA, BPM and CEP are all Complementary”, there is a great potential for synergy when these technologies work together to create enterprise middleware solutions. In this paper we shall see examples of combining these approaches using open source software as well as a real-world customer use case. Keywords: SOA, EDA, BPM, Business Process Management, Event-driven BPM, CEP, Complex Event Processing, Business Rules, ESB 1 Introduction As David Luckham writes in his article “SOA, EDA, BPM and CEP are all Complementary” [1], there is a great potential for synergy when these technologies work together to create enterprise middleware solutions. In this paper we shall see examples of combining these approaches using open source software as well as a real- world customer use case. Open Source Software Open source is a development method for software that harnesses the power of distributed peer review and transparency of process. The promise of open source is better quality, higher reliability, more flexibility, lower cost, and an end to predatory vendor lock-in. [2] Mule ESB 1 is a lightweight integration platform and service container, providing features for web services, message routing, mediation, transformation and transaction management. It is distributed under the CPAL license. jBPM 2 is a flexible business process management suite which is distributed under the LGPL license. Drools 3 is a platform for business rules, workflow and event processing/temporal reasoning, distributed under the ASL license. All of these licenses are of the “business-friendly” type 4 , which makes them viable from a legal standpoint for enterprise middleware. 1 http://www.mulesoft.org 2 http://www.jboss.org/jbpm 3 http://www.jboss.org/drools 4 http://www.supportforge.biz/content/view/16/33/
  • 2. 2 SOA/EDA and Business Process Management (BPM) On its own, an Enterprise Service Bus is an ideal platform for service-oriented event- driven architectures. It does a good job at interfacing between heterogeneous technologies as well as routing and transforming messages. However, when a considerable amount of business logic is involved, the amount of custom code becomes difficult to maintain and the logic governing interaction between services is not easily visible. This is when a Business Process Management (BPM) engine becomes a good complement. Example Following is a simple example of how an event-driven process application can be implemented using Mule ESB with jBPM. The example is an application which receives a customer request for a loan, queries the customer's credit profile from an external service, selects a bank based on the result of this query, then queries the bank for their interest rate and returns this quote to the customer. The credit agency request is via JMS, while the bank request is via SOAP. The orchestration of services and requests is handled elegantly by the BPM engine. Mule ESB Configuration Snippet <cxf:endpoint name="BigBank" address="http://bank1.com/loanquote" clientClass="org.mule.example.loanbroker.LoanQuote" operation="GetQuote" wsdlPort="LoanQuoteSoap" wsdlLocation="classpath:loanquote.wsdl" /> <service name="ProcessEngine"> <inbound> <jms:inbound-endpoint queue="customer.requests" /> <jms:inbound-endpoint queue="credit.profiles" /> </inbound> <bpm:component> <bpm:process name="LoanBroker" resource="loan-broker-process.jpdl.xml" /> </bpm:component> </service> jBPM Process Definition Snippet <!-- Request received from customer --> <mule-receive name="incomingCustomerRequest" endpoint="CustomerRequests" var="customerRequest"> <transition to="sendToCreditAgency" /> </mule-receive> <!-- Send customer info. to credit agency --> <mule-send name="sendToCreditAgency" expr="#{customerRequest.customer}" endpoint="CreditAgency" synchronous="false"> <transition to="waitForCreditAgency" /> </mule-send> <!-- Wait for the customer's credit profile to arrive. --> <mule-receive name="waitForCreditAgency" endpoint="CreditProfiles" var="creditProfile"> <transition to="prepareLoanQuoteRequest" /> </mule-receive>
  • 3. <!-- Send the request to one of three banks, depending on the loan amount and customer credit info. --> <decision name="sendToBanks"> <transition to="sendToBigBank"> <condition expr="#{customerRequest.loanAmount >= 20000}" /> <condition expr="#{creditProfile.creditHistory >= 24}" /> <condition expr="#{creditProfile.creditScore >= 5}" /> </transition> <transition to="sendToMediumBank"> <condition expr="#{customerRequest.loanAmount >= 10000}" /> <condition expr="#{creditProfile.creditHistory >= 12}" /> <condition expr="#{creditProfile.creditScore >= 3}" /> </transition> <transition to="sendToSmallBank"> <condition expr="#{creditProfile.creditHistory >= 6}" /> <condition expr="#{creditProfile.creditScore >= 1}" /> </transition> <!-- If the credit info. doesn't meet minimum requirements based on the loan amount, the loan is just denied. --> <transition to="loanDenied" /> </decision> <mule-send name="sendToBigBank" expr="#{loanRequest}" endpoint="BigBank" var="loanQuote" type="org.mule.example.loanbroker.messages.LoanQuote"> <transition to="sendCustomerResponse" /> </mule-send> 3 SOA/EDA and Business Rules Another way to complement an event-driven service-oriented application is by adding Business Rules. This might be instead of BPM or in addition to it, as each one is better suited for certain types of business logic. Example Following is a simple example of how business rules could be used to implement an SLA function for an event-driven SOA application using Mule with Drools. The example is an application which receives a stream of on-line support tickets via a JMS topic, processes them (via a human being), and publishes them to a “completed” topic. A rules engine snoops on the incoming and completed ticket streams and escalates a ticket's status if its defined SLA is not being met. A ticket escalation causes a row to be inserted into a reporting database. Mule ESB Configuration Snippet <service name="supportQueue"> <inbound> <jms:inbound-endpoint topic="incoming.tickets" /> </inbound> <component class="org.mule.example.sla.SupportAgent" /> <outbound> <pass-through-router> <jms:outbound-endpoint topic="completed.tickets" /> </pass-through-router> </outbound> </service>
  • 4. <service name="rulesEngine"> <inbound> <jms:inbound-endpoint topic="incoming.tickets" /> <jms:inbound-endpoint topic="completed.tickets" /> </inbound> <rules:component> <rules:rules resource="SupportSLA.drl" /> </rules:component> </service> <service name="reporting"> <inbound> <jms:inbound-endpoint topic="escalated.tickets" /> </inbound> <outbound> <pass-through-router> <jdbc:outbound-endpoint queryKey="insertEscalatedTicket" /> </pass-through-router> </outbound> </service> Drools Configuration Snippet rule "Silver Priority" duration 5000 when customer : Customer( subscription == "Silver" ) ticket : Ticket( customerId == customer.id, status == "New" ) then modify( ticket ) { setStatus( "Escalated" ) }; end rule "Gold Priority" duration 3000 when customer : Customer( subscription == "Gold" ) ticket : Ticket( customerId == customer.id, status == "New" ) then modify( ticket ) { setStatus( "Escalated" ) }; end rule "Escalate Ticket" when ticket : Ticket( status == "Escalated" ) then mule.generateMessage("jms://escalated.tickets", ticket); end 4 SOA/EDA and Complex Event Processing (CEP) Complex Event Processing can also complement an event-driven service-oriented application if the business logic calls for temporal reasoning within a stream or cloud of events. Once again, this could be instead of or in addition to BPM and Business Rules, as each one is better suited for certain types of business logic.
  • 5. Example Following is a simple example of how CEP could work within an event-driven service-oriented application using Mule with Drools. The example is an application which polls a public web service for real-time stock tick updates via SOAP requests and posts the updates to a JMS queue. The queue is subscribed to by a CEP engine which detects large drops in stock value and generates alert messages (meta-events) which get logged and routed to human analysts via e-mail. Mule ESB Configuration Snippet <service name="stockTickFeed"> <inbound> <cxf:inbound-endpoint address="http://www.webservicex.net/stockquote.asmx" clientClass="net.webservicex.StockQuote" operation="GetQuote" wsdlPort="StockQuoteSoap" wsdlLocation="stockquote.wsdl" /> </inbound> <outbound> <pass-through-router> <jms:outbound-endpoint queue="stock.tick" /> </pass-through-router> </outbound> </service> <service name="rulesEngine"> <inbound> <jms:inbound-endpoint queue="stock.tick" /> </inbound> <rules:component> <rules:rules resource="StockAnalysis.drl" entryPoint="StockTick Stream" agendaGroup="evaluation" /> </rules:component> </service> <service name="rulesAlerts"> <inbound> <jms:inbound-endpoint queue="stock.alerts" /> </inbound> <log-component /> <outbound> <multicasting-router> <smtp:outbound-endpoint address="analyst1@acme.com" /> <smtp:outbound-endpoint address="analyst2@acme.com" /> </multicasting-router> </outbound> </service> Drools Configuration Snippet rule "Update stock price" when $cp : Company( $sb : symbol ) $st : StockTick( symbol == $sb, $pr : price ) from entry-point "StockTick Stream" then modify( $cp ) { currentPrice = $pr } modify( $st ) { delta = $cp.delta } end rule "Sudden drop" when
  • 6. $st : StockTick( $sb : symbol, $ts : timestamp, $pr : price, $dt : delta < -0.05 ) from entry-point "StockTick Stream" not( StockTick( symbol == $sb, timestamp > $ts ) from entry-point "StockTick Stream" ) then msg = "***** Drop >5%: "+$sb+" delta: "+StockTick.percent($dt) +" price: $"+$pr + " *****"; mule.generateMessage("jms://stock.alerts", msg); end 5 Customer Use Case As real-world validation of the concepts in this paper, a large event-driven business process application has been recently implemented using Mule ESB with jBPM for a high-profile customer. A description of the architecture is as follows. Web form submissions create incoming events on a JMS queue. These events are subscribed to by Mule and routed to one of several jBPM processes which model the business logic. The event-driven processes make synchronous and/or asynchronous calls to Siebel via SOAP web services. There are 5 complex processes plus 7 basic processes that ultimately call one of the complex processes. Processes invoke each other by sending events. Exceptions in message processing cause erroneous messages to be redirected to error queues. Historical process information is kept in an Oracle database to act as a data warehouse. Fig. 1. Graphical process definition from customer use case References 1. Complex Event Processing, http://complexevents.com/2007/04/30/soa-eda-bpm-and-cep- are-all-complementary, http://complexevents.com/2007/07/08/soa-eda-bpm-and-cep-are-all- complementary-part-2 2. Open Source Initiative, http://www.opensource.org