Skip to content

Instantly share code, notes, and snippets.

@naoyamakino
Created May 2, 2013 18:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save naoyamakino/5504109 to your computer and use it in GitHub Desktop.
Save naoyamakino/5504109 to your computer and use it in GitHub Desktop.
Datomic, from Ruby, from Rails via @yokolet #railsConf
Diametric gem https://github.com/relevance/diametric
- ActiveModel wrapper of Datomic. MRI via REST service. Jruby via REST service
Datomic is via Rich Hickey, newSql database.
ACID (atomicity, consistency, Isolation, Durability) guranteed.
- has idea of simplicity
- datomics schema, - Array of Hash
- data: array of hash
- query - array in array
- data is immutable
RDBMS: designed based on assumption that resource was limited
Datomic: resources are not limited
immutable: data is a fact, fact never changes. facts are always "added"
Datomic has an idea of time: DB of an hour ago, month ago... can rollback.
Do more on the programming side: query engine is on the programming side.
Gem:
Datomic schema vs model definition
transaction data vs an instance
query = Datomic::Query.new(Person).where(:name => "Clinton Dreisbach").filter(:>, :iq, 150)
example: https://github.com/relevance/diametric/wiki/Seattle-Example
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment