You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@polygene.apache.org by Niclas Hedhman <ni...@hedhman.org> on 2017/05/12 06:52:02 UTC

New persistence format

I am looking at the new persistence format, and made an observation that I
never did before, probably too long ago the exact format was of interest or
was never there...

All the changes that are written out, all receives the same "version".
Which means that the (in theory) people can audit what changes were grouped
together. Now, since history is overwritten, this is lost, but eventually
that should be fixed, and keeping all history should be optional, in which
case full transparency is possible.

Now, the "UseCase" that triggered the change is not captured, but it should
be quite easy to add such feature, simply storing UseCase name, time,
metainfo (if any) and "version" as a separate entity. I think such thing
could be made simply by adding a SideEffect on the EntityStore and we
should perhaps provide that as standard feature. Because, with metainfo on
Usecases, that could in capture REST API paths and arguments, incl the
person logged in. I.e. getting loads of audit for very little effort.

Just saying...

Cheers
-- 
Niclas Hedhman, Software Developer
http://polygene.apache.org - New Energy for Java

Re: New persistence format

Posted by Paul Merlin <pa...@apache.org>.
Niclas Hedhman a écrit :
> I am looking at the new persistence format, and made an observation that I
> never did before, probably too long ago the exact format was of interest or
> was never there...
>
> All the changes that are written out, all receives the same "version".
> Which means that the (in theory) people can audit what changes were grouped
> together. Now, since history is overwritten, this is lost, but eventually
> that should be fixed, and keeping all history should be optional, in which
> case full transparency is possible.
>
> Now, the "UseCase" that triggered the change is not captured, but it should
> be quite easy to add such feature, simply storing UseCase name, time,
> metainfo (if any) and "version" as a separate entity. I think such thing
> could be made simply by adding a SideEffect on the EntityStore and we
> should perhaps provide that as standard feature. Because, with metainfo on
> Usecases, that could in capture REST API paths and arguments, incl the
> person logged in. I.e. getting loads of audit for very little effort.
>
> Just saying...
>
> Cheers

Or a side effect on UoW that creates the entity holding the UseCase and
its meta-info for the UoW. That could be added in 3.1.

But for the full effect one needs historical data ... or event sourcing
.. mmm