Intro to Datomic datomic.com @stuartsierra thinkrelevance.com - - PowerPoint PPT Presentation

intro to datomic
SMART_READER_LITE
LIVE PREVIEW

Intro to Datomic datomic.com @stuartsierra thinkrelevance.com - - PowerPoint PPT Presentation

Intro to Datomic datomic.com @stuartsierra thinkrelevance.com What is Datomic? What is Datomic? A new database Distributed reads ACID transactions What is Datomic? Non-relational data model Incorporates time Declarative


slide-1
SLIDE 1

Intro to Datomic

datomic.com @stuartsierra thinkrelevance.com

slide-2
SLIDE 2

What is Datomic?

slide-3
SLIDE 3

What is Datomic?

  • A new database
  • Distributed reads
  • ACID transactions
slide-4
SLIDE 4

What is Datomic?

  • Non-relational data model
  • Incorporates time
  • Declarative query language
slide-5
SLIDE 5

Where can I use it?

  • Runs on the JVM
  • Peer library:

Java and Clojure

  • ReST
  • ful API for

non-JVM languages

slide-6
SLIDE 6

Datomic Free Edition

  • Always free, redistributable
  • 1 transactor, up to 2 peers
  • Local memory or filesystem storage
  • Easy migration to Datomic Pro
slide-7
SLIDE 7

Datomic Pro Edition

  • License by number of peers
  • High-availability transactor
  • Multiple distributed storage services
  • Integrated memcached
slide-8
SLIDE 8

Data Model

slide-9
SLIDE 9

Fact

  • One piece of information
  • About one thing
  • At a specific point in time
  • An immutable value
slide-10
SLIDE 10

Database

  • A collection of facts
  • At a specific point in time
  • An immutable value
slide-11
SLIDE 11

Entity

  • A collection of facts about one thing
  • Can be viewed as a map
  • Traversable as a graph
slide-12
SLIDE 12

Fact = Datom

Entity Attribute Value Time

21005 :name "Stuart" 400 21005 :nerd-level 6.8 400 21005 :name "Frodo" 421 21005 :nerd-level 9.6 421

slide-13
SLIDE 13

Database as of now

Entity Attribute Value Time

21005 :name "Stuart" 400 21005 :nerd-level 6.8 400 21005 :name "Frodo" 421 21005 :nerd-level 9.6 421

slide-14
SLIDE 14

Database as of t=400

Entity Attribute Value Time

21005 :name "Stuart" 400 21005 :nerd-level 6.8 400 21005 :name "Frodo" 421 21005 :nerd-level 9.6 421

slide-15
SLIDE 15

Database as History

Entity Attribute Value Time

21005 :name "Stuart" 400 21005 :nerd-level 6.8 400 21005 :name "Frodo" 421 21005 :nerd-level 9.6 421

slide-16
SLIDE 16

Datomic Architecture

slide-17
SLIDE 17

Peer Library Storage Service Transactor

Datomic Components

slide-18
SLIDE 18

Your Application

Peer Library Storage Service Transactor

Peer Library

  • Included in your app
  • Executes queries locally
slide-19
SLIDE 19

Your Application

Peer Library Storage Service Transactor

Peer Library

  • Reads data from storage
  • Caches locally

cache

slide-20
SLIDE 20

Your Application

Peer Library Storage Service Transactor

Scale Horizontally

cache

Your Application

Peer Library

Your Application

Peer Library

cache cache

slide-21
SLIDE 21

Your Application

Peer Library Storage Service Transactor

Transactor

  • Standalone system
  • Scales vertically
slide-22
SLIDE 22

Your Application

Peer Library Storage Service Transactor

Transactor

  • Standalone system
  • Hot standby for failover
slide-23
SLIDE 23

Your Application

Peer Library Storage Service Transactor

Transactor

  • Coordinates writes
  • Guarantees ACID transactions
slide-24
SLIDE 24

Your Application

Peer Library Storage Service Transactor

Transactor

  • Writes transaction log to storage
  • Generates indexes
slide-25
SLIDE 25

Storage Service Transactor

Transactor

  • Broadcasts live updates

Your Application

Peer Library

cache

Your Application

Peer Library

Your Application

Peer Library

cache cache

slide-26
SLIDE 26

Your Application

Peer Library Storage Service Transactor

Storage

  • Provided as a service
  • Many different back-ends
slide-27
SLIDE 27

Your Application

Peer Library Storage Service Transactor

Local Storage

  • Memory
  • Filesystem
slide-28
SLIDE 28

PostgreSQL Your Application

Peer Library Storage Service Transactor

Nearby Storage

  • SQL database
slide-29
SLIDE 29

Your Application

Peer Library Storage Service Transactor

Distributed Storage

  • DynamoDB
  • Infinispan
  • Riak
  • Couchbase
slide-30
SLIDE 30

Your Application

Peer Library Storage Service

Your Application

Peer Library

Your Application

Peer Library

Datomic Components

Transactor

slide-31
SLIDE 31

Your Application

Peer Library Storage Service

Transactions Your Application

Peer Library

Your Application

Peer Library

ACID Writes

Transactor

Transactions & Indexes

slide-32
SLIDE 32

Your Application

Peer Library Storage Service

Live updates Your Application

Peer Library

Your Application

Peer Library

Live Updates

Transactor

slide-33
SLIDE 33

Your Application

Peer Library Storage Service

Your Application

Peer Library

Your Application

Peer Library

Distributed Reads

Transactor

Reads

slide-34
SLIDE 34

Your Application

Peer Library Storage Service

Your Application

Peer Library

Your Application

Peer Library

Local Caches

cache cache cache

Transactor

Reads

slide-35
SLIDE 35

Your Application

Peer Library Storage Service

Your Application

Peer Library

Your Application

Peer Library

Shared Memcached

Transactor

Reads

Memcached

cache cache cache

slide-36
SLIDE 36

Datomic.com

  • @datomic_team
  • Google Group “Datomic”
  • @stuartsierra
  • thinkrelevance.com
  • clojure.com