polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niclas Hedhman <nic...@hedhman.org>
Subject Re: Philosophy behind Identity
Date Sat, 02 Jul 2016 22:36:12 GMT
On Sat, Jul 2, 2016 at 11:18 PM, Paul Merlin <paul@nosphere.org> wrote:

> On 2016-06-22 14:45 (+0200), Niclas Hedhman wrote:
> > Entity == "Identity with Value property",
> > versus DTO == "Value with Identity property"
> It makes sense in the DDD mindset but blurs the very definition of
> entities.
> You can persist entities and navigate through their relationships but
> you can't do that with Values.

Well, we allow navigation of Values that has Entity references if there is
an active/valid UnitOfWork.

The underlying driver for me to even visit this basic concept (since Zest
0,1), is that I am looking at direct timeseries support, which is a
specialized case of event sourcing, and also touches on Aggregates,
something that we never managed to solve although it was discussed at
length in 2008.

Right now I am leaning towards redefinition of entities to become;

Entity = Identity + Value + Invariant Constraints + Metadata

Metadata are things like "lastModified", "version", "composite types" and

Pros that I see with this model;
  a. toValue and toEntity conversion becomes magnitudes faster.
  b. Aggregate support is stronger
  c. Historical snapshots becomes trivial to support.

The Cons;
  a. Event Sourcing is not expressed directly in model.
  b. Timeseries doesn't really fit, since it wants "values within
timerange" views.

So, I the jury is still out.


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

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message