Local Dev Setup
Datomic is a distributed system. Storage services, transactors, peers, peer servers, and clients are designed so that load on one process has minimal impact on other processes (while delivering on Datomic's semantic promises).
As a convenience for development, you can 'undistribute' Datomic by running more than one process on the same virtual or physical hardware, running storage, transactor, and peer on a developer laptop.
Please note that 'development mode' cannot deliver the reliability or performance of a production deployment, since it takes place on a single machine. Processes are competing for a single resource, and that single resource is a single point of failure. A single machine failure brings all processes down.
The steps for running a local 'development mode' of Datomic, using the Peer library include:
All steps in this process assume you're running commands from the root of the unzipped Datomic distribution.
Throughout this tutorial, shell commands are run from the root directory of the Datomic distribution. This will be the version qualified directory name. For example:
The bin directory contains executable scripts for launching a REPL, installing the peer library locally, running a transactor, etc. It also contains storage configuration scripts.
For this example, we will use a local in-memory database, which does not require a transactor to run. For steps on running a transactor please see Running a dev transactor.
This guide can be followed by using a local in-memory database, or with your data persisted to local storage.
The in-memory (
mem) database does not require any special configuration, only a db-uri of
The rest of the tutorial assumes that you will be using
mem storage unless you wish to run a transactor
dev storage to persist your changes to disk.
Integrating Peer Library
The Peer library must be on the classpath to be used to interact with Datomic.
Run the included REPL
The transactor which was started earlier will need to continue running. Run your REPL in another terminal window.