Copyright © 2020, Oracle and/or its affiliates
Data-driven Microservices Architecture with
Converged Database, Kubernetes and Helidon
on Oracle Cloud
Paul Parkinson
MicroService Platform Dev
Oracle
Kuassi Mensah
Dir Product Management
Oracle
Starts at 10 am ET
Martin Schmitter
Solution Architect Database
RWE Supply & Trading
2 Copyright © 2020, Oracle and/or its affiliates | Confidential: Internal/Restricted/Highly Restricted [Date]
Kuassi Mensah
Director Product Management
Java DB connectivity (Sync, Async, Reactive)
MicroServices, Zero downtime
Database as Hadoop datasource
@kmensah
https://medium.com/@kuassimensah
Martin Schmitter
Solution Architect - Database
Martin is of the generation of Commodore 64 IT
professional, curious of all kinds of technology.
Paul Parkinson
Microservices Platform Developer
Data and Transaction Processing Dev Lead,
Helidon Microservices Cloud Platform
@paulparkinson
https://medium.com/@paul.parkinson
1. Data Driven Microservices Architecture (Kuassi Mensah)
2. Real life Challenges (Martin Schmitter)
3. Example application and flow (Paul Parkinson)
4. Demo and Labs (Paul Parkinson)
Copyright © 2019 Oracle and/or its affiliates.
Session Agenda
Copyright © 2019 Oracle and/or its affiliates.
Architecture Overview of Data-Centric Microservices
Copyright © 2019 Oracle and/or its affiliates.
General Microservices Platform Requirements
5
Understand the Platform Requirements (cf Cloud-Native Computing Foundation)
• Cloud Infrastructure
• Containers – Docker, CRI-O
• Orchestration – Kubernetes
• Microservices Framework - Helidon
• Communication across Microservices
• Service Broker – Operators
Copyright © 2019 Oracle and/or its affiliates.
• Service Mesh
• Observability – Tracing, Health Monitoring
• Define Microservices within Bounded Contexts
• Polyglot Persistence – Convergence DB
• Distributed Transaction – Saga Pattern
Copyright © 2019 Oracle and/or its affiliates.6
Oracle Cloud Infrastructure
Cloud Native Environment
Java Microservices Polyglot MicroservicesTraditional Applications
Public Cloud Private Cloud
Oracle Linux Cloud Native Environment
Service Mesh with Kubernetes/Containers Autonomous Database Exadata
Microservices Platform with OCI, Oracle Converged
Database and Helidon
Monitoring
Observability
&
Tracing
OCI API Gateway
Service Broker
Communication across Microservices
Confidential – Oracle Internal/Restricted/Highly Restricted
7
• Synchronous
• REST or gRPC
• Asynchronous
• Loose coupling
• Immutability
• Events/Messages, Pub/Sub, Notification: Event Sourcing
Events Sourcing
Microservices interact by ”sourcing events” from the Event store via the Event
Broker
• The Event store is the single source of truth (Kafka, AQ/TEQ)
• Producers: log events in the Event store then publish a notification
• Consumers: notified when Events are published then “read” the Event store
Web Server Inventory ServiceOrders Service
Publish & Persist
Event #1
Notified & Consume
Event #1
Event Broker & Event Store
Persist State
change
Event #1
Copyright © 2019 Oracle and/or its affiliates.
The Service Mesh
Kubernetes takes care of containers management,
automating application deployment and scaling, but
there is still a lot left up to the developer
The service mesh = data plane + control plane
• Data plane (Envoy): sidecar proxy instances, that
perform service discovery, health checking, routing,
load balancing, authentication/authorization, and
observability.
• Control plane (Istio): sets the policy and
configuration (e.g., routing table, load balancing
policies) to be enacted by all the data plane
instances
Confidential – Oracle Internal/Restricted/Highly Restricted9
Instead of a direct communication model
Sidecar is inserted for every pod/service
Observability and Distributed Tracing
Confidential – Oracle Internal/Restricted/Highly Restricted
• Observability: continuous logging and tracing across services
• Trace, Span, SpanContext, SpanId
• OpenTelemetry: OpenTracing + OpenCensus
• Kiali, Jaeger, and Grafana stop at the edge of the DB
• Looking into end-to-end distributed tracing
OCI Service Broker for Kubernetes
Oracle Cloud Infrastructure
Add Service Broker to
your Kubernetes Cluster
Use kubectl to provision
and bind to OCI services
>kubectl
ATP
Secret
>kubectl
Secret
App
Use kubectl to deploy apps
that use the OCI services
ADWStream
Obj
Storage…
Data-Centric Microservices Application
Copyright © 2019 Oracle and/or its affiliates.
Microservices Data Management Considerations
• Polyglot Persistence
• Single models versus converged database
• Bounded Contexts
• Full fledge database per service
• PDBs, Shards, PDB Sharding
• Shared database
• Tables, Schemas
• Synchronous or Reactive DB Access
• R2DBC, Reactor, RxJava, Akka Streams
• Reactive Streams Ingestion
• API Composition (Queries)
• Front end API Composer queries other services and performs an in-memory join
• CQRS
13
Polyglot Persistence - Oracle Converged Database
Multiple Segregated or Joint Data Models for Separated or Mixed Semantics
Spatial Graph OLAPNoSQLRelational XML
Database Cluster Container
PDB 1 PDB 3 PDB 4PDB 2 PDB 5
Converged
Database
Multi Model
Enterprise Grade Operations and Security by
Consolidating to Database As A Service
Database
Cross Model
Consistent “Holistic View” of
Real Time Production Data
15
• Areas where certain business
processes are implemented
• Logical boundaries within
which terms have non-ambiguous
meaning
Design microservices within
bounded contexts
• Services within bounded contexts
have local transactions
• Map monolithic application modules
as services
• Split the monolithic database
along the lines of bounded contexts
Domain Driven Design - Bounded Contexts
VeggieDash/GrubDash Microservices App
• Each service in a container, managed by OKE
• Helidon manages liveness and health
• PDBs per service (HOLs show two PDBs in
ATP #alwaysfreetier)
• Event broker built-in to the database (AQ)
• Analytics microservice is UI for Ops insights
• Delivery microservice has Spatial/Graph
optimizations
• Order service has the recommendation
engine and search with Text data; and the
orders are in JSON.
• Saga transactions between Order, Inventory,
and Delivery service; any one’s
failure/unavailability cancels the order
Confidential – Gartner
ATP-S
Order Inventory Delivery
JSON
TEXT
Analytics
JSON
OKE
Copyright © 2019 Oracle and/or its affiliates.
Distributed Transactions - The Saga Pattern
Confidential – Oracle Internal/Restricted/Highly Restricted
“A saga is a sequence of local transactions (Tx).
Each local Tx updates the state (local database) and
publishes an event to trigger the next local Tx in the
saga.
If a local Tx fails then the saga executes a series of
compensating (!Tx) that undo the changes that were
made by the preceding local Tx”
Event Broker & Store
Tx1 Tx3Tx2
Send &
Persist
Event
Consume
Event
Persist
State
Send &
Persist
EventPersist
State
Persist
State
Consume
Event
Send &
Persist
Event
Start
Saga
End
Saga
https://microservices.io/patterns/data/saga.html
Saga includes 3 local transactions
How Oracle Database Addresses the Saga Challenges
• Exactly once message delivery – Oracle/AQ (T.E.Q.)
• Execute all steps or remove any effect
• => Database transaction support for sagas – coming
• Avoid excessive development, maintenance, and testing costs – typically due to compensation
• => Compensate-able data support – coming
• Higher parallelism
• Less venerability to hot-spots – most hot-spots deal with inventory management
• Support ‘complex sagas’ e.g., human interactions, multi-party interaction => Oracle workflow
Learn more about the coming features during future events.
Martin will now discuss real life challenges beyond
architecture
Then, in 10min, Paul will walk you through a Demo and
Labs
https://bit.ly/2AW1ZSG
Copyright © 2019 Oracle and/or its affiliates.19
Real world challenges of Microservices in DevOps environments
Database House Party #2
Real world challenges of Microservices in DevOps environments
25.06.202021
Martin Schmitter, Solutions Architect - Database
§ Information Scientist, application development, Jan 2001
§ ~20y in professional IT (~30y non-professional)
§ HAM radio amateur (14y)
§ My first Oracle version = v7.3
§ Cisco Certified Network Associate – CCNA (2002-2005)
§ DOAG member >2010
§ Working with RWE Supply & Trading GmbH >2015
§ Local Representative DOAG Regio NRW >2016
§ Oracle ACE Associate >2019
#whoami
Safe Harbour Statement
• All statements are representing my opinion and
will not represent or reflect any strategy, direction
or architecture of any company I am working
with.
• All statements are made in general purpose,
based on my own observations and personal
experience and will not be specific to an
enterprise, project or an individual.
Real world challenges of Microservices in DevOps environments
25.06.202022
Self-conception
of having full
freedom to chose
the best tool for a
given task
Microservices and DevOps
Authentication, Authorization and Monitoring
Heterogenous tools and services will lead to complexity in authentication and authorization:
• How to make sure authentication works over all services?
• Is every database engine able to provide the detail of authorization we need (e.g. row level)?
• Do the service have all the necessary interfaces to work with (the) one identity and privilege
management system?
• How to audit access and collect logs for distributed transactions over multiple (data) services?
Real world challenges of Microservices in DevOps environments
25.06.202024
Data Privacy and Protection
If data sets are distributed over multiple database engines with
different database types, how do you manage…
• … the right of access, … of accuracy, … right to erasure?
• … to assure that just allowed data is stored in an accurate way?
• schema on write vs. schema on read
• … all financial tax relevant data is known and can be provided
(e.g. German GDPdU/GoBD)
• … to be aware of your data?
Real world challenges of Microservices in DevOps environments
25.06.202025
IT product onboarding and allow lists
IT products like (cloud) services, tools and engines to build your microservice need to be onboarded and
allowed:
• In big organizations a new product, vendor or supplier must bypass certain approval steppes, before you
can make use of them:
• E.g.: Workers council, compliance, security, data protection law, risk assessment, business
continuity management, standardization and integration in your major incident system.
• This might become a very time consuming and expensive exercise contradicting the idea of
providing quick to market isolated best-of-breed tools for your microservices. Especially if you need
to restart the process on every major update.
• A consolidation approach, using multi-purpose solutions and products might become famous
again.
Real world challenges of Microservices in DevOps environments
25.06.202026
What is your best practices to deal with this?
Thank you
© 2019 Oracle

Database@Home : Data Driven Apps - Data-driven Microservices Architecture with Converged Database, Kubernetes and Helidon on Oracle Cloud

  • 1.
    Copyright © 2020,Oracle and/or its affiliates Data-driven Microservices Architecture with Converged Database, Kubernetes and Helidon on Oracle Cloud Paul Parkinson MicroService Platform Dev Oracle Kuassi Mensah Dir Product Management Oracle Starts at 10 am ET Martin Schmitter Solution Architect Database RWE Supply & Trading
  • 2.
    2 Copyright ©2020, Oracle and/or its affiliates | Confidential: Internal/Restricted/Highly Restricted [Date] Kuassi Mensah Director Product Management Java DB connectivity (Sync, Async, Reactive) MicroServices, Zero downtime Database as Hadoop datasource @kmensah https://medium.com/@kuassimensah Martin Schmitter Solution Architect - Database Martin is of the generation of Commodore 64 IT professional, curious of all kinds of technology. Paul Parkinson Microservices Platform Developer Data and Transaction Processing Dev Lead, Helidon Microservices Cloud Platform @paulparkinson https://medium.com/@paul.parkinson
  • 3.
    1. Data DrivenMicroservices Architecture (Kuassi Mensah) 2. Real life Challenges (Martin Schmitter) 3. Example application and flow (Paul Parkinson) 4. Demo and Labs (Paul Parkinson) Copyright © 2019 Oracle and/or its affiliates. Session Agenda Copyright © 2019 Oracle and/or its affiliates.
  • 4.
    Architecture Overview ofData-Centric Microservices Copyright © 2019 Oracle and/or its affiliates.
  • 5.
    General Microservices PlatformRequirements 5 Understand the Platform Requirements (cf Cloud-Native Computing Foundation) • Cloud Infrastructure • Containers – Docker, CRI-O • Orchestration – Kubernetes • Microservices Framework - Helidon • Communication across Microservices • Service Broker – Operators Copyright © 2019 Oracle and/or its affiliates. • Service Mesh • Observability – Tracing, Health Monitoring • Define Microservices within Bounded Contexts • Polyglot Persistence – Convergence DB • Distributed Transaction – Saga Pattern
  • 6.
    Copyright © 2019Oracle and/or its affiliates.6 Oracle Cloud Infrastructure Cloud Native Environment Java Microservices Polyglot MicroservicesTraditional Applications Public Cloud Private Cloud Oracle Linux Cloud Native Environment Service Mesh with Kubernetes/Containers Autonomous Database Exadata Microservices Platform with OCI, Oracle Converged Database and Helidon Monitoring Observability & Tracing OCI API Gateway Service Broker
  • 7.
    Communication across Microservices Confidential– Oracle Internal/Restricted/Highly Restricted 7 • Synchronous • REST or gRPC • Asynchronous • Loose coupling • Immutability • Events/Messages, Pub/Sub, Notification: Event Sourcing
  • 8.
    Events Sourcing Microservices interactby ”sourcing events” from the Event store via the Event Broker • The Event store is the single source of truth (Kafka, AQ/TEQ) • Producers: log events in the Event store then publish a notification • Consumers: notified when Events are published then “read” the Event store Web Server Inventory ServiceOrders Service Publish & Persist Event #1 Notified & Consume Event #1 Event Broker & Event Store Persist State change Event #1 Copyright © 2019 Oracle and/or its affiliates.
  • 9.
    The Service Mesh Kubernetestakes care of containers management, automating application deployment and scaling, but there is still a lot left up to the developer The service mesh = data plane + control plane • Data plane (Envoy): sidecar proxy instances, that perform service discovery, health checking, routing, load balancing, authentication/authorization, and observability. • Control plane (Istio): sets the policy and configuration (e.g., routing table, load balancing policies) to be enacted by all the data plane instances Confidential – Oracle Internal/Restricted/Highly Restricted9 Instead of a direct communication model Sidecar is inserted for every pod/service
  • 10.
    Observability and DistributedTracing Confidential – Oracle Internal/Restricted/Highly Restricted • Observability: continuous logging and tracing across services • Trace, Span, SpanContext, SpanId • OpenTelemetry: OpenTracing + OpenCensus • Kiali, Jaeger, and Grafana stop at the edge of the DB • Looking into end-to-end distributed tracing
  • 11.
    OCI Service Brokerfor Kubernetes Oracle Cloud Infrastructure Add Service Broker to your Kubernetes Cluster Use kubectl to provision and bind to OCI services >kubectl ATP Secret >kubectl Secret App Use kubectl to deploy apps that use the OCI services ADWStream Obj Storage…
  • 12.
    Data-Centric Microservices Application Copyright© 2019 Oracle and/or its affiliates.
  • 13.
    Microservices Data ManagementConsiderations • Polyglot Persistence • Single models versus converged database • Bounded Contexts • Full fledge database per service • PDBs, Shards, PDB Sharding • Shared database • Tables, Schemas • Synchronous or Reactive DB Access • R2DBC, Reactor, RxJava, Akka Streams • Reactive Streams Ingestion • API Composition (Queries) • Front end API Composer queries other services and performs an in-memory join • CQRS 13
  • 14.
    Polyglot Persistence -Oracle Converged Database Multiple Segregated or Joint Data Models for Separated or Mixed Semantics Spatial Graph OLAPNoSQLRelational XML Database Cluster Container PDB 1 PDB 3 PDB 4PDB 2 PDB 5 Converged Database Multi Model Enterprise Grade Operations and Security by Consolidating to Database As A Service Database Cross Model Consistent “Holistic View” of Real Time Production Data
  • 15.
    15 • Areas wherecertain business processes are implemented • Logical boundaries within which terms have non-ambiguous meaning Design microservices within bounded contexts • Services within bounded contexts have local transactions • Map monolithic application modules as services • Split the monolithic database along the lines of bounded contexts Domain Driven Design - Bounded Contexts
  • 16.
    VeggieDash/GrubDash Microservices App •Each service in a container, managed by OKE • Helidon manages liveness and health • PDBs per service (HOLs show two PDBs in ATP #alwaysfreetier) • Event broker built-in to the database (AQ) • Analytics microservice is UI for Ops insights • Delivery microservice has Spatial/Graph optimizations • Order service has the recommendation engine and search with Text data; and the orders are in JSON. • Saga transactions between Order, Inventory, and Delivery service; any one’s failure/unavailability cancels the order Confidential – Gartner ATP-S Order Inventory Delivery JSON TEXT Analytics JSON OKE
  • 17.
    Copyright © 2019Oracle and/or its affiliates. Distributed Transactions - The Saga Pattern Confidential – Oracle Internal/Restricted/Highly Restricted “A saga is a sequence of local transactions (Tx). Each local Tx updates the state (local database) and publishes an event to trigger the next local Tx in the saga. If a local Tx fails then the saga executes a series of compensating (!Tx) that undo the changes that were made by the preceding local Tx” Event Broker & Store Tx1 Tx3Tx2 Send & Persist Event Consume Event Persist State Send & Persist EventPersist State Persist State Consume Event Send & Persist Event Start Saga End Saga https://microservices.io/patterns/data/saga.html Saga includes 3 local transactions
  • 18.
    How Oracle DatabaseAddresses the Saga Challenges • Exactly once message delivery – Oracle/AQ (T.E.Q.) • Execute all steps or remove any effect • => Database transaction support for sagas – coming • Avoid excessive development, maintenance, and testing costs – typically due to compensation • => Compensate-able data support – coming • Higher parallelism • Less venerability to hot-spots – most hot-spots deal with inventory management • Support ‘complex sagas’ e.g., human interactions, multi-party interaction => Oracle workflow Learn more about the coming features during future events.
  • 19.
    Martin will nowdiscuss real life challenges beyond architecture Then, in 10min, Paul will walk you through a Demo and Labs https://bit.ly/2AW1ZSG Copyright © 2019 Oracle and/or its affiliates.19
  • 20.
    Real world challengesof Microservices in DevOps environments Database House Party #2
  • 21.
    Real world challengesof Microservices in DevOps environments 25.06.202021 Martin Schmitter, Solutions Architect - Database § Information Scientist, application development, Jan 2001 § ~20y in professional IT (~30y non-professional) § HAM radio amateur (14y) § My first Oracle version = v7.3 § Cisco Certified Network Associate – CCNA (2002-2005) § DOAG member >2010 § Working with RWE Supply & Trading GmbH >2015 § Local Representative DOAG Regio NRW >2016 § Oracle ACE Associate >2019 #whoami
  • 22.
    Safe Harbour Statement •All statements are representing my opinion and will not represent or reflect any strategy, direction or architecture of any company I am working with. • All statements are made in general purpose, based on my own observations and personal experience and will not be specific to an enterprise, project or an individual. Real world challenges of Microservices in DevOps environments 25.06.202022
  • 23.
    Self-conception of having full freedomto chose the best tool for a given task Microservices and DevOps
  • 24.
    Authentication, Authorization andMonitoring Heterogenous tools and services will lead to complexity in authentication and authorization: • How to make sure authentication works over all services? • Is every database engine able to provide the detail of authorization we need (e.g. row level)? • Do the service have all the necessary interfaces to work with (the) one identity and privilege management system? • How to audit access and collect logs for distributed transactions over multiple (data) services? Real world challenges of Microservices in DevOps environments 25.06.202024
  • 25.
    Data Privacy andProtection If data sets are distributed over multiple database engines with different database types, how do you manage… • … the right of access, … of accuracy, … right to erasure? • … to assure that just allowed data is stored in an accurate way? • schema on write vs. schema on read • … all financial tax relevant data is known and can be provided (e.g. German GDPdU/GoBD) • … to be aware of your data? Real world challenges of Microservices in DevOps environments 25.06.202025
  • 26.
    IT product onboardingand allow lists IT products like (cloud) services, tools and engines to build your microservice need to be onboarded and allowed: • In big organizations a new product, vendor or supplier must bypass certain approval steppes, before you can make use of them: • E.g.: Workers council, compliance, security, data protection law, risk assessment, business continuity management, standardization and integration in your major incident system. • This might become a very time consuming and expensive exercise contradicting the idea of providing quick to market isolated best-of-breed tools for your microservices. Especially if you need to restart the process on every major update. • A consolidation approach, using multi-purpose solutions and products might become famous again. Real world challenges of Microservices in DevOps environments 25.06.202026
  • 27.
    What is yourbest practices to deal with this?
  • 28.