an actor database system for akka - btw.informatik.uni ... · akka: actor supervision each actor...
TRANSCRIPT
An Actor Database System for Akka
Frederic Schneider, Sebastian Schmidl
{frederic.schneider, sebastian.schmidl}@student.hpi.de
MotivationObject-Relational Impedance Mismatch
Frederic Schneider, Sebastian Schmidl, 2019-03-05
An Actor Database System for Akka
Chart 2
■ Two-tiered system layout for data-centric applications
Data tier
Application / Business logic tier
MotivationObject-Relational Impedance Mismatch
Frederic Schneider, Sebastian Schmidl, 2019-03-05
An Actor Database System for Akka
Chart 3
■ Two-tiered system layout for data-centric applications
■ Object-relational impedance mismatch of data representation in the respective tiers
Data tier
Application / Business logic tier
MotivationObject-Relational Impedance Mismatch
Frederic Schneider, Sebastian Schmidl, 2019-03-05
An Actor Database System for Akka
Chart 4
■ Two-tiered system layout for data-centric applications
■ Object-relational impedance mismatch of data representation in the respective tiers
■ ORM tools are an attempt to solve this challenge…
Data tier
Hibernate, Active Record,
Django ORM
Application / Business logic tier
MotivationObject-Relational Impedance Mismatch
Frederic Schneider, Sebastian Schmidl, 2019-03-05
An Actor Database System for Akka
Chart 5
■ Two-tiered system layout for data-centric applications
■ Object-relational impedance mismatch of data representation in the respective tiers
■ ORM tools are an attempt to solve this challenge…
■ …but they don’t avoid co-locating logic of expensive computations in the data tier
Application / Business logic tier
Data tier
Hibernate, Active Record,
Django ORM
Stored Procedures
Actor Programming
Frederic Schneider, Sebastian Schmidl, 2019-03-05
An Actor Database System for Akka
Chart 6
State
Actor =
Behavior+
Domain Actors
Frederic Schneider, Sebastian Schmidl, 2019-03-05
An Actor Database System for Akka
Chart 7
Data Storage
Dactor =
Business Logic+
→ Dissipates object-relational impedance mismatch
Example Use-Case
Frederic Schneider, Sebastian Schmidl, 2019-03-05
An Actor Database System for Akka
Chart 8
Cast
title
description
release
film_id
star_id name
Star
Film
N
M
role
Example Use-Case
Frederic Schneider, Sebastian Schmidl, 2019-03-05
An Actor Database System for Akka
Chart 9
Cast
title
description
release
film_id
star_id name
Star
Film
N
M
role
Film (film_id)
title description release
star_id name role
FilmInfo
Cast
prepareDisplayInfo()
Frederic Schneider, Sebastian Schmidl, 2019-03-05
An Actor Database System for Akka
Chart 10
Implementation in our Framework
Film (film_id)
star_id name role
title description release
FilmInfo
Cast
prepareDisplayInfo()
Frederic Schneider, Sebastian Schmidl, 2019-03-05
An Actor Database System for Akka
Chart 11
Implementation in our Framework
Film (film_id)
star_id name role
title description release
FilmInfo
Cast
prepareDisplayInfo()
Distributed Actor Database System
Frederic Schneider, Sebastian Schmidl, 2019-03-05
An Actor Database System for Akka
Chart 12
Dactors are an application-defined scaling unit
■ Dactors are strongly encapsulated
■ Dactors can be distributed across multiple runtimes
and / or physical nodes
Frederic Schneider, Sebastian Schmidl, 2019-03-05
An Actor Database System for Akka
Chart 13
Distributed Actor Database SystemPartitioning
film_id title descr. release
1 The Predator … 14.09.2018
2 Mandy … 14.09.2018
3 The Nun … 14.09.2018
Film (3)
title Descr. Release
The Predator … 14.09.2018
star_id name Role
13 BoydHolbrook
QuinnMcKenna
75 OliviaMunn
CaseyBracket
FilmInfo
Cast
prepareDisplayInfo()
Film (2)
title Descr. Release
The Predator … 14.09.2018
star_id name Role
13 BoydHolbrook
QuinnMcKenna
75 OliviaMunn
CaseyBracket
FilmInfo
Cast
prepareDisplayInfo()
Film (1)
title Descr. Release
The Predator … 14.09.2018
star_id name Role
13 BoydHolbrook
QuinnMcKenna
75 OliviaMunn
CaseyBracket
FilmInfo
Cast
prepareDisplayInfo()
film_id cast_id role
1 13 QuinnMcKenna
1 75 CaseyBracket
… … …
star_id name
13 BoydHolbrook
75 OliviaMunn
… …
Film
Cast Star
EvaluationMemory Overhead Experiments
Frederic Schneider, Sebastian Schmidl, 2019-03-05
An Actor Database System for Akka
Chart 14
0
50
100
150
200
250
0 20 40 60 80 100
Used H
eap S
ize in M
B
Dataset Size in MB
ADBMS Dactors
ADBMS Relations
String Data
EvaluationQuery Performance
Frederic Schneider, Sebastian Schmidl, 2019-03-05
An Actor Database System for Akka
Chart 15
0
20
40
60
80
100
120
Late
ncy in m
s
Number of Dactors (Type A, Type B)
Point Query to Type ADactors
Insert over two Dactors
Conclusion
Frederic Schneider, Sebastian Schmidl, 2019-03-05
An Actor Database System for Akka
Chart 16
Shared runtime for storage and application logic
Large Number of Dactors for data storage feasible
We also investigated…
■ Failure Handling
■ Multi-Dactor Queries
Consistency and transactions missing
Redundant storage due to denormalization
Evaluation of multi-node deployment
Thank you!Questions? Frederic Schneider
Sebastian Schmidl
{frederic.schneider, sebastian.schmidl}@student.hpi.de
Film (film_id)
title description release
star_id name role
FilmInfo
Cast
prepareDisplayInfo()
Cast
title
description
release
film_id
star_id name
Star
Film
N
M
role
~ 500 Byte memory overhead per Dactor
■ Dactor Model eases failure handling
□ What about distributed system, messaging over the network, multiple processes and threads?
■ Single-threaded semantics inside Actors
■ Explicit messaging: we expect failures
■ Akka: Actor Supervision
□ Each Actor has parent, gets notified on any failure, can handle it
□ No need to think about each failure beforehand
Use Actor supervision for failure handling of queries
AppendixFailure Handling
Frederic Schneider, Sebastian Schmidl, 2019-03-05
An Actor Database System for Akka
Chart 18
?
AppendixMulti-Dactor Queries → Functors
Frederic Schneider, Sebastian Schmidl, 2019-03-05
An Actor Database System for Akka
Chart 19
AppendixDeclaration of Sequential Functors
Frederic Schneider, Sebastian Schmidl, 2019-03-05
An Actor Database System for Akka
Chart 20