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.
This "Getting Started" guide uses the Peer library. The setup process for using the Client library and Peer Servers is different.
The steps for running a local 'development mode' of Datomic, using the Peer library include:
- Obtaining a Datomic Starter or Datomic Pro license
- Running a Transactor using the dev storage protocol
- Integrate the Peer library in your project
All steps in this process assume you're running commands from the root of the unzipped Datomic distribution.
This guide requires Datomic Starter or Datomic Pro. If you do not yet have Datomic, please visit My Datomic to register and download Datomic Starter.
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.
Follow the instructions to setup your project or run your REPL with the included script in your Datomic pro distribution.
Run the included REPL
The transactor which was started earlier will need to continue running. Run your REPL in another terminal window.
Now that you have configured a project to use Datomic you can choose your storage.
- Run a transactor and use
- Continue the tutorial using