SlideShare a Scribd company logo
Data-Oriented
Architecture
Eyas Sharaiha <hello@eyas.sh>
Jun 23, 2021
by Paul Downey via Flickr
Agenda
Setting Context
Common Approaches
Monolithic Architecture
Service-Oriented Architecture (SOA)
Drawbacks of SOA
Data Oriented Architecture
(DOA)
Definition
Theory
Trade-offs
Data-Oriented
Architecture
(DOA) & Me
System Architecture vs Software
Design
For the purposes of this talk:
• System Architecture: Design & principles of
• … entire system of programs
• … usually in the backend
• Software Design: Design & principles of
• … single programs
Our Running Example: Trading
System
• You are a large financial institution that offers your clients to
place orders to trade
Consolidated
Prices
Place Order
Trade Confirm
Prices
Place Order
Trade Confirm
Prices
Place Order
Trade Confirm
Prices
Place Order
Trade Confirm
Monolithic Architecture
Monolithic Architecture
• In many ways, the “default” architecture
• ~1 back-end program does everything
• … fetches data from 1 or more database
Monolithic Architecture
• Monolithic Architecture is not always a mess!
• The monolithic program can
• … be well designed
• … impose separation of concerns
• … be modularized/componentized
• But, there’s no forced API boundary
• … except between:
• … client & server, or
• … server & database
API Boundaries in
Monolithic Architecture HTTP, RPC, etc.
SQL, RPC, etc.
Running Example: Monolithic
Architecture
• You are a large financial institution that offers your clients to
place orders to trade
A Single Program
Consolidated
Prices
Place Order
Trade Confirm
Prices
Place Order
Trade Confirm
Prices
Place Order
Trade Confirm
Prices
Place Order
Trade Confirm
Q&A
Monolithic Architecture
Service-Oriented
Architecture
Service-Oriented Architecture
• Organize backend into “Services”
• Services are
• Loosely coupled
• Have a clear API (usually RPC/HTTP interface)
Microservices Architecture
• A type of Service-Oriented Architecture
• Everyone defines it differently
• For me, services are
• … smaller than SOA
• … more isolated than SOA
• When designed well:
• separates concerns at the Service level
API Boundaries
RPC/HTTP
SQL/GraphQL/RPC/etc.
Each service in this diagram must be “addressable”;
individual services must have a URI (or some other path)
to the service it’s calling.
Summary: Properties of SOA
• Each Service defines its own API
• usually exposed as an RPC Interface, or HTTP
API
• Every (callable) Service is Addressable
Summary: Advantages of SOA
• Each Service can be developed &
understood independently
• Since the system is loosely coupled, new
services are free to depend on existing
services
• Easier to Mock with clear API boundary
• Easier to Debug by manually calling &
inspecting individual methods
Running Example: Microservices
• You are a large financial institution that offers your clients to
place orders to trade
Consolidated
Prices
Place Order
Trade Confirm
Prices
Place Order
Trade Confirm
Prices
Place Order
Trade Confirm
Prices
Place Order
Trade Confirm
Bank A
Connector
Bank B
Connector
Bank C
Connector
Customer
Connector
Pricing
Server
Order
Book
Q&A
Service-Oriented
Architecture
When Service-Oriented
Architecture Fails to
Scale
Problems from Addressability
• Every Service needs the address of each
Service it calls
• Splitting a Service requires modification to
all N callers
• Some “Core” services might be depended
on by many others
• Creating an Isolated Sandbox is hard
• Creating separate environments is hard
• Reasoning about data consistency is hard
Problems of Scale
• 𝑂 𝑁2 growth in integration complexity as the number of
components (𝑁) grows
• Complex topology of dependency graph, hard to reason about a
priori
Problems of Scale: Illustrated
• You are a large financial institution that offers your clients to
place orders to trade
Consolidated
Prices
Place Order
Trade Confirm
Prices
Place Order
Trade Confirm
Prices
Place Order
Trade Confirm
Prices
Place Order
Trade Confirm
Bank A
Connector
Bank B
Connector
Bank C
Connector
Customer
Connector
Pricing
Server
Order
Book
Quote
Server
Bank D
Connecto
r
Data-Oriented
Architecture
Data-Oriented Architecture
• Like SOA: organized in
small, loosely-coupled
components
• Unlike SOA:
1. Organized around a
monolithic Data Access
Layer
2. Components are Always
Stateless
3. Component-to-
Component interaction is
minimized
Monolithic Data Access Layer
• In Data Oriented Architecture, effort thinking about APIs
becomes effort thinking about Schema
• All state is data
• All data is inspectable and queryable
Components are Stateless
• In some SOA designs, each Service can have its own DB
• **or set of tables only it looks at
• In DOA, state is data & data is global
Minimized Inter-Component
Interaction
• Rather than RPCs, model state, requests, and results as data
• Communication largely can be moved into the data space
Orders
Trade
Orders
Orders
Prices
Running Example: Data Monolith
Consolidated Prices
Place Order
Trade Confirm
Prices
Place Order
Trade Confirm
Prices
Place Order
Trade Confirm
Prices
Place Order
Trade Confirm
Bank A Connector
Bank B Connector
Bank C
Connector
Customer
Connector
Pricing
Server
Order Book
Data Access Layer (Monolith)
Prices
Table
Prices
Prices
Prices
Prices
Orders
Orders
Orders
Trade
Trade
Trade
Trade
Source Security Bid Price Ask
Price
A EUR/US
D
1.1861 1.1865
A USD/CH
F
0.9226 0.9229
B EUR/US
D
1.1862 1.1864
C USD/JPY 110.21 110.26
Prices
Prices
Target Customer Security Price Status Parent
Order ac1de88a435f EUR/US
D
1.1865 OPEN NULL
Order dac8e87920f3 EUR/US
D
1.1865 FILLED NULL
Order f2ada1bec5c0 EUR/US
D
1.1864 OPEN NULL
A EUR/US
D
1.1864 OPEN <acd7e8>
Orders
Trade
The DOA Trade off
Easier Business Logic, Harder
Schema Design
DOA Scale, Illustrated
Bank D
Connecto
r
Prices
Orders
Trade
Quote
Server
Target Customer Security Typ
e
Size Status
Quoter ac1de88a435f EUR/US
D
Buy 1MM OPEN
Quoter dac8e87920f3 EUR/US
D
Buy 1MM ACCEPT
Quoter f2ada1bec5c0 EUR/US
D
Sell 5MM REJECT
Quote Request
Source Request Price
Quoter <bfe388> 1.1865
Quoter <e9f873> 1.1864
Quoter <00f9e9> 1.1864
Quote
Quote
Request
Quote
Quote
Request
Quote
Prices
Q&A
Data-Oriented Architecture
DOA, In Practice
Knowledge
Graphs
By Fuzheado via Wikipedia (ShareAlike)
Event-Driven Architectures
Is Data-Oriented Architecture just
SOA?
• Sure, but with constraints.
• If you have a SOA system with
• Schema as the primary API,
• Event/Service bus as main method of communication,
• (Almost) no segregated pockets of data
… then you have a Data-Oriented Architecture system
Didn’t you just reinvent ___?
DOA, In Theory
DOA: Theoretical Intuition Building
• Where possible, model business logic as a series of pure data
transformations:
Quote = 𝑓 Quote Request, Price1, Price2, Price3, …
Even further:
• Can your business logic entirely be modeled as a series of Map,
FlatMap, Filter, Reduce, & other Monadic operations?
• In each case, these pure transformations (e.g. 𝑓 above) are a
Component.
DOA: Theoretical Intuition Building,
contd.
• A DOA Component, being free of state, is a function;
transforming
• a bunch of inputs (that it queries or subscribes to), into
• output objects (that it creates/INSERTs)
• with no other side-effects
• Sometimes, a complex operation can be modeled as more than
one component
• thus making intermediate values visible & inspectable
Minimizing RPCs Between
Components
Instead of RPCs between components, DOA encourages:
• Data Request & Response: Can an RPC Request &
Response be meaningfully modeled as data in its own right?
• e.g. Quote Request is a request, and Quote is a response
• Data Events: If one component triggers another when
something (X) happens, can the component instead
meaningfully create an object describing X?
If these approaches are not meaningful, use directly addressable RPCs.
Data-Oriented Architecture
is only sometimes the right
architecture
by Jernej Furman via Flickr
Not for the faint of heart…
• Getting the schema right is hard & time consuming
• DOA is not always the right architecture
When is DOA right?
• Complexity of Integration > Complexity of Schema Design
• Reasoning about Data Isolation
/fin
Follow me around
the Web
https://eyas.sh/
https://blog.eyas.sh/
hello@eyas.sh

