Crux is a general purpose database with graph-oriented bitemporal indexes. Datalog, SQL & EQL queries are supported, and Java, HTTP & Clojure APIs are provided.
Crux follows an unbundled architectural approach, which means that it is assembled from decoupled components through the use of an immutable log and document store at the core of its design. A range of storage options are available for embedded usage and cloud native scaling.
Bitemporal indexing of schemaless documents enables broad possibilities for creating layered extensions on top, such as to add additional transaction, query, and schema capabilities. In addition to SQL, Crux supplies a Datalog query interface that can be used to express complex joins and recursive graph traversals.
Maven coordinates for the Clojars Repository:
<dependency>
<groupId>juxt</groupId>
<artifactId>crux-core</artifactId>
<version>20.09-1.11.0-beta</version>
</dependency>
Crux embraces the transaction log as the central point of coordination when running as a distributed system. Use of a separate document store enables simple eviction of active and historical data to assist with technical compliance for information privacy regulations.
What do we have to gain from turning the database inside out? Simpler code, better scalability, better robustness, lower latency, and more flexibility for doing interesting things with data.
— Martin Kleppmann
This design makes it feasible and desirable to embed Crux nodes directly within your application processes, which reduces deployment complexity and eliminates round-trip overheads when running complex application queries.
Please visit the docs to get started with Crux.
We use Zulip for our main community chat:
Feel free to say hello: crux@juxt.pro
Crux is split across multiple projects which are maintained within this
repository. crux-core
contains the main functional components of Crux along
with interfaces for the pluggable storage components (Kafka, LMDB, RocksDB
etc.). Implementations of these storage options are located in their own
projects.
Project directories are published to Clojars independently so that you can maintain granular dependencies on precisely the individual components needed for your application.
The top-level project ties all the other projects together for convenience whilst working within this repo.
lein sub install
.lein repl
(with --headless
if you're just going to connect to it from your editor).user
namespace, run:
(go)
to start up the dev node(halt!)
to stop it(reset)
to stop it, reload changed namespaces, and restart it(reset-all)
to stop it, reload all namespaces, and restart itcider-ns-refresh
will do all this for you - C-c M-n M-r
, , s x
in SpacemacsConjureRefresh
, see the docs for bindings(user/crux-node)
- you can verify this by calling (crux/status (crux-node))
(in the user
namespace).lein sub install
and a REPL bouncelein sub javac
and a REPL bounce(user/reset)
(or just (reset)
if you're already in the user
ns) should be sufficient.lein sub install
, because of the lein checkouts - all of the tests are in scope here, so things like lein test :only crux.tx-test
should also work.The recommended way of running the full test suite is lein build
.
The test suite relies on the timeout
command line utility, this comes as a default on Linux but isn't preinstalled on MacOS. You can get it with brew install coreutils && echo 'alias timeout=gtimeout' >> ~/.bashrc'
The MIT License (MIT)
Copyright © 2018-2020 JUXT LTD.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
A complete list of compiled dependencies and corresponding licenses is maintained and available on request.
Can you improve this documentation? These fine people already did:
Jon Pither, Jeremy Taylor, James Henderson, Håkan Råberg, Daniel Mason, Michael Bruce, Martin Clausen, Ivan Fedorov, Roxolan0, Malcolm Sparks & Andrea CrottiEdit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close