intro to datomic
play

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


  1. Intro to Datomic datomic.com @stuartsierra thinkrelevance.com

  2. What is Datomic?

  3. What is Datomic? • A new database • Distributed reads • ACID transactions

  4. What is Datomic? • Non-relational data model • Incorporates time • Declarative query language

  5. Where can I use it? • Runs on the JVM • Peer library: Java and Clojure • ReST -ful API for non-JVM languages

  6. Datomic Free Edition • Always free, redistributable • 1 transactor , up to 2 peers • Local memory or filesystem storage • Easy migration to Datomic Pro

  7. Datomic Pro Edition • License by number of peers • High-availability transactor • Multiple distributed storage services • Integrated memcached

  8. Data Model

  9. Fact • One piece of information • About one thing • At a specific point in time • An immutable value

  10. Database • A collection of facts • At a specific point in time • An immutable value

  11. Entity • A collection of facts about one thing • Can be viewed as a map • Traversable as a graph

  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

  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

  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

  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

  16. Datomic Architecture

  17. Datomic Components Peer Library Transactor Storage Service

  18. Peer Library Your Application • Included in your app Peer • Executes queries locally Library Transactor Storage Service

  19. Peer Library Your Application • Reads data from storage Peer • Caches locally Library cache Transactor Storage Service

  20. Scale Horizontally Your Application Your Application Your Application Peer Peer Peer Library Library Library cache cache cache Transactor Storage Service

  21. Transactor Your Application Peer Library • Standalone system • Scales vertically Transactor Storage Service

  22. Transactor Your Application Peer Library • Standalone system • Hot standby for failover Transactor Storage Service

  23. Transactor Your Application Peer Library • Coordinates writes • Guarantees ACID transactions Transactor Storage Service

  24. Transactor Your Application Peer Library • Writes transaction log to storage • Generates indexes Transactor Storage Service

  25. Transactor Your Application Your Application Your Application Peer Peer Peer Library Library Library cache cache cache • Broadcasts live updates Transactor Storage Service

  26. Storage Your Application Peer Library • Provided as a service • Many different back-ends Transactor Storage Service

  27. Local Storage Your Application Peer Library • Memory • Filesystem Transactor Storage Service

  28. Nearby Storage Your Application Peer Library • SQL database PostgreSQL Transactor Storage Service

  29. Distributed Storage Your Application • DynamoDB Peer • Infinispan Library • Riak • Couchbase Transactor Storage Service

  30. Datomic Components Your Application Your Application Your Application Peer Peer Peer Library Library Library Transactor Storage Service

  31. ACID Writes Your Application Your Application Your Application Peer Peer Peer Library Library Library Transactions Transactor Storage Service Transactions & Indexes

  32. Live Updates Your Application Your Application Your Application Peer Peer Peer Library Library Library Live updates Transactor Storage Service

  33. Distributed Reads Your Application Your Application Your Application Peer Peer Peer Library Library Library Reads Transactor Storage Service

  34. Local Caches Your Application Your Application Your Application Peer Peer Peer Library Library Library cache cache cache Reads Transactor Storage Service

  35. Shared Memcached Your Application Your Application Your Application Peer Peer Peer Library Library Library cache cache cache Reads Memcached Transactor Storage Service

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

Recommend


More recommend