Upgrade to Pro — share decks privately, control downloads, hide ads and more …

[KieLive#1] Serverless Workflow: A new approach...

KIE Community
December 08, 2020

[KieLive#1] Serverless Workflow: A new approach to Business Automation, by Tihomir Surdilovic

With the rise of Serverless Architectures, Workflows have gained a renewed interest and usefulness. Typically thought of as centralized and monolithic, they now play a key role in service orchestration, coordination as well as modular processing. With many different architecture approaches already in place, the Cloud Native Computing Foundation (CNCF) has started an initiative to specify serverless workflows to ensure portability.

In this talk, we introduce this Serverless Workflow specification and provide examples of Red Hat’s implementation, powered by Quarkus, native Java, and Kogito, the next-generation business automation toolkit.

You will learn:
- The what, why, and how of the Serverless Workflow specification
- Why using the Serverless Workflow specification and orchestration can improve your serverless architecture
- Serverless Workflow + Kogito: when to use them in concert and the benefits derived.

Demo video: https://youtu.be/LNBcpLAoTQs
Repo: https://github.com/tsurdilo/serverles...
Presentation: https://www.youtube.com/watch?v=2MPX3CGUsVE

KIE Community

December 08, 2020
Tweet

More Decks by KIE Community

Other Decks in Technology

Transcript

  1. @tsurdilo tsurdilo S e wo kf ow R V E

    R L S S New approach to Business Automation
  2. Agenda 1 Introduction 2 Kogito 3 Current State (Ochestration) 4

    5 Kogito + Serverless Workflow 6 Demo Serverless Workflow
  3. 1 I n t r o d u c t

    i o n Current Architectures Platform A Platform B Serverless Microservices Event-driven Loosely coupled Polyglot Focus on business Scalable Isolation Monolith Cloud
  4. 1 I n t r o d u c t

    i o n Current Architectures From To
  5. 1 I n t r o d u c t

    i o n Seeing the big picture “Knowledge / Domain Is Everything”
  6. 1 I n t r o d u c t

    i o n Service Orchestration parallel execution handle failure A B C D E F A B C D Sequential Execution Queues / Topics Workflows A B C D E F
  7. 1 I n t r o d u c t

    i o n Why Workflows? business logic orchestration logic Separation Of Concerns Business Domain Driven Marketing Sales HR Finance
  8. 1 I n t r o d u c t

    i o n Why not “traditional" BPM Solutions? Traditional BPM Modern BPM Big product suites Difficult to maintain Difficult to scale Tightly Coupled Decoupled Scalable Polyglot Cloud-native “Still provide Value to the Business”
  9. 2 K o g i t O Cloud-native Business Automation

    “Battle tested” “Mature” “Based on Standards” “Open Source” “Event-driven” “Cloud-native” “Based on Standards” “Open Source”
  10. 2 K o g i t O Cloud-native Business Automation

    Domain-specific Microservices DRL BPMN DMN Custom Code Gen Optimization
  11. 2 K o g i t O Kogito CLI and

    Operator Kogito Operator Container / Cloud Deployment Kogito Services Runtime Services Persistence Services Event / Message Services Data Index Services Security Services Service Discovery … Container Services Infinispan Prometheus Kafka/AMQ Knative Eventing … Deployment + On-demand Provisioning and Scaling Kogito CLI
  12. 2 K o g i t O What about Orchestration?

    First Idea: “Just use BPMN”…failed: * Orchestration has much smaller scale * Needs to be embeddable * Needs to be machine / human readable * Should have clear, “serverless” constructs / patterns So we went out looking and found…a ton of stuff :)
  13. 3 C u r r e n t S t

    a t e Serverless Orchestration - current state Apache Airflow AWS Netflix Fn Flow Orquesta FunctionGraph Workflows Logic Apps Flow Workflow Tekton Pipeline Cloud Workflow . . .
  14. 3 C u r r e n t S t

    a t e Serverless Orchestration - current state Workflow Infrastructure Runtime Vendor Lock Workflow Model Vendor Lock We need a portable and vendor-neutral specification!
  15. 3 C u r r e n t S t

    a t e Serverless Orchestration - current state But then …. Specification Serverless Workflow
  16. 4 W o r k f l o w S

    p e c Serverless Workflow Spec Serverless Working Group Community https:/ /github.com/cncf/wg-serverless/tree/master/workflow/spec
  17. Specification Goals SPI <code> TCK <code> . API <code> .

    JSON SCHEMA { } . We provide… Implementors provide… RUNTIME IMPL conforms to… uses… JSON/YAML Runtime Runtime Runtime To be able to…
  18. 4 W o r k f l o w S

    p e c Serverless Workflow - Model
  19. 4 W o r k f l o w S

    p e c Serverless Workflow - Function Def
  20. 4 W o r k f l o w S

    p e c Serverless Workflow - Event Def CloudEvent
  21. 4 W o r k f l o w S

    p e c Serverless Workflow - State Def Unique Name Can be start state Can be end state Can Transition or Defined Type
  22. 4 W o r k f l o w S

    p e c Serverless Workflow - State Types Name Description Consumes events? Produces events? Executes actions? Handles errors? Allows parallel execution? Event Define events that trigger action execution yes yes yes yes (includes retries) yes Operation Execute one or more actions no yes yes yes (includes retries) yes Switch Define data-based workflow transitions no yes no yes no Delay Delay workflow execution no yes no yes no Parallel Causes parallel execution of branches (set of states) no yes no yes (includes retries) yes SubFlow Represents the invocation of another workflow from within a no yes no yes no Relay Relay state data input to output no yes no yes no ForEach Parallel execution of states for each element of a data no yes no yes (includes retries) yes Callback Manual decision step. Executes a function and waits for callback yes yes yes (including retries) yes no
  23. 4 W o r k f l o w S

    p e c Serverless Workflow - Get Involved!
  24. 5 K o g i t o + W O

    r k f l o w Kogito + Serverless Workflow Domain-specific Microservices DRL BPMN DMN Custom Code Gen Optimization Serverless Workflow Domain-specific Orchestration
  25. 5 K o g i t o + W O

    r k f l o w Kogito + Serverless Workflow Event Gateway Integration Pipeline Workflow
  26. 6 D e m o Demo - New Order Approval

    Rest Camel K A F K A Severless Worflow Human Task Service Rule Service /tsurdilo/serverless-workflow-kogito-demo