SlideShare uma empresa Scribd logo
1 de 36
Common Persistable Process Execution
Runtime

Native JVM Workflow Engine
http://www.copper-engine.org/
Short Profile
High performance, lightweight workflow engine for Java
Outstanding:


Java is the workflow description language!

OpenSource Apache License
Running in any container, e.g. Spring, JEE, ...
Support for various RDBMS, currently


Oracle



MySQL



PostgreSQL



Apache DerbyDB
Why use Java for Workflow
Design?

Source: www.bpm-guide.de/bpmn
Why use Java for Workflow
Design?
Problems of graphical Process Modeling


Simple issues become more simple, complex issues more complex



The business process gets obscured as execution details slip in



The development process gets cumbersome

 Too opaque for users, too unwieldy for developers
Why use Java for Workflow
Design?
Use the widely known Java language
Utilize the complete range of Java features
Use your favourite development environment

Use all those highly elaborated Java tools for


editing workflows



workflow compilation, debugging and profiling



teamwork support

Avoid team setup expenses because of additional languages,
notations, tools and runtimes


many skilled Java professionals available
Core Workflow Engine
Requirements
Readable and reasonable workflow description
Usually, workflows orchestrate multiple partner systems
Generally, the lifetime of a workflow is long


from seconds, to hours and days, even months

Conclusion:






Workflow instances have to survive Java process lifetime
(persistence)
A workflow engine has to cope with an unlimited number of
workflows instances at the same time.
Performance optimization with regard to throughput and latency
Why plain Java is not
enough
Straightforward workflow definition in pure Java
public void execute(Process processData) {
Contract contract = crmAdapter.getContractData(processData.getCustomerId());

if (contract.isPrepay())
sepAdapter.recharge(processData.getAmount());
else
postpayInvoice.subtract(processData.getAmount());
smsAdapter.message(processData.getMSISDN(), "recharging successful");
}

This is simple to read, but:


Every workflow instance occupies one Java thread
 limited number of parallel workflow instances



A running Java thread cannot be persisted
 no long running workflows, no crash safety
Try it asynchronously
One Thread occupied per Workflow instance?
Why not calling a partner system asynchronously?



public void execute(Process processData) {
ResponseReference r = new ResponseReference();
Contract contract = null;
synchronized (r) {
crmAdapter.sendContractDataRequest(processData.getCustomerId(), r);

r.wait();
contract = r.getContractData();
}
…
}

But: r.wait() still blocks the thread...
Don't block the thread
So, we try to avoid Object.wait:
private String correlationId = null;
public void execute(Process processData) {
if (correlationId == null) {
correlationId = … // create a GUID
crmAdapter.sendContractDataRequest(processData.getCustomerId(), correlationId);
// somehow register this workflow instance to wait for correlationId

// execute is called again, when the response is available
return;
}
else {
Contract contract = crmAdapter.getResponse(correlationId);
// continue to process the workflow
…
}}

But: This approach is bad for the readability, especially with
larger workflows
COPPER approach
Substitute Object.wait
public void execute(Process processData) {
String correlationId = getEngine().createUUID();
crmAdapter.sendContractDataRequest(processData.getCustomerId(), correlationId);
this.wait(WaitMode.ALL, 10000, correlationId);
Contract contract = this.getAndRemoveResponse(correlationId);
// continue to process the workflow
…
}

Interrupt and Resume anywhere (within the workflow)

Call stack is persisted and restored
 Internally implemented by Bytecode Instrumentation
Some more features
Crash recovery

Change Management of Workflows


supports Versioning as well as Modification of workflows



hot workflow deployment

Management & Monitoring via JMX
Distributed Execution on multiple coupled engines enables


Load Balancing



Redundancy



High Availability (requires a high available DBMS, e.g. Oracle RAC)

Fast and generic Audit Trail
COPPER Architecture
COPPER
runtime

Workflow
Definitions

Database
Workflow
instances

Queue

Filesystem

Overview over the main COPPER components, here for a persistent engine. In a transient
engine, workflow istances and queues reside in the main memory.
COPPER Architecture
explained
ProcessingEngine






