
- Watch the video.
- Read the Cloud docs.
- Read the On-Prem docs.
Today's releases of Datomic Cloud and Datomic On-Prem include two major new features: tuples and database predicates.
Tuples are a new compound data type, small vectors as values. You can use tuples to create multi-attribute unique keys on domain entities. You can also use tuples to optimize queries that otherwise would have to join two or more high-population attributes.
Most Datomic queries return tuples, but sometimes you just want maps. Today's release of the Datomic Cloud client library adds return maps to Datomic datalog. For example, the following query uses the new :keys clause to request maps with :artist and :release keys:
[:find ?artist-name ?release-name
:keys artist release
:where [?release :release/name ?release-name]
[?release :release/artists ?artist]
[?artist :artist/name ?artist-name]]
#{{:artist "George Jones" :release "With Love"}
{:artist "Shocking Blue" :release "Hello Darkness / Pickin' Tomatoes"}
{:artist "Junipher Greene" :release "Friendship"}
...}
Everything gets better when data moves closer to processing. Datomic can extensively cache its immutable data without concern for coordination or invalidation. With the 'valcache' feature in today's Datomic On-Prem release you can use your local SSDs as large, durable per-process caches, on both transactors and peers. Valcache can improve performance, reduce the read load on storage and stay hot across process restarts.