SlideShare a Scribd company logo
1 of 42
Download to read offline
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 1
Domain Driven Design
and NoSQL
DevCon TLV
2014-06-05
martin Schönert (triAGENS)
TRI-MS-1406-001-V100-20140605
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 2
martin
 Studied mathematics and
investigated algebraic
structures with the computer
 Since then in IT in many roles:
 Programmer
 Project Manager
 Product Owner
 etc.
 These days primarily architect
 Consulting other companies
 For the ArangoDB database
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 3
Project
YAWS
(Yet Another Web Shop)
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 4
Wellcome to the Specification Workshop
 Product managers
talk about what they
expect from the Shop
Site
 ability to browse through
the shop
 powerful search
 with good products at
the top
 rather informal
 all participants are in
high spirits
 no disagreements
The Expert, 2014, Lauris Beinerts
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 5
and so the developers develop
 Object Oriented
 3-tier Architectur
 Model View Controller
 Modern Framework
 Responsive Design
 etc.
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 6
but at handover
of course the
position in the
result list should
depend on the
net margin.
Why are there no
recommendations
Checkout is not
usable!
… but that is
obvious!
Developers are
incompetent!
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 7
what developers think of the business side
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 8
but in fact it is a problem in the system
 functionality is not gathered
methodically
 „obvious“ functions are
missing
 no common language
 misunderstandings about the
details of the functions
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 9
Agile Development helps to
gather functionality methodically
 continous interaction
 Product Backlog
 Stories / Epics
 etc.
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 10
Domain
Driven
Design
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 11
was described by Eric Evans
 Approach to model complex
business oriented software
 centers around the business
logic
 towards this goal you model
the application domain
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 12
Ubiqous Language
 common language
 is used by ALL participants
 is used in ALL phases of the
project
 must be based on the
business logic
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 13
Entities
 have an identity
 two identities are different
even if they have the same
values for all attributes
 Examples
 Persons
 Shopping Cart
 Mutability
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 14
Value Objects
 have no identity of their own
 are only defined by their
attributes
 can be copied (without
changing the semantics)
 Examples:
 Product descriptions
 Immutable (at least from the
business logic view)
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 15
Aggregates
 Collection of entities and value
objects into one transactional
unit
 one entity defines the access
for the aggregate
 the controlled access allows to
maintain the invariants
Session
session-id
last-access
User
name
pw-hash
e-mail
Shopping-Cart
Ubiq
P.K. Dick
Brazil
T. Gilliam
Rain Dogs
T. Waits
Aggregate
Wishlist
Little, Big 25
J. Crowley
In Bruges
M.McDonagh
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 16
Associations
 Relations between entities
and value objects
 can have properties
 are usually inmutable
knows
knows
works-for
knows
send-request
invited
works-for
shares-flat
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 17
Factories
 create complex aggregates,
entities and value objects
 correspond to patterns
 Factory
 Builder
 Prototype
 Example:
 Create an aggregate for a new
user with empty shopping cart and
wish list
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 18
Repository
 Stores entities and aggregates
 Persistence
 corresponds to the bottom layer in
a 3 tier architecture
 Methods for searching
 Example:
 Product Catalog
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 19
Relational
Databases
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 20
in Relational Databases you have
(very special) Relations
not a relation relation
Foreign Key
relational
Algebra
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 21
you have Normal Forms
 Marc Rettig
 Rules of Data Normalization
 orig. published 1989
 (still very useful)
 (how many normal forms are
there: 1NF, 2NF, 3NF, BCNF,
4NF, 5NF, EKNF, DKNF,
6NF, ...)
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 22
what normal form means ...
 our nice objects are taken apart and distributes the pieces over
many tables
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 23
and then you need Joins
 Instructions (Joins) to put the
objects back together again
when you read them
 (Yes - there are joins for other
purposes)
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 24
and then you need Transactions
 Rules (Transactions) so that
nothing gets lost when you
piece the object together
again
 (Yes – there are transactions
for other purposes)
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 25
in short: Database Developers speak their own
language
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 26
NoSQL
Databases
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 27
Recently there has been a development of many
non relational databases: NoSQL
 Conditions for DBs have
changed
 functional requirements
 many simple operations
 non functional requirements
 Volume
 Variety
 Velocity
 hardware
 RAM is cheap
 SSDs
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 28
NoSQL databases are generally classified in
four categories
Key-Value Stores Document Databases
Extended Column Stores Graph Databases
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 29
A new development are the Multi-Model
Databases
Multi-Model Databases
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 30
Key-Value Stores are the simplest data stores
Key ValueKey Value
Key Value2 { name: „paavo“ }
Key Value3 { first: „emil“ }
Key Value„runners“ { ids: [ 1, 2, 3, 5 ] }
Key Value5 { name:„haile“,act:1 }
Key Value1 { first: „paul“ }
Key Value„last“ 5
 Map Keys to Values (dict)
 Access only via the Key
 Values are unstructured
 usually no ability to loop over the