The main entity in the COPPER architecture, responsible for
execution of workflow instances. Offers a Java API to launch
workflow instances, notification of waiting workflow instances,
etc.
The engine supports transient or persistent workflows - this
depends on the concrete configuration (both provided out-of-thebox)

An engine is running in a single JVM process. A JVM process may
host several engines.
COPPER Architecture
explained
Workflow Repository


encapsulates the storage and handling of workflow definitions
(i.e. their corresponding Java files) and makes the workflows
accessible to one or more COPPER processing engines.



Reads workflow definitions from the file system



Observes the filesystem for modified files --> hot deployment
Execution Animation
invoke()
wf:Workflow
Input Channel

id = 4711
data = foo

newInstance()
wf:Workflow

inject dependencies COPPER runtime
run(…)

id = null
data = null

InputChannel Processor pool
Remote Partner System

Queue

Workflow
Repository

Filesystem
Correlation Map
Execution Animation
Input Channel

COPPER runtime

InputChannel Processor pool
Queue

Workflow
Repository

wf:Workflow

Filesystem
Correlation Map

id = 4711
data = foo

dequeue()

Remote Partner System
Execution Animation
Input Channel

COPPER runtime

Serialize Java
call stack and
store it
persistently

InputChannel Processor pool
Remote Partner System

Queue

Workflow
Repository

wf:Workflow

Filesystem
Correlation Map

id = = foo
data 4711
data = foo

cid
Execution Animation
Input Channel

COPPER runtime

Processor Thread is now free to
process otherProcessor pool
InputChannel workflows
Remote Partner System

Queue
cid

Workflow
Repository

Filesystem

wf:Workflow
id = 4711
Correlation Map
data = foo

data = foo
Execution Animation
Input Channel

COPPER runtime

Retrieve
persistent Java
callstack and
resume

InputChannel Processor pool
Remote Partner System

Queue
cid

Workflow
Repository

Filesystem

wf:Workflow
id = 4711
Correlation Map
data = foo

response
data = foo data
Execution Animation
Input Channel

COPPER runtime

Retrieve
persistent Java
callstack and
resume

InputChannel Processor pool
Queue
cid

Workflow
Repository

wf:Workflow

Filesystem
Correlation Map

id = 4711
data = foo
response data

dequeue()

Remote Partner System
Execution Animation
Resume here
Input Channel

COPPER runtime

InputChannel Processor pool
Remote Partner System

removeWorkflow()

Queue

continue processing
Workflow
Repository

wf:Workflow

Filesystem
Correlation Map

id = 4711
data = foo
response data
Execution Animation
Input Channel

COPPER runtime

InputChannel Processor
Processing finished pool
Queue

Workflow
Repository

Filesystem
Correlation Map

Remote Partner System
COPPER Architecture
explained
Processor Pool


A named set of threads executing workflow instances



Configurable name and number of processing threads







Each processor pool owns a queue, containing the workflow
instances ready for execution, e.g. after initial enqueue or wakeup
a transient engine’s queue resides in memory
a persistent engine’s queue resides in the database
Supports changing the number of threads dynamically during
runtime via JMX
COPPER supports multiple processor pools, a workflow instance
may change its processor pool at any time
COPPER Architecture
explained
COPPER runtime

Short running tasks pay for the cost
induced by long running tasks because
Processor pool
of thread pool saturation
queue
long running tasks (e.g. complex database query)
short running tasks
COPPER Architecture
explained
COPPER runtime

Processor pool
long running tasks

default queue
COPPER Architecture
explained
COPPER runtime

Processor pool
long running tasks
Configurable thread pools help avoiding
thread pool saturation for short
running tasks

default queue
COPPER Architecture
explained
Database Layer





Encapsulates the access to persistent workflow instances and
queues
Decoupling of the core COPPER components and the database
Enables implementation of custom database layers, e.g. with
application specific optimizations or for unsupported DBMS.

Audit Trail


Simple and generic Audit Trail implementations



Log data to the database for tracebility and analysis
COPPER Architecture
explained
Batcher







Enables simple use of database batching/bulking,
Collects single database actions (mostly insert, update, delete)
and bundles them to a single batch,
Usually increases the database throughput by a factor of 10 or
more,
Widely used by the COPPER database layer, but open for custom
use.
COPPER Architecture
explained
COPPER
runtime

