There are a number of reasons to do this, first and foremost is that it will now be possible to access Datomic from non-JVM languages.
How does it work?
The command bin/rest will start up a peer which runs as a stand-alone HTTP server. You can access that service from any application using any language and any HTTP library. That's it!
This greatly enhances your architectural options:
So, does this make Datomic client-server?
Yes and no. First off, the 'servers' are themselves peers, so you still get elastic, configuration-free horizontal query scalability by simply starting/stopping more peers. Second, the Datomic model, which substantially mitigates the problems of client-server databases, is faithfully replicated for clients:
- A peer service can serve more than one database, against more than one storage (Pro)
- Clients get the same kind of data-driven API as do peers
- Clients can get repeatable queries, and multiple queries with the same basis
- Clients get the time-travel as-of and since capabilities, raw access to indexes and ranges
- Clients can issue multi-datasource queries, and pass data to query
- Clients can get a push feed of transaction events, via a Server-Sent Events source
Basically, it's just more options. Build full peers in a JVM language or lightweight clients in any language, or any combination.
Do these clients count towards my peer count?
No. The clients do not run the Datomic peer library, and thus do not count. Each REST service process counts as a peer.
Does this work with Datomic Free?
Yes it does.
What's the status of the API?
It's still alpha, as we want to incorporate your feedback.
Are there client libraries for language _______?
Not yet. This is something we hope each language community will help us build.
Where can I get more details?
Check out the REST API docs
We hope you enjoy this new API and the capabilities it affords. As always, we welcome your feedback and input. If you've been on the sidelines waiting for Datomic to come to your favorite language - welcome!