Airomem is Java persistence framework based on Prevayler. The most important features are:
This is achieved because there is no Database. There is only persistence.
I have a lot of positive experience with Prevayler - quite an old project published by Klaus Wuestefeld. Pure Prevayler lacks however some features and is not perfectly safe for inexperienced teams.
Goal of this project is to provide Prevayler based persistence with extra features such as Java 8 Lambda expressions, Kryo based serialization, rich collections (CQEngine) and sanity checks that make Prevayler easier to implement. (Quite honestly Prevayler is perfectly easy to implement, it just does not always work as people expect).
So airomem = Prevayler | safety | tools | lambdas | kryo | build...
Take a look at Features.
Lets assume that system is build without need of persistence. All operations are mode on objects in memory. Instead of SQL queries, objects are traversed and filtered using stream API.
Instead of making INSERTS, UPDATES, transactions, there are only changes on objects in java. There is no Session, no EntityManager, no cache ( oh,wait a moment - everything is cache...), no problems with ORMs, no performance penalties, no DB deadlocks.
Such world exist and is fun to work with. And what is more funny persistence in this world also exists.
There are only two things to do:
- all objects from domain must be serializable (this is typically easy to achieve),
- all operations that change domain must be enclosed in commands.
How simple is that? (Sample Project)
Performance - this thing is insane
This thing must come. How fast is that? Can be more than 1000 times faster than traditional SQL / ORM approach...
In reality one can expect to achive performance of 10 up to 1000 faster compared to DB/ORM approach.
Please read more on: Wiki
Changed to use file sync always. It is slower but safer on some environments.
- Simplified - no longer use Storable interface with getImmutable
- Use Path in API instead of String name of folder
- Transient version for tests
- xml snapshot (import and export)
Migration from 1.0.5
- No more SimpleController (what a stupid name it was :-) ?) - class is called Persistent
- Path instead of Strings as folder names