Queue

wf:Workflow
id TxnData
= 0815
data = bar

Correlation Map

Database
COPPER Architecture
explained
COPPER
runtime

Queue

wf:Workflow
id TxnData
= 0816
data = bar2

Correlation Map

TxnData

Database
COPPER Architecture
explained
COPPER
runtime

Queue

wf:Workflow
id TxnData
= 0817
data = bar3

Correlation Map

TxnData
TxnData

Database
COPPER Architecture
explained
COPPER
runtime

Queue

Correlation Map

TxnData
TxnData
TxnData

JDBC.executeBatch()

Database
COPPER Architecture
explained
COPPER
runtime
Continue processing workflows
after database operations have
been committed and results
have
Queue been sent back to the
workflow instances

Correlation Map

Database
COPPER
Open Source (Apache)
Available for Java 6 and 7
http://www.copper-engine.org/


Umfassendes Response-Handling


Early Responses möglich



Multiple Responses möglich (first oder all)



Beliebige CorreleationId


Performance Zahlen

Mais conteúdo relacionado

Mais procurados

Sign language translator ieee power point
Sign language translator ieee power pointSign language translator ieee power point
Sign language translator ieee power pointMadhuri Yellapu
 
Operating system support in distributed system
Operating system support in distributed systemOperating system support in distributed system
Operating system support in distributed systemishapadhy
 
Lecture 3
Lecture 3Lecture 3
Lecture 3Mr SMAK
 
Computer architecture kai hwang
Computer architecture   kai hwangComputer architecture   kai hwang
Computer architecture kai hwangSumedha
 
Multi processor scheduling
Multi  processor schedulingMulti  processor scheduling
Multi processor schedulingShashank Kapoor
 
Memory management ppt
Memory management pptMemory management ppt
Memory management pptManishaJha43
 
تطبيقات الويب
تطبيقات الويبتطبيقات الويب
تطبيقات الويبmm201500556
 
Process in operating system
Process in operating systemProcess in operating system
Process in operating systemChetan Mahawar
 
Introduction to MPI
Introduction to MPI Introduction to MPI
Introduction to MPI Hanif Durad
 
Fundamental File Processing Operations
Fundamental File Processing OperationsFundamental File Processing Operations
Fundamental File Processing OperationsRico
 
Voice based email system for physically challenged
Voice based email system for physically challengedVoice based email system for physically challenged
Voice based email system for physically challengedIbrahim Khalil Shakik
 
Multithreading
MultithreadingMultithreading
MultithreadingA B Shinde
 
Parallel Programing Model
Parallel Programing ModelParallel Programing Model
Parallel Programing ModelAdlin Jeena
 
Cloud Computing and Vertualization
Cloud Computing and VertualizationCloud Computing and Vertualization
Cloud Computing and VertualizationReach Chirag
 
Software Configuration Management
Software Configuration ManagementSoftware Configuration Management
Software Configuration ManagementPratik Tandel
 

Mais procurados (20)

Sign language translator ieee power point
Sign language translator ieee power pointSign language translator ieee power point
Sign language translator ieee power point
 
Operating system support in distributed system
Operating system support in distributed systemOperating system support in distributed system
Operating system support in distributed system
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
 
Computer architecture kai hwang
Computer architecture   kai hwangComputer architecture   kai hwang
Computer architecture kai hwang
 
Multi processor scheduling
Multi  processor schedulingMulti  processor scheduling
Multi processor scheduling
 
Trends in distributed systems
Trends in distributed systemsTrends in distributed systems
Trends in distributed systems
 
Memory management ppt
Memory management pptMemory management ppt
Memory management ppt
 
تطبيقات الويب
تطبيقات الويبتطبيقات الويب
تطبيقات الويب
 
Process in operating system
Process in operating systemProcess in operating system
Process in operating system
 
Feistel cipher
Feistel cipherFeistel cipher
Feistel cipher
 
Introduction to MPI
Introduction to MPI Introduction to MPI
Introduction to MPI
 
Fundamental File Processing Operations
Fundamental File Processing OperationsFundamental File Processing Operations
Fundamental File Processing Operations
 
Voice based email system for physically challenged
Voice based email system for physically challengedVoice based email system for physically challenged
Voice based email system for physically challenged
 
