Top Banner
An Actor Database System for Akka Frederic Schneider, Sebastian Schmidl {frederic.schneider, sebastian.schmidl}@student.hpi.de
20

An Actor Database System for Akka - btw.informatik.uni ... · Akka: Actor Supervision Each Actor has parent, gets notified on any failure, can handle it No need to think about each

Oct 31, 2019

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: An Actor Database System for Akka - btw.informatik.uni ... · Akka: Actor Supervision Each Actor has parent, gets notified on any failure, can handle it No need to think about each

An Actor Database System for Akka

Frederic Schneider, Sebastian Schmidl

{frederic.schneider, sebastian.schmidl}@student.hpi.de

Page 2: An Actor Database System for Akka - btw.informatik.uni ... · Akka: Actor Supervision Each Actor has parent, gets notified on any failure, can handle it No need to think about each

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

Page 3: An Actor Database System for Akka - btw.informatik.uni ... · Akka: Actor Supervision Each Actor has parent, gets notified on any failure, can handle it No need to think about each

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

Page 4: An Actor Database System for Akka - btw.informatik.uni ... · Akka: Actor Supervision Each Actor has parent, gets notified on any failure, can handle it No need to think about each

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

Page 5: An Actor Database System for Akka - btw.informatik.uni ... · Akka: Actor Supervision Each Actor has parent, gets notified on any failure, can handle it No need to think about each

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

Page 6: An Actor Database System for Akka - btw.informatik.uni ... · Akka: Actor Supervision Each Actor has parent, gets notified on any failure, can handle it No need to think about each

Actor Programming

Frederic Schneider, Sebastian Schmidl, 2019-03-05

An Actor Database System for Akka

Chart 6

State

Actor =

Behavior+

Page 7: An Actor Database System for Akka - btw.informatik.uni ... · Akka: Actor Supervision Each Actor has parent, gets notified on any failure, can handle it No need to think about each

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

Page 8: An Actor Database System for Akka - btw.informatik.uni ... · Akka: Actor Supervision Each Actor has parent, gets notified on any failure, can handle it No need to think about each

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

Page 9: An Actor Database System for Akka - btw.informatik.uni ... · Akka: Actor Supervision Each Actor has parent, gets notified on any failure, can handle it No need to think about each

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()

Page 10: An Actor Database System for Akka - btw.informatik.uni ... · Akka: Actor Supervision Each Actor has parent, gets notified on any failure, can handle it No need to think about each

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()

Page 11: An Actor Database System for Akka - btw.informatik.uni ... · Akka: Actor Supervision Each Actor has parent, gets notified on any failure, can handle it No need to think about each

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()

Page 12: An Actor Database System for Akka - btw.informatik.uni ... · Akka: Actor Supervision Each Actor has parent, gets notified on any failure, can handle it No need to think about each

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

Page 13: An Actor Database System for Akka - btw.informatik.uni ... · Akka: Actor Supervision Each Actor has parent, gets notified on any failure, can handle it No need to think about each

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

Page 14: An Actor Database System for Akka - btw.informatik.uni ... · Akka: Actor Supervision Each Actor has parent, gets notified on any failure, can handle it No need to think about each

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

Page 15: An Actor Database System for Akka - btw.informatik.uni ... · Akka: Actor Supervision Each Actor has parent, gets notified on any failure, can handle it No need to think about each

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

Page 16: An Actor Database System for Akka - btw.informatik.uni ... · Akka: Actor Supervision Each Actor has parent, gets notified on any failure, can handle it No need to think about each

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

Page 17: An Actor Database System for Akka - btw.informatik.uni ... · Akka: Actor Supervision Each Actor has parent, gets notified on any failure, can handle it No need to think about each

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

Page 18: An Actor Database System for Akka - btw.informatik.uni ... · Akka: Actor Supervision Each Actor has parent, gets notified on any failure, can handle it No need to think about each

■ 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

?

Page 19: An Actor Database System for Akka - btw.informatik.uni ... · Akka: Actor Supervision Each Actor has parent, gets notified on any failure, can handle it No need to think about each

AppendixMulti-Dactor Queries → Functors

Frederic Schneider, Sebastian Schmidl, 2019-03-05

An Actor Database System for Akka

Chart 19

Page 20: An Actor Database System for Akka - btw.informatik.uni ... · Akka: Actor Supervision Each Actor has parent, gets notified on any failure, can handle it No need to think about each

AppendixDeclaration of Sequential Functors

Frederic Schneider, Sebastian Schmidl, 2019-03-05

An Actor Database System for Akka

Chart 20