More Related Content

PPTX
Customer hub session 1.2 notes
PDF
Bhawani prasad mdm-cdh-methodology
PPTX
Adopting a Canonical Data Model - how to apply to an existing environment wit...
PPTX
L01 Enterprise Application Architecture
PPTX
Canonical data model
PPTX
L07 Oranizing Domain Logic
PDF
agcXML: Organizing the Business Information of Design and Construction
PPT
Software Development Lifecycle
Customer hub session 1.2 notes
Bhawani prasad mdm-cdh-methodology
Adopting a Canonical Data Model - how to apply to an existing environment wit...
L01 Enterprise Application Architecture
Canonical data model
L07 Oranizing Domain Logic
agcXML: Organizing the Business Information of Design and Construction
Software Development Lifecycle

Similar to JOSA TechTalks - Data Oriented Architecture (20)

PPTX
Mucon 2018: Heuristics for Identifying Microservice Boundaries By Erich Eichi...
PPT
Introduction To E Commerce
PPTX
Micro services - Practicalities & things to watch out for
PPTX
Micro services
PPTX
Same Patterns, Different Architectures
PDF
MongoDB Breakfast Milan - Mainframe Offloading Strategies
PDF
Connecting Data in a Data Fabric for Modern Business Analytics
PDF
Software Architecture and Architectors: useless VS valuable
PDF
Which Questions We Should Have
PPT
SOA1-Background.ppt SOFTWARE ORIENTED SERVICES AND ARCHITECTURE
PPTX
Airtel-BML
PDF
From ddd to DDD : My journey from data-driven development to Domain-Driven De...
PPT
When small problems become big problems
PDF
A Case for Outside-In Design
PDF
Solace Singapore User Group: Dell Boomi Presentation
PPTX
Service Architectures at Scale
PPTX
Detailed CloudComputing12February2021.pptx
PPTX
Power_BI_Presentation_01_17 June'23.pptx
PPTX
Master Data Management methodology
PDF
09-01-services-slides.pdf for educations
Mucon 2018: Heuristics for Identifying Microservice Boundaries By Erich Eichi...
Introduction To E Commerce
Micro services - Practicalities & things to watch out for
Micro services
Same Patterns, Different Architectures
MongoDB Breakfast Milan - Mainframe Offloading Strategies
Connecting Data in a Data Fabric for Modern Business Analytics
Software Architecture and Architectors: useless VS valuable
Which Questions We Should Have
SOA1-Background.ppt SOFTWARE ORIENTED SERVICES AND ARCHITECTURE
Airtel-BML
From ddd to DDD : My journey from data-driven development to Domain-Driven De...
When small problems become big problems
A Case for Outside-In Design
Solace Singapore User Group: Dell Boomi Presentation
Service Architectures at Scale
Detailed CloudComputing12February2021.pptx
Power_BI_Presentation_01_17 June'23.pptx
Master Data Management methodology
09-01-services-slides.pdf for educations
Ad