Multithreading
MultithreadingMultithreading
Multithreading
 
Parallel Programing Model
Parallel Programing ModelParallel Programing Model
Parallel Programing Model
 
Cloud Computing and Vertualization
Cloud Computing and VertualizationCloud Computing and Vertualization
Cloud Computing and Vertualization
 
Context switching
Context switchingContext switching
Context switching
 
Software Development Life Cycle
Software Development Life CycleSoftware Development Life Cycle
Software Development Life Cycle
 
Software Configuration Management
Software Configuration ManagementSoftware Configuration Management
Software Configuration Management
 
Layered Software Architecture
Layered Software ArchitectureLayered Software Architecture
Layered Software Architecture
 

Destaque

Statistics And the Query Optimizer
Statistics And the Query OptimizerStatistics And the Query Optimizer
Statistics And the Query OptimizerGrant Fritchey
 
Vnsispl dbms concepts_ch1
Vnsispl dbms concepts_ch1Vnsispl dbms concepts_ch1
Vnsispl dbms concepts_ch1sriprasoon
 
Overview of stinger interactive query for hive
Overview of stinger   interactive query for hiveOverview of stinger   interactive query for hive
Overview of stinger interactive query for hiveDavid Kaiser
 
Buffer management --database buffering
Buffer management --database buffering Buffer management --database buffering
Buffer management --database buffering julia121214
 
Lect 21 components_of_database_management_system
Lect 21 components_of_database_management_systemLect 21 components_of_database_management_system
Lect 21 components_of_database_management_systemnadine016
 
Indexing and Query Optimizer (Richard Kreuter)
Indexing and Query Optimizer (Richard Kreuter)Indexing and Query Optimizer (Richard Kreuter)
Indexing and Query Optimizer (Richard Kreuter)MongoDB
 
Activiti in Action for BeJUG Part II
Activiti in Action for BeJUG Part IIActiviti in Action for BeJUG Part II
Activiti in Action for BeJUG Part IITom Baeyens
 
L8 components and properties of dbms
L8  components and properties of dbmsL8  components and properties of dbms
L8 components and properties of dbmsRushdi Shams
 
Introduction to Activiti BPM
Introduction to Activiti BPMIntroduction to Activiti BPM
Introduction to Activiti BPMAlfresco Software
 
Dbms role advantages
Dbms role advantagesDbms role advantages
Dbms role advantagesjeancly
 
Introduction to Apache Airflow - Data Day Seattle 2016
Introduction to Apache Airflow - Data Day Seattle 2016Introduction to Apache Airflow - Data Day Seattle 2016
Introduction to Apache Airflow - Data Day Seattle 2016Sid Anand
 
Database management functions
Database management functionsDatabase management functions
Database management functionsyhen06
 
17. Recovery System in DBMS
17. Recovery System in DBMS17. Recovery System in DBMS
17. Recovery System in DBMSkoolkampus
 
16. Concurrency Control in DBMS
16. Concurrency Control in DBMS16. Concurrency Control in DBMS
16. Concurrency Control in DBMSkoolkampus
 

Destaque (18)

Neuro4j Workflow Overview
Neuro4j Workflow OverviewNeuro4j Workflow Overview
Neuro4j Workflow Overview
 
Statistics And the Query Optimizer
Statistics And the Query OptimizerStatistics And the Query Optimizer
Statistics And the Query Optimizer
 
Vnsispl dbms concepts_ch1
Vnsispl dbms concepts_ch1Vnsispl dbms concepts_ch1
Vnsispl dbms concepts_ch1
 
Overview of stinger interactive query for hive
Overview of stinger   interactive query for hiveOverview of stinger   interactive query for hive
Overview of stinger interactive query for hive
 
Buffer management --database buffering
Buffer management --database buffering Buffer management --database buffering
Buffer management --database buffering
 
Lect 21 components_of_database_management_system
Lect 21 components_of_database_management_systemLect 21 components_of_database_management_system
Lect 21 components_of_database_management_system
 
Indexing and Query Optimizer (Richard Kreuter)
Indexing and Query Optimizer (Richard Kreuter)Indexing and Query Optimizer (Richard Kreuter)
Indexing and Query Optimizer (Richard Kreuter)
 
