ABOUT DATOMIC
• Developed by Cognitect
• Initial release 2012
• Designed by Rich Hickey
(author of the Clojure
programming language)
• Used by Facebook, Netflix,
more…
Slide 4
Slide 4 text
FACTS ✅
Slide 5
Slide 5 text
FACTS
• “Abraham Lincoln is the
president of the United
States”
Slide 6
Slide 6 text
FACTS
• “Abraham Lincoln is the
president of the United
States”
• “Abraham Lincoln was
elected president of the
United States on March 4,
1861”
Slide 7
Slide 7 text
FACTS
• Abraham Lincoln
• Position
• President
• March 4, 1861
Entity
Attribute
Value
Timestamp
FACT BASED MODEL
Facts
Facts
Facts
Facts
Facts
Facts
Facts
Facts
Time
Facts
Facts
Time
Slide 13
Slide 13 text
GIT
Facts
Facts
Facts
Facts
Objects
Facts
Facts
Objects
Time
Facts
Objects
Time
Slide 14
Slide 14 text
A DATABASE
• A collection of datoms
• At a specific point in time
• An immutable value
Slide 15
Slide 15 text
DATABASE AS A VALUE
• Same as 42 is a value
• Safe to share, easy to reason about
• Functions that take a database as an argument, or
return a database
Slide 16
Slide 16 text
TIME BUILT IN
• Get the database value as of,
or since, a point in time
• See how the database would
have looked like as if certain
transactions took place
• Reactive transaction reports
Slide 17
Slide 17 text
QUERIES
Slide 18
Slide 18 text
DATALOG
• Equivalent to relational model + recursion
• Declarative, expressive and powerful
• Pattern matching style
• No more string concatenation!
Peer
library
Your app
cache
Peer
library
Your app
cache
Peer
library
Your app
cache
SHARED MEMCACHED
Transactor Storage
Memcached
Slide 48
Slide 48 text
EVENT SOURCING?
• Datomic is lower level - facts vs events
• Annotate transactions!
• Querying already built in
• Listen on transaction queue to build reactive
systems
Slide 49
Slide 49 text
Q&A
Slide 50
Slide 50 text
RESOURCES
• http://www.datomic.com/
• Intro to Datomic by Rich Hickey -
http://wix.to/b8CQABU
• The Value of Values by Rich Hickey -
http://wix.to/D8CRABU
• Datomic Datalog - http://wix.to/cMCQABU