kv-pairs
 e.g. shopping cart
 scales very well
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 31
Document Databases
 Documents are sets of attribute/value
pairs
 Attributes can be structured
 lists, subobjects
 Collections
 external representation usually in
JSON
 e.g. product catalog
{
FirstName:"Jonathan",
Address:"15 Wanamassa Road",
Children:[
{Name:"Michael",Age:10},
{Name:"Jennifer", Age:8},
{Name:"Samantha", Age:5},
{Name:"Elena", Age:2}
],
Job: “Tennis Trainer“
}
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 32
Graph Databases
 Vertices
 usually objects (documents)
 Edges
 connecting two vertices
 directed (from → to)
 with type („knows“, „likes“)
 additional attributes
 e.g. relations between products
 [successor-of], [accessory-for], ..
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 33
Match
between
Domain Driven Design
and
NoSQL Datenbanken
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 34
Entities
 Entity
 Identity
 Complex Structure
 Variance
 document
 every document has its own
identity
 ID or Key Attribut
 structured attributes
 Schemaless
 no EAV neccessary
DDD Document database
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 35
Value Objects
 Value Object
 Inmutability
 document
 or
 Subobject in another
document (Entity oder VO)
 must be implemented on the
application layer
DDD Document database
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 36
Aggregate
 Aggregate
 Central Access
 document with direct
references to other document
 must be implemented on the
application layer
DDD Document database
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 37
Associations
 Association
 type of the association
 further properties
 Access methods based on
the associations
 e.g. recommendations
 Edge between two
documents
 type attribut of the edge
 additional attributes
 Graph algorithms in the
database
 e.g. path search
DDD Graph database
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 38
Repositories
 Repository
 Searching in Repositories
 Collection
 Queries
 using appropriate Indices
DDD NoSQL databases
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 39
Summary
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 40
DDD and Multi-Model-NoSQL-DBs
are made for one another
 A common language used by all participants throughout the
project is critical for the success.
 Domain Driven Design is an approach that demands and supports
such a language.
 Development with relational databases requires a unique
language (and way of approaching modelling).
 Non-relational/NoSQL DBs are modern DBs that fit the changed
constrains of modern software development better.
 There is a direct match between the language of Domain Driven
Design and the concents of NoSQL DBs.
 Multi-Model Databases – that marry document- and graph-models
– give a complete match in a single database.
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 41
triAGENS
Die triAGENS GmbH ist ein Dienstleister im
Bereich komplexer Informationssysteme und
webbasierter Business-Lösungen, mit hohen
Anforderungen an Performance, Skalierbarkeit
und Sicherheit.
triAGENS entwickelt High-Performance-
Datenbanken auf Basis optimierter NoSQL-
Datenbanktechnologien, die u.a. bei der
Deutschen Post zum Einsatz kommen.
The triAGENS GmbH is a service company in
the area of complex IT Systems and web based
business solutions with high requirements on
performance, scalability and security.
triAGENS supplies high performance databases
based on NoSQL database technology, which
are utilized for example by Deutsche Post.
martin Schönert
Geschäftsführer / executive director
m.schoenert@triagens.de
+49 170 8602158
triAGENS GmbH
Hohenstaufenalle 43-45
50674 Köln
www.triagens.de
DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 42
Kontext Projekt oder Bereich
Titel Domain Driven Design und NoSQL
Ablage 70_Praesentationen
ID TRI-MS-1406-001
Verantwortlich martin Schönert / triagens
Leser öffentlich
Sicherheitsein. öffentlich
SchlüsselworteSoftwareentwicklung DDD Evans NoSQL Multi-Model
Schritt Bearbeiter geplant bis Fertigstellung Kommentar
Finale Version m.Schönert 2014-06-05 2014-06-05
Version Datum Bearbeiter Kommentar
V1.00 2014-06-05 m.Schönert Finale Version
Folie Kommentar
- -
Dokumentinformationen
Metainformationen Historie
Bearbeitungsschritte Todos

More Related Content

What's hot

NoSQL and MapReduce
NoSQL and MapReduceNoSQL and MapReduce
NoSQL and MapReduceJ Singh
 
SQL and NoSQL in SQL Server
SQL and NoSQL in SQL ServerSQL and NoSQL in SQL Server
SQL and NoSQL in SQL ServerMichael Rys
 
An introduction to multi-model databases
An introduction to multi-model databasesAn introduction to multi-model databases
An introduction to multi-model databasesBerta Hermida Plaza
 
SQLPASS AD501-M XQuery MRys
SQLPASS AD501-M XQuery MRysSQLPASS AD501-M XQuery MRys
SQLPASS AD501-M XQuery MRysMichael Rys
 
Entity Framework Overview
Entity Framework OverviewEntity Framework Overview
Entity Framework OverviewEyal Vardi
 
