To complete the above answers, I would like to emphasize that immutability and the ability to remember the past are not “magical traits” suitable for several special cases, such as auditing. This is an approach that has several profound advantages over variable cell databases (which make up 99% of databases today). Stuart Halloway demonstrates this in this video: Impedance resistance is our fault .
In my personal opinion, this approach is fundamentally more reasonable conceptually. Having used it for several months, I don’t see Datomic have crazy magical complex abilities, but rather a more natural paradigm without any serious problems that others are facing.
Here are some of the features of Datomic that I find valuable, most of which are included in immutability:
- because reading is not remote, you do not need to create your own requests, such as an expedition by wire. In particular, you can divide the problems into several queries (for example, find the entities that are the input of my query, - answer a business question about these entities - get related data to represent the result)
- The scheme is very flexible without sacrificing the power of the request.
- conveniently integrate your requests into the application programming language.
- Entity API provides you good ORM parts
- the query language is programmable and has primitives for abstraction and reuse (rules, predicates, database functions)
- productivity: authors only interfere with other writers and no one bothers readers. Also a lot of caching.
- ... and yes, several superpowers, such as a journey into the past, speculative recordings or ramified reality.
Regarding when not to use Datomic, here are the current limitations and limitations that I see:
- you must be on the JVM (there is also a REST API, but you lose most of the benefits of IMO)
- not suitable for recording scales, as well as for huge amounts of data
- will not be particularly integrated into the framework, for example, you will not currently find a library that generates CRUD REST endpoints from a Datomic schema
- this is a commercial database
- Since reading occurs during the application process ("Peer"), you must make sure that Peer has enough memory to store all the data needed to pass through the request.
Thus, my very vague and informal answer would be that Datomic is suitable for most non-trivial applications that have written the load reasonably, and you have no problems with the license for the JVM as well.
As an analogy, you can ask yourself the same question for Git compared to other version control systems that are not based on immutability.
Valentin Waeselynck Feb 02 '16 at 2:57 2016-02-02 14:57
source share