More from Jordan Open Source Association (20)

PPTX
JOSA TechTalks - Machine Learning on Graph-Structured Data
PDF
OpenSooq Mobile Infrastructure @ Scale
PDF
Data-Driven Digital Transformation
PDF
Data Science in Action
PDF
Processing Arabic Text
PDF
JOSA TechTalks - Downgrade your Costs
PDF
JOSA TechTalks - Docker in Production
PPTX
JOSA TechTalks - Word Embedding and Word2Vec Explained
PDF
JOSA TechTalks - Better Web Apps with React and Redux
PDF
JOSA TechTalks - RESTful API Concepts and Best Practices
PDF
Web app architecture
PDF
Intro to the Principles of Graphic Design
ODP
Intro to Graphic Design Elements
PDF
JOSA TechTalk: Realtime monitoring and alerts
PPTX
JOSA TechTalk: Metadata Management
in Big Data
ODP
JOSA TechTalk: Introduction to Supervised Learning
PDF
JOSA TechTalk: Taking Docker to Production
PDF
JOSA TechTalk: Introduction to docker
PDF
D programming language
PDF
A taste of Functional Programming
JOSA TechTalks - Machine Learning on Graph-Structured Data
OpenSooq Mobile Infrastructure @ Scale
Data-Driven Digital Transformation
Data Science in Action
Processing Arabic Text
JOSA TechTalks - Downgrade your Costs
JOSA TechTalks - Docker in Production
JOSA TechTalks - Word Embedding and Word2Vec Explained
JOSA TechTalks - Better Web Apps with React and Redux
JOSA TechTalks - RESTful API Concepts and Best Practices
Web app architecture
Intro to the Principles of Graphic Design
Intro to Graphic Design Elements
JOSA TechTalk: Realtime monitoring and alerts
JOSA TechTalk: Metadata Management
in Big Data
JOSA TechTalk: Introduction to Supervised Learning
JOSA TechTalk: Taking Docker to Production
JOSA TechTalk: Introduction to docker
D programming language
A taste of Functional Programming
Ad