Entity Framework Database and Code First
Entity Framework Database and Code FirstEntity Framework Database and Code First
Entity Framework Database and Code FirstJames Johnson
 
Entity Framework - Entity Data Model (edm)
Entity Framework - Entity Data Model (edm)Entity Framework - Entity Data Model (edm)
Entity Framework - Entity Data Model (edm)Eyal Vardi
 
A Seminar on NoSQL Databases.
A Seminar on NoSQL Databases.A Seminar on NoSQL Databases.
A Seminar on NoSQL Databases.Navdeep Charan
 
Chapter 2 Getting Started with CSS
Chapter 2 Getting Started with CSSChapter 2 Getting Started with CSS
Chapter 2 Getting Started with CSSDr. Ahmed Al Zaidy
 

What's hot (20)

NoSQL and MapReduce
NoSQL and MapReduceNoSQL and MapReduce
NoSQL and MapReduce
 
Multi model-databases
Multi model-databasesMulti model-databases
Multi model-databases
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
SQL and NoSQL in SQL Server
SQL and NoSQL in SQL ServerSQL and NoSQL in SQL Server
SQL and NoSQL in SQL Server
 
An introduction to multi-model databases
An introduction to multi-model databasesAn introduction to multi-model databases
An introduction to multi-model databases
 
SQLPASS AD501-M XQuery MRys
SQLPASS AD501-M XQuery MRysSQLPASS AD501-M XQuery MRys
SQLPASS AD501-M XQuery MRys
 
Hibernate
HibernateHibernate
Hibernate
 
Ado .net
Ado .netAdo .net
Ado .net
 
Chap14 ado.net
Chap14 ado.netChap14 ado.net
Chap14 ado.net
 
ASP.NET 09 - ADO.NET
ASP.NET 09 - ADO.NETASP.NET 09 - ADO.NET
ASP.NET 09 - ADO.NET
 
Ado.net
Ado.netAdo.net
Ado.net
 
Entity Framework Overview
Entity Framework OverviewEntity Framework Overview
Entity Framework Overview
 
Entity Framework Database and Code First
Entity Framework Database and Code FirstEntity Framework Database and Code First
Entity Framework Database and Code First
 
NHibernate
NHibernateNHibernate
NHibernate
 
ADO.NET
ADO.NETADO.NET
ADO.NET
 
Entity Framework - Entity Data Model (edm)
Entity Framework - Entity Data Model (edm)Entity Framework - Entity Data Model (edm)
Entity Framework - Entity Data Model (edm)
 
A Seminar on NoSQL Databases.
A Seminar on NoSQL Databases.A Seminar on NoSQL Databases.
A Seminar on NoSQL Databases.
 
Nosql databases
Nosql databasesNosql databases
Nosql databases
 
Ef code first
Ef code firstEf code first
Ef code first
 
Chapter 2 Getting Started with CSS
Chapter 2 Getting Started with CSSChapter 2 Getting Started with CSS
Chapter 2 Getting Started with CSS
 

Similar to Domain Driven Design and NoSQL TLV

TechRadarCon 2022 | Have you built your platform yet ?
TechRadarCon 2022 | Have you built your platform yet ?TechRadarCon 2022 | Have you built your platform yet ?
TechRadarCon 2022 | Have you built your platform yet ?Haggai Philip Zagury
 
ITpreneurs’ DevOps Portfolio- Professionalizing DevOps Skills
ITpreneurs’ DevOps Portfolio- Professionalizing DevOps SkillsITpreneurs’ DevOps Portfolio- Professionalizing DevOps Skills
ITpreneurs’ DevOps Portfolio- Professionalizing DevOps SkillsITpreneurs
 