Activiti in Action for BeJUG Part II
Activiti in Action for BeJUG Part IIActiviti in Action for BeJUG Part II
Activiti in Action for BeJUG Part II
 
L8 components and properties of dbms
L8  components and properties of dbmsL8  components and properties of dbms
L8 components and properties of dbms
 
Introduction to Activiti BPM
Introduction to Activiti BPMIntroduction to Activiti BPM
Introduction to Activiti BPM
 
Dbms role advantages
Dbms role advantagesDbms role advantages
Dbms role advantages
 
Dml and ddl
Dml and ddlDml and ddl
Dml and ddl
 
Introduction to Apache Airflow - Data Day Seattle 2016
Introduction to Apache Airflow - Data Day Seattle 2016Introduction to Apache Airflow - Data Day Seattle 2016
Introduction to Apache Airflow - Data Day Seattle 2016
 
Database management functions
Database management functionsDatabase management functions
Database management functions
 
2 tier and 3 tier architecture
2 tier and 3 tier architecture2 tier and 3 tier architecture
2 tier and 3 tier architecture
 
17. Recovery System in DBMS
17. Recovery System in DBMS17. Recovery System in DBMS
17. Recovery System in DBMS
 
16. Concurrency Control in DBMS
16. Concurrency Control in DBMS16. Concurrency Control in DBMS
16. Concurrency Control in DBMS
 
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with ExamplesDML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
 

Semelhante a Copper: A high performance workflow engine

Learning spark ch10 - Spark Streaming
Learning spark ch10 - Spark StreamingLearning spark ch10 - Spark Streaming
Learning spark ch10 - Spark Streamingphanleson
 
Node.js Workshop - Sela SDP 2015
Node.js Workshop  - Sela SDP 2015Node.js Workshop  - Sela SDP 2015
Node.js Workshop - Sela SDP 2015Nir Noy
 
FBTFTP: an opensource framework to build dynamic tftp servers
FBTFTP: an opensource framework to build dynamic tftp serversFBTFTP: an opensource framework to build dynamic tftp servers
FBTFTP: an opensource framework to build dynamic tftp serversAngelo Failla
 
Windows Azure Acid Test
Windows Azure Acid TestWindows Azure Acid Test
Windows Azure Acid Testexpanz
 
.Net Multithreading and Parallelization
.Net Multithreading and Parallelization.Net Multithreading and Parallelization
.Net Multithreading and ParallelizationDmitri Nesteruk
 
Threading Successes 03 Gamebryo
Threading Successes 03   GamebryoThreading Successes 03   Gamebryo
Threading Successes 03 Gamebryoguest40fc7cd
 
Node.js and Cassandra
Node.js and CassandraNode.js and Cassandra
Node.js and CassandraStratio
 
Automating Software Development Life Cycle - A DevOps Approach
Automating Software Development Life Cycle - A DevOps ApproachAutomating Software Development Life Cycle - A DevOps Approach
Automating Software Development Life Cycle - A DevOps ApproachAkshaya Mahapatra
 
Play framework : A Walkthrough
Play framework : A WalkthroughPlay framework : A Walkthrough
Play framework : A Walkthroughmitesh_sharma
 
Dalvik Vm & Jit
Dalvik Vm & JitDalvik Vm & Jit
Dalvik Vm & JitAnkit Somani
 
Dalvik Vm & Jit
Dalvik Vm & JitDalvik Vm & Jit
Dalvik Vm & JitAnkit Somani
 
Apache Samza 1.0 - What's New, What's Next
Apache Samza 1.0 - What's New, What's NextApache Samza 1.0 - What's New, What's Next
Apache Samza 1.0 - What's New, What's NextPrateek Maheshwari
 
Logging for Production Systems in The Container Era
Logging for Production Systems in The Container EraLogging for Production Systems in The Container Era
Logging for Production Systems in The Container EraSadayuki Furuhashi
 
Passenger 6 generic language support presentation
Passenger 6 generic language support presentationPassenger 6 generic language support presentation
Passenger 6 generic language support presentationHongli Lai
 
A Scalable I/O Manager for GHC
A Scalable I/O Manager for GHCA Scalable I/O Manager for GHC
A Scalable I/O Manager for GHCJohan Tibell
 
