This document discusses whether and how to build microservices. It includes:
1) Presentations by Sanjay Goil, VP of Product Management at Oracle, and Paul Parkinson, Cloud Platform Dev Lead at Oracle on microservices and building a sample microservices application.
2) Recommendations from Oracle ACEs Guido and Rolando on microservices approaches and modernizing existing SOA architectures for microservices.
3) A discussion of how a converged database can simplify building microservices by supporting messaging, multiple data types, and cloud services.
4) A demo of building a microservices application for a food delivery app using technologies like Helidon and a converged database.
9. Complexity of Lambda and Kappa
• Many technologies
• Multiple data stores
• Copy contagion
– Data copied many times
• Complex and difficult to
maintain
• Skill set is fragmented
9
Apache
Kafka
Web servers
Order service
API/Brokers
Mobile
IoT
Producers
Databases
Oracle
NoSQL
MySQL
GG Kafka
Connector
Mobile App1
Consumers
Search Portal
Ops Dashboards
Realtime
Analytics, Alerts
ML Model
Training
Analytic Reports
Adhoc
ExplorationHadoop data lake
Vertica/Hive
Event and data streams
Pub/Sub
AWS S3
Mobile Platform
ELK Platform
Apache Flink
Transactions
Hadoop Stream Everything
A move from DB + DW Special purpose databases ; Event hub ; Streaming data
10. How do we think about Microservices?
• Application Platform
• Data Platform
• Simplicity of Development, Deployment, Upgrades, Maintenance, Scale,
Cost effectiveness,Agility, …
Oracle Restricted
12. Microservice Approach
Tightly Scoped behind interfaces & highly
decoupled
Polyglot Programming/Persistence => Skills
Own their data != absolutely need their own
database instance!
Communication between services is complex
3 Mechanisms Service can interact: Command &
Query but also Event
Smart Endpoints and Dumb Pipes
Finding the right granularity of a service is
challenging
Really something new?Or just SOA done right?
13. Service 1
Service 2
Service 3
Service 4
Smart Endpoints and Dumb Pipes!
– no complex Integration in the middle!
Integration
X
Service Bus
Service
Orchestration
Service 1
Service 2
Service 3
Service 4
X
X
X
X
19. Multitenant for Efficient,Agile DatabaseClouds
In-Memory for DatabaseAcceleration
Sharding for Hyperscale and Geo Distribution
Native JSON for Document Data
In-Memory Ingest for Fastest IoT
Cloud SQL for integratingObject Store Data Lake
AutoML for simple integrated Machine Learning
Persistent Memory Store for Lowest Latency
BlockchainTables for Preventing Fraud
Spatial and Graph for Mapping and Social Networks
Events forTransactional Event-driven Microservices
And many more …
Oracle Autonomous Database
Converged Features In-Memory
Analytics
Hyperscale
Machine
Learning
Blockchain
Cloud
Integration
{ }
JSON In-Memory
IoT
Spatial Graph
Multitenant
Persistent
Memory
Events
20. Web servers
Order service
API/Brokers
Mobile
IoT
Producers Consumers
Mobile App1
Search Portal
Ops
Dashboards
Realtime
Analytics,
Alerts
ML Model
Training
Analytic
Reports
Adhoc
Exploration
Converged database
with
Event Queues
+
Managed
+
Cloud Scale
Transactions
20
• Microservices support
• Open interfaces
• Easy app building blocks & APIs
• Less to learn, manage, backup,
upgrade, secure
• Self-managing with Autonomous
Database
Database Convergence Simplicity
OCI Object Store
Converged DB
JSON
21. Converged Database Architecture
• Event Queues supports transactional
messaging - microservice state and
events can be persisted by the same
local transaction (not 2 phase commit)
• Simplify development of fault-tolerant
microservices
• Error recovery logic is typically 90% of the
code. And this code is often poorly tested
Confidential – Gartner SAS Day 7/18/2019
compatible
Multimodel PDBs withTransactional EventQueues
Order Inventory Delivery
JSON JSON
JSON
27. Sagas | For Transactions across Microservices
Order
Service
Inventory
Service
Delivery
Service
Kafka or JMS
client API
Kafka or JMS
in DB
VeggieDash
App
HTTP
Begin Saga
1. Place order
(local commit)
2. Check Inventory
(local commit)
3. Delivery Service
(rollback)
4. If all 3 succeed
Commit Saga [Id];
Record overall
booking
Else
Abort Saga [Id]
(Compensation)
End Saga
Transparent TEQ message propagation cross PDBs and CDB
Saga pattern requires compensation code (~80%) | Can we make it simpler ?
We see a proliferation of data streams being generated by applications, devices, web, processes, etc. which need to be processed, stored, analyzed securely and at scale. There are many technologies to address these event streams, but the key is to recognize that event-driven action is the end goal of these event streams. Once can think of event-driven workflows in ERP, CRM, HCM that have event flows, traditionally using JMS messaging or streaming news, sensor data, social media posts to a varied set of subscribers with Apache Kafka.Often there are tough architecture choices for setting up the infrastructure, operating it, tuning it, upgrading it, scaling it. In this talk we present the simplicity of setting up Transactional Event Queues in the Oracle database which brings the best of JMS messaging and Kafka produce/consume with transactions that combine data and events delivered with notifications, ideal to build scalable microservices with a multi-model, multi-tenant architecture