II-SDV 2014 Insights into a Next Generation IP and R&D Dashboard (Jeroen Klei...
II-SDV 2014 Insights into a Next Generation IP and R&D Dashboard (Jeroen Klei...II-SDV 2014 Insights into a Next Generation IP and R&D Dashboard (Jeroen Klei...
II-SDV 2014 Insights into a Next Generation IP and R&D Dashboard (Jeroen Klei...Dr. Haxel Consult
 
Accelerate DevOps Transformation with App Migration to the Cloud
Accelerate DevOps Transformation with App Migration to the CloudAccelerate DevOps Transformation with App Migration to the Cloud
Accelerate DevOps Transformation with App Migration to the CloudXebiaLabs
 
DevExForPlatformEngineers, introducing Kratix
DevExForPlatformEngineers, introducing KratixDevExForPlatformEngineers, introducing Kratix
DevExForPlatformEngineers, introducing KratixAbigail Bangser
 
Planning for Success in MDD
Planning for Success in MDDPlanning for Success in MDD
Planning for Success in MDDSteven Kelly
 
Metrics driven development 10.09.2014
Metrics driven development   10.09.2014Metrics driven development   10.09.2014
Metrics driven development 10.09.2014Erno Aapa
 
Le cloudvupardesexperts 9pov-curationparloicsimon-clubclouddespartenaires
Le cloudvupardesexperts 9pov-curationparloicsimon-clubclouddespartenairesLe cloudvupardesexperts 9pov-curationparloicsimon-clubclouddespartenaires
Le cloudvupardesexperts 9pov-curationparloicsimon-clubclouddespartenairesClub Alliances
 
What is the importance of dev ops certification
What is the importance of dev ops certificationWhat is the importance of dev ops certification
What is the importance of dev ops certificationJanBask Training
 
State of Drupal keynote, DrupalCon New Orleans
State of Drupal keynote, DrupalCon New OrleansState of Drupal keynote, DrupalCon New Orleans
State of Drupal keynote, DrupalCon New OrleansDries Buytaert
 
How Partners Are Helping Customers with Novell Teaming
How Partners Are Helping Customers with Novell TeamingHow Partners Are Helping Customers with Novell Teaming
How Partners Are Helping Customers with Novell TeamingNovell
 
HLayer / Cloud Native Best Practices
HLayer / Cloud Native Best PracticesHLayer / Cloud Native Best Practices
HLayer / Cloud Native Best PracticesAymen EL Amri
 
Lean SAP Delivery - introducing the concept
Lean SAP Delivery - introducing the conceptLean SAP Delivery - introducing the concept
Lean SAP Delivery - introducing the conceptMendel Koerts
 
Analyst Keynote: TDWI: Data Virtualization as a Data Management Strategy for ...
Analyst Keynote: TDWI: Data Virtualization as a Data Management Strategy for ...Analyst Keynote: TDWI: Data Virtualization as a Data Management Strategy for ...
Analyst Keynote: TDWI: Data Virtualization as a Data Management Strategy for ...Denodo
 
IoT Architecture - are traditional architectures good enough or do we need n...
 IoT Architecture - are traditional architectures good enough or do we need n... IoT Architecture - are traditional architectures good enough or do we need n...
IoT Architecture - are traditional architectures good enough or do we need n...Guido Schmutz
 

Similar to Domain Driven Design and NoSQL TLV (20)

TechRadarCon 2022 | Have you built your platform yet ?
TechRadarCon 2022 | Have you built your platform yet ?TechRadarCon 2022 | Have you built your platform yet ?
TechRadarCon 2022 | Have you built your platform yet ?
 
ITpreneurs’ DevOps Portfolio- Professionalizing DevOps Skills
ITpreneurs’ DevOps Portfolio- Professionalizing DevOps SkillsITpreneurs’ DevOps Portfolio- Professionalizing DevOps Skills
ITpreneurs’ DevOps Portfolio- Professionalizing DevOps Skills
 
II-SDV 2014 Insights into a Next Generation IP and R&D Dashboard (Jeroen Klei...
II-SDV 2014 Insights into a Next Generation IP and R&D Dashboard (Jeroen Klei...II-SDV 2014 Insights into a Next Generation IP and R&D Dashboard (Jeroen Klei...
II-SDV 2014 Insights into a Next Generation IP and R&D Dashboard (Jeroen Klei...
 
DevOps for the DBA- Jax Style!
DevOps for the DBA-  Jax Style!DevOps for the DBA-  Jax Style!
DevOps for the DBA- Jax Style!
 
Accelerate DevOps Transformation with App Migration to the Cloud
Accelerate DevOps Transformation with App Migration to the CloudAccelerate DevOps Transformation with App Migration to the Cloud
Accelerate DevOps Transformation with App Migration to the Cloud
 
DevExForPlatformEngineers, introducing Kratix
DevExForPlatformEngineers, introducing KratixDevExForPlatformEngineers, introducing Kratix
DevExForPlatformEngineers, introducing Kratix
 
Planning for Success in MDD
Planning for Success in MDDPlanning for Success in MDD
Planning for Success in MDD
 
Devops ppt
Devops pptDevops ppt
Devops ppt
 
Metrics driven development 10.09.2014
Metrics driven development   10.09.2014Metrics driven development   10.09.2014
Metrics driven development 10.09.2014
 
Le cloudvupardesexperts 9pov-curationparloicsimon-clubclouddespartenaires
Le cloudvupardesexperts 9pov-curationparloicsimon-clubclouddespartenairesLe cloudvupardesexperts 9pov-curationparloicsimon-clubclouddespartenaires
Le cloudvupardesexperts 9pov-curationparloicsimon-clubclouddespartenaires
 
CV - Manuel_Lara
CV - Manuel_LaraCV - Manuel_Lara
CV - Manuel_Lara
 
What is the importance of dev ops certification
What is the importance of dev ops certificationWhat is the importance of dev ops certification
What is the importance of dev ops certification
 
Cloud Services UX
Cloud Services UXCloud Services UX
Cloud Services UX
 
State of Drupal keynote, DrupalCon New Orleans
State of Drupal keynote, DrupalCon New OrleansState of Drupal keynote, DrupalCon New Orleans
State of Drupal keynote, DrupalCon New Orleans
 
How Partners Are Helping Customers with Novell Teaming
How Partners Are Helping Customers with Novell TeamingHow Partners Are Helping Customers with Novell Teaming
How Partners Are Helping Customers with Novell Teaming
 
HLayer / Cloud Native Best Practices
HLayer / Cloud Native Best PracticesHLayer / Cloud Native Best Practices
HLayer / Cloud Native Best Practices
 
Lean SAP Delivery - introducing the concept
Lean SAP Delivery - introducing the conceptLean SAP Delivery - introducing the concept
Lean SAP Delivery - introducing the concept
 
CustomerCopy
CustomerCopyCustomerCopy
CustomerCopy
 
Analyst Keynote: TDWI: Data Virtualization as a Data Management Strategy for ...
Analyst Keynote: TDWI: Data Virtualization as a Data Management Strategy for ...Analyst Keynote: TDWI: Data Virtualization as a Data Management Strategy for ...
Analyst Keynote: TDWI: Data Virtualization as a Data Management Strategy for ...
 
IoT Architecture - are traditional architectures good enough or do we need n...
 IoT Architecture - are traditional architectures good enough or do we need n... IoT Architecture - are traditional architectures good enough or do we need n...
IoT Architecture - are traditional architectures good enough or do we need n...
 

More from ArangoDB Database

ATO 2022 - Machine Learning + Graph Databases for Better Recommendations (3)....
ATO 2022 - Machine Learning + Graph Databases for Better Recommendations (3)....ATO 2022 - Machine Learning + Graph Databases for Better Recommendations (3)....
ATO 2022 - Machine Learning + Graph Databases for Better Recommendations (3)....ArangoDB Database
 
Machine Learning + Graph Databases for Better Recommendations V2 08/20/2022
Machine Learning + Graph Databases for Better Recommendations V2 08/20/2022Machine Learning + Graph Databases for Better Recommendations V2 08/20/2022
Machine Learning + Graph Databases for Better Recommendations V2 08/20/2022ArangoDB Database
 
Machine Learning + Graph Databases for Better Recommendations V1 08/06/2022
Machine Learning + Graph Databases for Better Recommendations V1 08/06/2022Machine Learning + Graph Databases for Better Recommendations V1 08/06/2022
Machine Learning + Graph Databases for Better Recommendations V1 08/06/2022ArangoDB Database
 
ArangoDB 3.9 - Further Powering Graphs at Scale
ArangoDB 3.9 - Further Powering Graphs at ScaleArangoDB 3.9 - Further Powering Graphs at Scale
ArangoDB 3.9 - Further Powering Graphs at ScaleArangoDB Database
 
GraphSage vs Pinsage #InsideArangoDB
GraphSage vs Pinsage #InsideArangoDBGraphSage vs Pinsage #InsideArangoDB
GraphSage vs Pinsage #InsideArangoDBArangoDB Database
 
Webinar: ArangoDB 3.8 Preview - Analytics at Scale
Webinar: ArangoDB 3.8 Preview - Analytics at Scale Webinar: ArangoDB 3.8 Preview - Analytics at Scale
Webinar: ArangoDB 3.8 Preview - Analytics at Scale ArangoDB Database
 
Graph Analytics with ArangoDB
Graph Analytics with ArangoDBGraph Analytics with ArangoDB
Graph Analytics with ArangoDBArangoDB Database
 
Getting Started with ArangoDB Oasis
Getting Started with ArangoDB OasisGetting Started with ArangoDB Oasis
Getting Started with ArangoDB OasisArangoDB Database
 
Custom Pregel Algorithms in ArangoDB
Custom Pregel Algorithms in ArangoDBCustom Pregel Algorithms in ArangoDB
Custom Pregel Algorithms in ArangoDBArangoDB Database
 
Hacktoberfest 2020 - Intro to Knowledge Graphs
Hacktoberfest 2020 - Intro to Knowledge GraphsHacktoberfest 2020 - Intro to Knowledge Graphs
Hacktoberfest 2020 - Intro to Knowledge GraphsArangoDB Database
 
A Graph Database That Scales - ArangoDB 3.7 Release Webinar
A Graph Database That Scales - ArangoDB 3.7 Release WebinarA Graph Database That Scales - ArangoDB 3.7 Release Webinar
A Graph Database That Scales - ArangoDB 3.7 Release WebinarArangoDB Database
 
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?ArangoDB Database
 
ArangoML Pipeline Cloud - Managed Machine Learning Metadata
ArangoML Pipeline Cloud - Managed Machine Learning MetadataArangoML Pipeline Cloud - Managed Machine Learning Metadata
ArangoML Pipeline Cloud - Managed Machine Learning MetadataArangoDB Database
 
ArangoDB 3.7 Roadmap: Performance at Scale
ArangoDB 3.7 Roadmap: Performance at ScaleArangoDB 3.7 Roadmap: Performance at Scale
ArangoDB 3.7 Roadmap: Performance at ScaleArangoDB Database
 
Webinar: What to expect from ArangoDB Oasis
Webinar: What to expect from ArangoDB OasisWebinar: What to expect from ArangoDB Oasis
Webinar: What to expect from ArangoDB OasisArangoDB Database
 
ArangoDB 3.5 Feature Overview Webinar - Sept 12, 2019
ArangoDB 3.5 Feature Overview Webinar - Sept 12, 2019ArangoDB 3.5 Feature Overview Webinar - Sept 12, 2019
ArangoDB 3.5 Feature Overview Webinar - Sept 12, 2019ArangoDB Database
 
Webinar: How native multi model works in ArangoDB
Webinar: How native multi model works in ArangoDBWebinar: How native multi model works in ArangoDB
Webinar: How native multi model works in ArangoDBArangoDB Database
 
An introduction to multi-model databases
An introduction to multi-model databasesAn introduction to multi-model databases
An introduction to multi-model databasesArangoDB Database
 
Running complex data queries in a distributed system
Running complex data queries in a distributed systemRunning complex data queries in a distributed system
Running complex data queries in a distributed systemArangoDB Database
 

More from ArangoDB Database (20)

ATO 2022 - Machine Learning + Graph Databases for Better Recommendations (3)....
ATO 2022 - Machine Learning + Graph Databases for Better Recommendations (3)....ATO 2022 - Machine Learning + Graph Databases for Better Recommendations (3)....
ATO 2022 - Machine Learning + Graph Databases for Better Recommendations (3)....
 
Machine Learning + Graph Databases for Better Recommendations V2 08/20/2022
Machine Learning + Graph Databases for Better Recommendations V2 08/20/2022Machine Learning + Graph Databases for Better Recommendations V2 08/20/2022
Machine Learning + Graph Databases for Better Recommendations V2 08/20/2022
 
Machine Learning + Graph Databases for Better Recommendations V1 08/06/2022
Machine Learning + Graph Databases for Better Recommendations V1 08/06/2022Machine Learning + Graph Databases for Better Recommendations V1 08/06/2022
Machine Learning + Graph Databases for Better Recommendations V1 08/06/2022
 
ArangoDB 3.9 - Further Powering Graphs at Scale
ArangoDB 3.9 - Further Powering Graphs at ScaleArangoDB 3.9 - Further Powering Graphs at Scale
ArangoDB 3.9 - Further Powering Graphs at Scale
 
GraphSage vs Pinsage #InsideArangoDB
GraphSage vs Pinsage #InsideArangoDBGraphSage vs Pinsage #InsideArangoDB
GraphSage vs Pinsage #InsideArangoDB
 
Webinar: ArangoDB 3.8 Preview - Analytics at Scale
Webinar: ArangoDB 3.8 Preview - Analytics at Scale Webinar: ArangoDB 3.8 Preview - Analytics at Scale
Webinar: ArangoDB 3.8 Preview - Analytics at Scale
 
Graph Analytics with ArangoDB
Graph Analytics with ArangoDBGraph Analytics with ArangoDB
Graph Analytics with ArangoDB
 
Getting Started with ArangoDB Oasis
Getting Started with ArangoDB OasisGetting Started with ArangoDB Oasis
Getting Started with ArangoDB Oasis
 
Custom Pregel Algorithms in ArangoDB
Custom Pregel Algorithms in ArangoDBCustom Pregel Algorithms in ArangoDB
Custom Pregel Algorithms in ArangoDB
 
Hacktoberfest 2020 - Intro to Knowledge Graphs
Hacktoberfest 2020 - Intro to Knowledge GraphsHacktoberfest 2020 - Intro to Knowledge Graphs
Hacktoberfest 2020 - Intro to Knowledge Graphs
 
A Graph Database That Scales - ArangoDB 3.7 Release Webinar
A Graph Database That Scales - ArangoDB 3.7 Release WebinarA Graph Database That Scales - ArangoDB 3.7 Release Webinar
A Graph Database That Scales - ArangoDB 3.7 Release Webinar
 
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?
 
ArangoML Pipeline Cloud - Managed Machine Learning Metadata
ArangoML Pipeline Cloud - Managed Machine Learning MetadataArangoML Pipeline Cloud - Managed Machine Learning Metadata
ArangoML Pipeline Cloud - Managed Machine Learning Metadata
 
ArangoDB 3.7 Roadmap: Performance at Scale
ArangoDB 3.7 Roadmap: Performance at ScaleArangoDB 3.7 Roadmap: Performance at Scale
ArangoDB 3.7 Roadmap: Performance at Scale
 
Webinar: What to expect from ArangoDB Oasis
Webinar: What to expect from ArangoDB OasisWebinar: What to expect from ArangoDB Oasis
Webinar: What to expect from ArangoDB Oasis
 
ArangoDB 3.5 Feature Overview Webinar - Sept 12, 2019
ArangoDB 3.5 Feature Overview Webinar - Sept 12, 2019ArangoDB 3.5 Feature Overview Webinar - Sept 12, 2019
ArangoDB 3.5 Feature Overview Webinar - Sept 12, 2019
 
3.5 webinar
3.5 webinar 3.5 webinar
3.5 webinar
 
Webinar: How native multi model works in ArangoDB
Webinar: How native multi model works in ArangoDBWebinar: How native multi model works in ArangoDB
Webinar: How native multi model works in ArangoDB
 
An introduction to multi-model databases
An introduction to multi-model databasesAn introduction to multi-model databases
An introduction to multi-model databases
 
Running complex data queries in a distributed system
Running complex data queries in a distributed systemRunning complex data queries in a distributed system
Running complex data queries in a distributed system
 

Domain Driven Design and NoSQL TLV

  • 1. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 1 Domain Driven Design and NoSQL DevCon TLV 2014-06-05 martin Schönert (triAGENS) TRI-MS-1406-001-V100-20140605
  • 2. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 2 martin  Studied mathematics and investigated algebraic structures with the computer  Since then in IT in many roles:  Programmer  Project Manager  Product Owner  etc.  These days primarily architect  Consulting other companies  For the ArangoDB database
  • 3. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 3 Project YAWS (Yet Another Web Shop)
  • 4. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 4 Wellcome to the Specification Workshop  Product managers talk about what they expect from the Shop Site  ability to browse through the shop  powerful search  with good products at the top  rather informal  all participants are in high spirits  no disagreements The Expert, 2014, Lauris Beinerts
  • 5. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 5 and so the developers develop  Object Oriented  3-tier Architectur  Model View Controller  Modern Framework  Responsive Design  etc.
  • 6. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 6 but at handover of course the position in the result list should depend on the net margin. Why are there no recommendations Checkout is not usable! … but that is obvious! Developers are incompetent!
  • 7. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 7 what developers think of the business side
  • 8. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 8 but in fact it is a problem in the system  functionality is not gathered methodically  „obvious“ functions are missing  no common language  misunderstandings about the details of the functions
  • 9. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 9 Agile Development helps to gather functionality methodically  continous interaction  Product Backlog  Stories / Epics  etc.
  • 10. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 10 Domain Driven Design
  • 11. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 11 was described by Eric Evans  Approach to model complex business oriented software  centers around the business logic  towards this goal you model the application domain
  • 12. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 12 Ubiqous Language  common language  is used by ALL participants  is used in ALL phases of the project  must be based on the business logic
  • 13. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 13 Entities  have an identity  two identities are different even if they have the same values for all attributes  Examples  Persons  Shopping Cart  Mutability
  • 14. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 14 Value Objects  have no identity of their own  are only defined by their attributes  can be copied (without changing the semantics)  Examples:  Product descriptions  Immutable (at least from the business logic view)
  • 15. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 15 Aggregates  Collection of entities and value objects into one transactional unit  one entity defines the access for the aggregate  the controlled access allows to maintain the invariants Session session-id last-access User name pw-hash e-mail Shopping-Cart Ubiq P.K. Dick Brazil T. Gilliam Rain Dogs T. Waits Aggregate Wishlist Little, Big 25 J. Crowley In Bruges M.McDonagh
  • 16. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 16 Associations  Relations between entities and value objects  can have properties  are usually inmutable knows knows works-for knows send-request invited works-for shares-flat
  • 17. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 17 Factories  create complex aggregates, entities and value objects  correspond to patterns  Factory  Builder  Prototype  Example:  Create an aggregate for a new user with empty shopping cart and wish list
  • 18. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 18 Repository  Stores entities and aggregates  Persistence  corresponds to the bottom layer in a 3 tier architecture  Methods for searching  Example:  Product Catalog
  • 19. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 19 Relational Databases
  • 20. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 20 in Relational Databases you have (very special) Relations not a relation relation Foreign Key relational Algebra
  • 21. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 21 you have Normal Forms  Marc Rettig  Rules of Data Normalization  orig. published 1989  (still very useful)  (how many normal forms are there: 1NF, 2NF, 3NF, BCNF, 4NF, 5NF, EKNF, DKNF, 6NF, ...)
  • 22. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 22 what normal form means ...  our nice objects are taken apart and distributes the pieces over many tables
  • 23. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 23 and then you need Joins  Instructions (Joins) to put the objects back together again when you read them  (Yes - there are joins for other purposes)
  • 24. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 24 and then you need Transactions  Rules (Transactions) so that nothing gets lost when you piece the object together again  (Yes – there are transactions for other purposes)
  • 25. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 25 in short: Database Developers speak their own language
  • 26. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 26 NoSQL Databases
  • 27. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 27 Recently there has been a development of many non relational databases: NoSQL  Conditions for DBs have changed  functional requirements  many simple operations  non functional requirements  Volume  Variety  Velocity  hardware  RAM is cheap  SSDs
  • 28. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 28 NoSQL databases are generally classified in four categories Key-Value Stores Document Databases Extended Column Stores Graph Databases
  • 29. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 29 A new development are the Multi-Model Databases Multi-Model Databases
  • 30. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 30 Key-Value Stores are the simplest data stores Key ValueKey Value Key Value2 { name: „paavo“ } Key Value3 { first: „emil“ } Key Value„runners“ { ids: [ 1, 2, 3, 5 ] } Key Value5 { name:„haile“,act:1 } Key Value1 { first: „paul“ } Key Value„last“ 5  Map Keys to Values (dict)  Access only via the Key  Values are unstructured  usually no ability to loop over the kv-pairs  e.g. shopping cart  scales very well
  • 31. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 31 Document Databases  Documents are sets of attribute/value pairs  Attributes can be structured  lists, subobjects  Collections  external representation usually in JSON  e.g. product catalog { FirstName:"Jonathan", Address:"15 Wanamassa Road", Children:[ {Name:"Michael",Age:10}, {Name:"Jennifer", Age:8}, {Name:"Samantha", Age:5}, {Name:"Elena", Age:2} ], Job: “Tennis Trainer“ }
  • 32. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 32 Graph Databases  Vertices  usually objects (documents)  Edges  connecting two vertices  directed (from → to)  with type („knows“, „likes“)  additional attributes  e.g. relations between products  [successor-of], [accessory-for], ..
  • 33. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 33 Match between Domain Driven Design and NoSQL Datenbanken
  • 34. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 34 Entities  Entity  Identity  Complex Structure  Variance  document  every document has its own identity  ID or Key Attribut  structured attributes  Schemaless  no EAV neccessary DDD Document database
  • 35. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 35 Value Objects  Value Object  Inmutability  document  or  Subobject in another document (Entity oder VO)  must be implemented on the application layer DDD Document database
  • 36. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 36 Aggregate  Aggregate  Central Access  document with direct references to other document  must be implemented on the application layer DDD Document database
  • 37. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 37 Associations  Association  type of the association  further properties  Access methods based on the associations  e.g. recommendations  Edge between two documents  type attribut of the edge  additional attributes  Graph algorithms in the database  e.g. path search DDD Graph database
  • 38. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 38 Repositories  Repository  Searching in Repositories  Collection  Queries  using appropriate Indices DDD NoSQL databases
  • 39. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 39 Summary
  • 40. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 40 DDD and Multi-Model-NoSQL-DBs are made for one another  A common language used by all participants throughout the project is critical for the success.  Domain Driven Design is an approach that demands and supports such a language.  Development with relational databases requires a unique language (and way of approaching modelling).  Non-relational/NoSQL DBs are modern DBs that fit the changed constrains of modern software development better.  There is a direct match between the language of Domain Driven Design and the concents of NoSQL DBs.  Multi-Model Databases – that marry document- and graph-models – give a complete match in a single database.
  • 41. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 41 triAGENS Die triAGENS GmbH ist ein Dienstleister im Bereich komplexer Informationssysteme und webbasierter Business-Lösungen, mit hohen Anforderungen an Performance, Skalierbarkeit und Sicherheit. triAGENS entwickelt High-Performance- Datenbanken auf Basis optimierter NoSQL- Datenbanktechnologien, die u.a. bei der Deutschen Post zum Einsatz kommen. The triAGENS GmbH is a service company in the area of complex IT Systems and web based business solutions with high requirements on performance, scalability and security. triAGENS supplies high performance databases based on NoSQL database technology, which are utilized for example by Deutsche Post. martin Schönert Geschäftsführer / executive director m.schoenert@triagens.de +49 170 8602158 triAGENS GmbH Hohenstaufenalle 43-45 50674 Köln www.triagens.de
  • 42. DevCon TLV | © 2014 triAGENS GmbH | 2014-06-05 42 Kontext Projekt oder Bereich Titel Domain Driven Design und NoSQL Ablage 70_Praesentationen ID TRI-MS-1406-001 Verantwortlich martin Schönert / triagens Leser öffentlich Sicherheitsein. öffentlich SchlüsselworteSoftwareentwicklung DDD Evans NoSQL Multi-Model Schritt Bearbeiter geplant bis Fertigstellung Kommentar Finale Version m.Schönert 2014-06-05 2014-06-05 Version Datum Bearbeiter Kommentar V1.00 2014-06-05 m.Schönert Finale Version Folie Kommentar - - Dokumentinformationen Metainformationen Historie Bearbeitungsschritte Todos