Integrating the Peer Library

This document describes how to integrate the Datomic peer library with your Java or clojure project.

Installing from my.datomic.com

Datomic Pro users can get the Datomic peer library directly from the maven repository hosted at my.datomic.com. See the download and integration instructions by logging into your account at https://my.datomic.com.

Installing into local maven repository

You can install the Datomic peer library in your local maven repository by running the following command from the Datomic distribution's root directory:

bin/maven-install

Using from maven

To include the datomic peer library in a maven based build:

  • replace VERSION in the snippet below with the contents of the VERSION file at the root of this distribution
  • replace EDITION with either 'free' or 'pro' based on which edition you are installing
  • add the modified snippet to the dependencies section of your pom.xml
<dependency>
  <groupId>com.datomic</groupId>
  <artifactId>datomic-EDITION</artifactId>
  <version>VERSION</version>
</dependency>

Using from leiningen

To include the Datomic peer library in a leiningen project:

  • replace VERSION in the snippet below with the contents of the VERSION file at the root of this distribution
  • replace EDITION with either 'free' or 'pro' based on which edition you are installing
  • Then add the snippet to the dependencies section of your project.clj:
;; in collection under :dependencies key
[com.datomic/datomic-EDITION "VERSION"]

Configuring caching

Datomic peers use caching to reduce the load they place on storage. This caching can be configured at two levels: an in-process object cache, and an out-of-process use of memcached. Please see the Caching documentation for more information on cache configuration.