Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation #725

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 55 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,41 +7,52 @@
<a href="https://clojurians.slack.com/archives/CB7GJAN0L"><img src="https://badgen.net/badge/-/slack?icon=slack&label"/></a>
<a href="https://clojars.org/io.replikativ/datahike"> <img src="https://img.shields.io/clojars/v/io.replikativ/datahike.svg" /></a>
<a href="https://circleci.com/gh/replikativ/datahike"><img src="https://circleci.com/gh/replikativ/datahike.svg?style=shield"/></a>
<a href="https://github.com/replikativ/datahike/tree/main"><img src="https://img.shields.io/github/last-commit/replikativ/datahike/main"/></a>
<a href="https://cljdoc.org/d/io.replikativ/datahike"><img src="https://badgen.net/badge/cljdoc/datahike/blue"/></a>
</p>

[Datahike](https://datahike.io) is a durable [Datalog](https://en.wikipedia.org/wiki/Datalog) database
powered by an efficient Datalog query engine. This project started as a port of
[DataScript](https://github.com/tonsky/DataScript) to the
[hitchhiker-tree](https://github.com/datacrypt-project/hitchhiker-tree). All
DataScript tests are passing, but we are still working on the internals. Having
said this we consider Datahike usable for medium sized projects, since DataScript is
very mature and deployed in many applications and the hitchhiker-tree
implementation is heavily tested through generative testing. We are
building on the two projects and the storage backends for the hitchhiker-tree
through [konserve](https://github.com/replikativ/konserve). We would like to
hear experience reports and are happy if you join us.

You can find [API documentation on cljdoc](https://cljdoc.org/d/io.replikativ/datahike) and articles on Datahike on our company's [blog page](https://lambdaforge.io/articles).

[![cljdoc](https://badgen.net/badge/cljdoc/datahike/blue)](https://cljdoc.org/d/io.replikativ/datahike)

We presented Datahike also at meetups,for example at:

- [2021 Bay Area Clojure meetup](https://www.youtube.com/watch?v=GG-S-xrDS5M)
- [2019 scicloj online meetup](https://www.youtube.com/watch?v=Hjo4TEV81sQ).
- [2019 Vancouver Meetup](https://www.youtube.com/watch?v=A2CZwOHOb6U).
- [2018 Dutch clojure meetup](https://www.youtube.com/watch?v=W6Z1mkvqp3g).
[Datahike](https://datahike.io) is a git-like, read-scalable, distributed
[Datalog](https://en.wikipedia.org/wiki/Datalog) database.It expands the
functional *copy-on-write* memory semantics of Clojure to a globally joinable
index space. It is powered by an expressive, flexible and efficient query engine
that runs in-process and can interleave its execution with application logic.
Datahike databases can be joined remotely without any coordination, only access
to the underlying store is needed and database snapshots can be freely hold onto
by readers between queries.

The ability to join different remote databases openly removes the necessity of
any glue code to bring distributed data sources together. Compared to SQL the
Datalog query DSL allows invocation of any Clojure (JVM) function as part of its
queries. Datahike has competitive performance to Datomic and can handle
databases with many millions of entities consisting of billions of Datoms
(triples/facts). It is used in multiple production setups for years and has not
experienced any data losses to our knowledge.

Datahike has a [Java API](./java/src/datahike/java/Datahike.java), can be
natively compiled into a shared library and used from the [command
line](./doc/cli.md) and a [babashka pod](./doc/bb-pod.md). Its ClojureScript
port is work in progress. The goal is to make it easy to bring the Datalog query
engine in whatever runtime environments that need access to your data. It is
also used as a foundation for a next generation [AI simulation
runtime](https://github.com/whilo/simmis/).

Besides the integrated file store different underlying durable stores are supported by Datahike:

- [S3](https://github.com/replikativ/datahike-s3)
- [DynamoDB](https://github.com/replikativ/datahike-dynamodb)
- [JDBC](https://github.com/replikativ/datahike-jdbc)
- [Redis](https://github.com/replikativ/datahike-redis)
- [Google Cloud Storage](https://github.com/The-Literal-Company/datahike-gcs)

Supporting new backends through
[konserve](https://github.com/replikativ/konserve) is low effort, reach out to
our [Clojurians slack channel](https://clojurians.slack.com/archives/CB7GJAN0L)
if you need help.

## Usage

Add to your dependencies:

[![Clojars Project](http://clojars.org/io.replikativ/datahike/latest-version.svg)](http://clojars.org/io.replikativ/datahike)

We provide a small stable API for the JVM at the moment, but the on-disk schema
is not fixed yet. We will provide a migration guide until we have reached a
stable on-disk schema. _Take a look at the ChangeLog before upgrading_.
[![Clojars Project](https://img.shields.io/clojars/v/io.replikativ/datahike.svg)](https://clojars.org/io.replikativ/datahike)

```clojure
(require '[datahike.api :as d])
Expand Down Expand Up @@ -108,18 +119,20 @@ stable on-disk schema. _Take a look at the ChangeLog before upgrading_.
```

The API namespace provides compatibility to a subset of Datomic functionality
and should work as a drop-in replacement on the JVM. The rest of Datahike will
be ported to core.async to coordinate IO in a platform-neutral manner.
and should work as a drop-in replacement on the JVM.

Refer to the docs for more information:

- [babashka pod](./doc/bb-pod.md)
- [backend development](./doc/backend-development.md)
- [benchmarking](./doc/benchmarking.md)
- [garbage collection](./doc/gc.md)
- [cli](./doc/cli.md)
- [contributing to Datahike](./doc/contributing.md)
- [configuration](./doc/config.md)
- [differences to Datomic](./doc/datomic_differences.md)
- [distribution](./doc/distribution.md)
- [entity spec](./doc/entity_spec.md)
- [garbage collection](./doc/gc.md)
- [logging and error handling](./doc/logging_and_error_handling.md)
- [schema flexibility](./doc/schema.md)
- [time variance](./doc/time_variance.md)
Expand All @@ -128,6 +141,16 @@ Refer to the docs for more information:

For simple examples have a look at the projects in the `examples` folder.

## Presentations

We presented Datahike also at meetups, for example at:

- [2021 Bay Area Clojure meetup](https://www.youtube.com/watch?v=GG-S-xrDS5M)
- [2019 scicloj online meetup](https://www.youtube.com/watch?v=Hjo4TEV81sQ).
- [2019 Vancouver Meetup](https://www.youtube.com/watch?v=A2CZwOHOb6U).
- [2018 Dutch clojure meetup](https://www.youtube.com/watch?v=W6Z1mkvqp3g).


## Example Projects

- [Invoice creation](https://gitlab.com/replikativ/datahike-invoice)
Expand Down Expand Up @@ -248,6 +271,6 @@ feature, please let us know.

## License

Copyright © 2014–2023 Konrad Kühne, Christian Weilbach, Chrislain Razafimahefa, Timo Kramer, Judith Massa, Nikita Prokopov, Ryan Sundberg
Copyright © 2014–2025 Konrad Kühne, Christian Weilbach, Chrislain Razafimahefa, Timo Kramer, Judith Massa, Nikita Prokopov, Ryan Sundberg

Licensed under Eclipse Public License (see [LICENSE](LICENSE)).
4 changes: 2 additions & 2 deletions config.edn
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{:org "replikativ"
:lib "datahike"
:version {:major 0
:minor 6}
:version {:major 1
:minor 0}
:git-url "[email protected]:replikativ/datahike.git"

:pom-template "./bb/resources/template/pom.xml"
Expand Down