Recently uploaded (20)

PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Encapsulation theory and applications.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Electronic commerce courselecture one. Pdf
PDF
cuic standard and advanced reporting.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Modernizing your data center with Dell and AMD
PPTX
Big Data Technologies - Introduction.pptx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPT
Teaching material agriculture food technology
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Encapsulation theory and applications.pdf
The AUB Centre for AI in Media Proposal.docx
Diabetes mellitus diagnosis method based random forest with bat algorithm
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Electronic commerce courselecture one. Pdf
cuic standard and advanced reporting.pdf
Understanding_Digital_Forensics_Presentation.pptx
Modernizing your data center with Dell and AMD
Big Data Technologies - Introduction.pptx
20250228 LYD VKU AI Blended-Learning.pptx
Encapsulation_ Review paper, used for researhc scholars
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Teaching material agriculture food technology
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Spectral efficient network and resource selection model in 5G networks
Review of recent advances in non-invasive hemoglobin estimation
Per capita expenditure prediction using model stacking based on satellite ima...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf

JOSA TechTalks - Data Oriented Architecture

  • 2. Agenda Setting Context Common Approaches Monolithic Architecture Service-Oriented Architecture (SOA) Drawbacks of SOA Data Oriented Architecture (DOA) Definition Theory Trade-offs
  • 4. System Architecture vs Software Design For the purposes of this talk: • System Architecture: Design & principles of • … entire system of programs • … usually in the backend • Software Design: Design & principles of • … single programs
  • 5. Our Running Example: Trading System • You are a large financial institution that offers your clients to place orders to trade Consolidated Prices Place Order Trade Confirm Prices Place Order Trade Confirm Prices Place Order Trade Confirm Prices Place Order Trade Confirm
  • 7. Monolithic Architecture • In many ways, the “default” architecture • ~1 back-end program does everything • … fetches data from 1 or more database
  • 8. Monolithic Architecture • Monolithic Architecture is not always a mess! • The monolithic program can • … be well designed • … impose separation of concerns • … be modularized/componentized • But, there’s no forced API boundary • … except between: • … client & server, or • … server & database
  • 9. API Boundaries in Monolithic Architecture HTTP, RPC, etc. SQL, RPC, etc.
  • 10. Running Example: Monolithic Architecture • You are a large financial institution that offers your clients to place orders to trade A Single Program Consolidated Prices Place Order Trade Confirm Prices Place Order Trade Confirm Prices Place Order Trade Confirm Prices Place Order Trade Confirm
  • 13. Service-Oriented Architecture • Organize backend into “Services” • Services are • Loosely coupled • Have a clear API (usually RPC/HTTP interface)
  • 14. Microservices Architecture • A type of Service-Oriented Architecture • Everyone defines it differently • For me, services are • … smaller than SOA • … more isolated than SOA • When designed well: • separates concerns at the Service level
  • 15. API Boundaries RPC/HTTP SQL/GraphQL/RPC/etc. Each service in this diagram must be “addressable”; individual services must have a URI (or some other path) to the service it’s calling.
  • 16. Summary: Properties of SOA • Each Service defines its own API • usually exposed as an RPC Interface, or HTTP API • Every (callable) Service is Addressable
  • 17. Summary: Advantages of SOA • Each Service can be developed & understood independently • Since the system is loosely coupled, new services are free to depend on existing services • Easier to Mock with clear API boundary • Easier to Debug by manually calling & inspecting individual methods
  • 18. Running Example: Microservices • You are a large financial institution that offers your clients to place orders to trade Consolidated Prices Place Order Trade Confirm Prices Place Order Trade Confirm Prices Place Order Trade Confirm Prices Place Order Trade Confirm Bank A Connector Bank B Connector Bank C Connector Customer Connector Pricing Server Order Book
  • 21. Problems from Addressability • Every Service needs the address of each Service it calls • Splitting a Service requires modification to all N callers • Some “Core” services might be depended on by many others • Creating an Isolated Sandbox is hard • Creating separate environments is hard • Reasoning about data consistency is hard
  • 22. Problems of Scale • 𝑂 𝑁2 growth in integration complexity as the number of components (𝑁) grows • Complex topology of dependency graph, hard to reason about a priori
  • 23. Problems of Scale: Illustrated • You are a large financial institution that offers your clients to place orders to trade Consolidated Prices Place Order Trade Confirm Prices Place Order Trade Confirm Prices Place Order Trade Confirm Prices Place Order Trade Confirm Bank A Connector Bank B Connector Bank C Connector Customer Connector Pricing Server Order Book Quote Server Bank D Connecto r
  • 25. Data-Oriented Architecture • Like SOA: organized in small, loosely-coupled components • Unlike SOA: 1. Organized around a monolithic Data Access Layer 2. Components are Always Stateless 3. Component-to- Component interaction is minimized
  • 26. Monolithic Data Access Layer • In Data Oriented Architecture, effort thinking about APIs becomes effort thinking about Schema • All state is data • All data is inspectable and queryable
  • 27. Components are Stateless • In some SOA designs, each Service can have its own DB • **or set of tables only it looks at • In DOA, state is data & data is global
  • 28. Minimized Inter-Component Interaction • Rather than RPCs, model state, requests, and results as data • Communication largely can be moved into the data space
  • 29. Orders Trade Orders Orders Prices Running Example: Data Monolith Consolidated Prices Place Order Trade Confirm Prices Place Order Trade Confirm Prices Place Order Trade Confirm Prices Place Order Trade Confirm Bank A Connector Bank B Connector Bank C Connector Customer Connector Pricing Server Order Book Data Access Layer (Monolith) Prices Table Prices Prices Prices Prices Orders Orders Orders Trade Trade Trade Trade Source Security Bid Price Ask Price A EUR/US D 1.1861 1.1865 A USD/CH F 0.9226 0.9229 B EUR/US D 1.1862 1.1864 C USD/JPY 110.21 110.26 Prices Prices Target Customer Security Price Status Parent Order ac1de88a435f EUR/US D 1.1865 OPEN NULL Order dac8e87920f3 EUR/US D 1.1865 FILLED NULL Order f2ada1bec5c0 EUR/US D 1.1864 OPEN NULL A EUR/US D 1.1864 OPEN <acd7e8> Orders Trade
  • 30. The DOA Trade off Easier Business Logic, Harder Schema Design
  • 31. DOA Scale, Illustrated Bank D Connecto r Prices Orders Trade Quote Server Target Customer Security Typ e Size Status Quoter ac1de88a435f EUR/US D Buy 1MM OPEN Quoter dac8e87920f3 EUR/US D Buy 1MM ACCEPT Quoter f2ada1bec5c0 EUR/US D Sell 5MM REJECT Quote Request Source Request Price Quoter <bfe388> 1.1865 Quoter <e9f873> 1.1864 Quoter <00f9e9> 1.1864 Quote Quote Request Quote Quote Request Quote Prices
  • 34. Knowledge Graphs By Fuzheado via Wikipedia (ShareAlike)
  • 36. Is Data-Oriented Architecture just SOA? • Sure, but with constraints. • If you have a SOA system with • Schema as the primary API, • Event/Service bus as main method of communication, • (Almost) no segregated pockets of data … then you have a Data-Oriented Architecture system
  • 37. Didn’t you just reinvent ___?
  • 39. DOA: Theoretical Intuition Building • Where possible, model business logic as a series of pure data transformations: Quote = 𝑓 Quote Request, Price1, Price2, Price3, … Even further: • Can your business logic entirely be modeled as a series of Map, FlatMap, Filter, Reduce, & other Monadic operations? • In each case, these pure transformations (e.g. 𝑓 above) are a Component.
  • 40. DOA: Theoretical Intuition Building, contd. • A DOA Component, being free of state, is a function; transforming • a bunch of inputs (that it queries or subscribes to), into • output objects (that it creates/INSERTs) • with no other side-effects • Sometimes, a complex operation can be modeled as more than one component • thus making intermediate values visible & inspectable
  • 41. Minimizing RPCs Between Components Instead of RPCs between components, DOA encourages: • Data Request & Response: Can an RPC Request & Response be meaningfully modeled as data in its own right? • e.g. Quote Request is a request, and Quote is a response • Data Events: If one component triggers another when something (X) happens, can the component instead meaningfully create an object describing X? If these approaches are not meaningful, use directly addressable RPCs.
  • 42. Data-Oriented Architecture is only sometimes the right architecture by Jernej Furman via Flickr
  • 43. Not for the faint of heart… • Getting the schema right is hard & time consuming • DOA is not always the right architecture
  • 44. When is DOA right? • Complexity of Integration > Complexity of Schema Design • Reasoning about Data Isolation
  • 45. /fin
  • 46. Follow me around the Web https://eyas.sh/ https://blog.eyas.sh/ hello@eyas.sh