Asynchronous I/O in NodeJS - new standard or challenges?
Asynchronous I/O in NodeJS - new standard or challenges?Asynchronous I/O in NodeJS - new standard or challenges?
Asynchronous I/O in NodeJS - new standard or challenges?Dinh Pham
 
Introduction to LAVA Workload Scheduler
Introduction to LAVA Workload SchedulerIntroduction to LAVA Workload Scheduler
Introduction to LAVA Workload SchedulerNopparat Nopkuat
 

Semelhante a Copper: A high performance workflow engine (20)

Learning spark ch10 - Spark Streaming
Learning spark ch10 - Spark StreamingLearning spark ch10 - Spark Streaming
Learning spark ch10 - Spark Streaming
 
Node.js Workshop - Sela SDP 2015
Node.js Workshop  - Sela SDP 2015Node.js Workshop  - Sela SDP 2015
Node.js Workshop - Sela SDP 2015
 
FBTFTP: an opensource framework to build dynamic tftp servers
FBTFTP: an opensource framework to build dynamic tftp serversFBTFTP: an opensource framework to build dynamic tftp servers
FBTFTP: an opensource framework to build dynamic tftp servers
 
Windows Azure Acid Test
Windows Azure Acid TestWindows Azure Acid Test
Windows Azure Acid Test
 
.Net Multithreading and Parallelization
.Net Multithreading and Parallelization.Net Multithreading and Parallelization
.Net Multithreading and Parallelization
 
Threading Successes 03 Gamebryo
Threading Successes 03   GamebryoThreading Successes 03   Gamebryo
Threading Successes 03 Gamebryo
 
Node.js and Cassandra
Node.js and CassandraNode.js and Cassandra
Node.js and Cassandra
 
Automating Software Development Life Cycle - A DevOps Approach
Automating Software Development Life Cycle - A DevOps ApproachAutomating Software Development Life Cycle - A DevOps Approach
Automating Software Development Life Cycle - A DevOps Approach
 
Play framework : A Walkthrough
Play framework : A WalkthroughPlay framework : A Walkthrough
Play framework : A Walkthrough
 
Dalvik Vm & Jit
Dalvik Vm & JitDalvik Vm & Jit
Dalvik Vm & Jit
 
Dalvik Vm & Jit
Dalvik Vm & JitDalvik Vm & Jit
Dalvik Vm & Jit
 
Play Framework
Play FrameworkPlay Framework
Play Framework
 
Apache Samza 1.0 - What's New, What's Next
Apache Samza 1.0 - What's New, What's NextApache Samza 1.0 - What's New, What's Next
Apache Samza 1.0 - What's New, What's Next
 
Logging for Production Systems in The Container Era
Logging for Production Systems in The Container EraLogging for Production Systems in The Container Era
Logging for Production Systems in The Container Era
 
Passenger 6 generic language support presentation
Passenger 6 generic language support presentationPassenger 6 generic language support presentation
Passenger 6 generic language support presentation
 
Introduction to Apache Beam
Introduction to Apache BeamIntroduction to Apache Beam
Introduction to Apache Beam
 
A Scalable I/O Manager for GHC
A Scalable I/O Manager for GHCA Scalable I/O Manager for GHC
A Scalable I/O Manager for GHC
 
Panama.pdf
Panama.pdfPanama.pdf
Panama.pdf
 
Asynchronous I/O in NodeJS - new standard or challenges?
Asynchronous I/O in NodeJS - new standard or challenges?Asynchronous I/O in NodeJS - new standard or challenges?
Asynchronous I/O in NodeJS - new standard or challenges?
 
Introduction to LAVA Workload Scheduler
Introduction to LAVA Workload SchedulerIntroduction to LAVA Workload Scheduler
Introduction to LAVA Workload Scheduler
 

Último

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 

Último (20)

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 

Copper: A high performance workflow engine

  • 1. Common Persistable Process Execution Runtime Native JVM Workflow Engine http://www.copper-engine.org/
  • 2. Short Profile High performance, lightweight workflow engine for Java Outstanding:  Java is the workflow description language! OpenSource Apache License Running in any container, e.g. Spring, JEE, ... Support for various RDBMS, currently  Oracle  MySQL  PostgreSQL  Apache DerbyDB
  • 3. Why use Java for Workflow Design? Source: www.bpm-guide.de/bpmn
  • 4. Why use Java for Workflow Design? Problems of graphical Process Modeling  Simple issues become more simple, complex issues more complex  The business process gets obscured as execution details slip in  The development process gets cumbersome  Too opaque for users, too unwieldy for developers
  • 5. Why use Java for Workflow Design? Use the widely known Java language Utilize the complete range of Java features Use your favourite development environment Use all those highly elaborated Java tools for  editing workflows  workflow compilation, debugging and profiling  teamwork support Avoid team setup expenses because of additional languages, notations, tools and runtimes  many skilled Java professionals available
  • 6. Core Workflow Engine Requirements Readable and reasonable workflow description Usually, workflows orchestrate multiple partner systems Generally, the lifetime of a workflow is long  from seconds, to hours and days, even months Conclusion:    Workflow instances have to survive Java process lifetime (persistence) A workflow engine has to cope with an unlimited number of workflows instances at the same time. Performance optimization with regard to throughput and latency
  • 7. Why plain Java is not enough Straightforward workflow definition in pure Java public void execute(Process processData) { Contract contract = crmAdapter.getContractData(processData.getCustomerId()); if (contract.isPrepay()) sepAdapter.recharge(processData.getAmount()); else postpayInvoice.subtract(processData.getAmount()); smsAdapter.message(processData.getMSISDN(), "recharging successful"); } This is simple to read, but:  Every workflow instance occupies one Java thread  limited number of parallel workflow instances  A running Java thread cannot be persisted  no long running workflows, no crash safety
  • 8. Try it asynchronously One Thread occupied per Workflow instance? Why not calling a partner system asynchronously?  public void execute(Process processData) { ResponseReference r = new ResponseReference(); Contract contract = null; synchronized (r) { crmAdapter.sendContractDataRequest(processData.getCustomerId(), r); r.wait(); contract = r.getContractData(); } … } But: r.wait() still blocks the thread...
  • 9. Don't block the thread So, we try to avoid Object.wait: private String correlationId = null; public void execute(Process processData) { if (correlationId == null) { correlationId = … // create a GUID crmAdapter.sendContractDataRequest(processData.getCustomerId(), correlationId); // somehow register this workflow instance to wait for correlationId // execute is called again, when the response is available return; } else { Contract contract = crmAdapter.getResponse(correlationId); // continue to process the workflow … }} But: This approach is bad for the readability, especially with larger workflows
  • 10. COPPER approach Substitute Object.wait public void execute(Process processData) { String correlationId = getEngine().createUUID(); crmAdapter.sendContractDataRequest(processData.getCustomerId(), correlationId); this.wait(WaitMode.ALL, 10000, correlationId); Contract contract = this.getAndRemoveResponse(correlationId); // continue to process the workflow … } Interrupt and Resume anywhere (within the workflow) Call stack is persisted and restored  Internally implemented by Bytecode Instrumentation
  • 11. Some more features Crash recovery Change Management of Workflows  supports Versioning as well as Modification of workflows  hot workflow deployment Management & Monitoring via JMX Distributed Execution on multiple coupled engines enables  Load Balancing  Redundancy  High Availability (requires a high available DBMS, e.g. Oracle RAC) Fast and generic Audit Trail
  • 12. COPPER Architecture COPPER runtime Workflow Definitions Database Workflow instances Queue Filesystem Overview over the main COPPER components, here for a persistent engine. In a transient engine, workflow istances and queues reside in the main memory.
  • 13. COPPER Architecture explained ProcessingEngine    The main entity in the COPPER architecture, responsible for execution of workflow instances. Offers a Java API to launch workflow instances, notification of waiting workflow instances, etc. The engine supports transient or persistent workflows - this depends on the concrete configuration (both provided out-of-thebox) An engine is running in a single JVM process. A JVM process may host several engines.
  • 14. COPPER Architecture explained Workflow Repository  encapsulates the storage and handling of workflow definitions (i.e. their corresponding Java files) and makes the workflows accessible to one or more COPPER processing engines.  Reads workflow definitions from the file system  Observes the filesystem for modified files --> hot deployment
  • 15. Execution Animation invoke() wf:Workflow Input Channel id = 4711 data = foo newInstance() wf:Workflow inject dependencies COPPER runtime run(…) id = null data = null InputChannel Processor pool Remote Partner System Queue Workflow Repository Filesystem Correlation Map
  • 16. Execution Animation Input Channel COPPER runtime InputChannel Processor pool Queue Workflow Repository wf:Workflow Filesystem Correlation Map id = 4711 data = foo dequeue() Remote Partner System
  • 17. Execution Animation Input Channel COPPER runtime Serialize Java call stack and store it persistently InputChannel Processor pool Remote Partner System Queue Workflow Repository wf:Workflow Filesystem Correlation Map id = = foo data 4711 data = foo cid
  • 18. Execution Animation Input Channel COPPER runtime Processor Thread is now free to process otherProcessor pool InputChannel workflows Remote Partner System Queue cid Workflow Repository Filesystem wf:Workflow id = 4711 Correlation Map data = foo data = foo
  • 19. Execution Animation Input Channel COPPER runtime Retrieve persistent Java callstack and resume InputChannel Processor pool Remote Partner System Queue cid Workflow Repository Filesystem wf:Workflow id = 4711 Correlation Map data = foo response data = foo data
  • 20. Execution Animation Input Channel COPPER runtime Retrieve persistent Java callstack and resume InputChannel Processor pool Queue cid Workflow Repository wf:Workflow Filesystem Correlation Map id = 4711 data = foo response data dequeue() Remote Partner System
  • 21. Execution Animation Resume here Input Channel COPPER runtime InputChannel Processor pool Remote Partner System removeWorkflow() Queue continue processing Workflow Repository wf:Workflow Filesystem Correlation Map id = 4711 data = foo response data
  • 22. Execution Animation Input Channel COPPER runtime InputChannel Processor Processing finished pool Queue Workflow Repository Filesystem Correlation Map Remote Partner System
  • 23. COPPER Architecture explained Processor Pool  A named set of threads executing workflow instances  Configurable name and number of processing threads    Each processor pool owns a queue, containing the workflow instances ready for execution, e.g. after initial enqueue or wakeup a transient engine’s queue resides in memory a persistent engine’s queue resides in the database Supports changing the number of threads dynamically during runtime via JMX COPPER supports multiple processor pools, a workflow instance may change its processor pool at any time
  • 24. COPPER Architecture explained COPPER runtime Short running tasks pay for the cost induced by long running tasks because Processor pool of thread pool saturation queue long running tasks (e.g. complex database query) short running tasks
  • 25. COPPER Architecture explained COPPER runtime Processor pool long running tasks default queue
  • 26. COPPER Architecture explained COPPER runtime Processor pool long running tasks Configurable thread pools help avoiding thread pool saturation for short running tasks default queue
  • 27. COPPER Architecture explained Database Layer    Encapsulates the access to persistent workflow instances and queues Decoupling of the core COPPER components and the database Enables implementation of custom database layers, e.g. with application specific optimizations or for unsupported DBMS. Audit Trail  Simple and generic Audit Trail implementations  Log data to the database for tracebility and analysis
  • 28. COPPER Architecture explained Batcher     Enables simple use of database batching/bulking, Collects single database actions (mostly insert, update, delete) and bundles them to a single batch, Usually increases the database throughput by a factor of 10 or more, Widely used by the COPPER database layer, but open for custom use.
  • 30. COPPER Architecture explained COPPER runtime Queue wf:Workflow id TxnData = 0816 data = bar2 Correlation Map TxnData Database
  • 31. COPPER Architecture explained COPPER runtime Queue wf:Workflow id TxnData = 0817 data = bar3 Correlation Map TxnData TxnData Database
  • 33. COPPER Architecture explained COPPER runtime Continue processing workflows after database operations have been committed and results have Queue been sent back to the workflow instances Correlation Map Database
  • 34. COPPER Open Source (Apache) Available for Java 6 and 7 http://www.copper-engine.org/
  • 35.  Umfassendes Response-Handling  Early Responses möglich  Multiple Responses möglich (first oder all)  Beliebige CorreleationId