polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niclas Hedhman <hedh...@gmail.com>
Subject Re: Inconsistency between indexers and stores?
Date Sun, 13 Dec 2015 11:41:30 GMT
I think this is a topic that needs a few brains and a whiteboard.

The "Closest Entity Store" is not a concept that makes sense to me right
now, as we have only worked with Visibility rules.

That said, the query process should in my opinion be very straight forward;
The returned values are ONLY Identities and the Query should use the
UnitOfWork to get() the values from there, and skip any unreachable
entities.

That, in my current understanding, should give the best consistency and be
compatible with pluggable types.

Or are you discussing something completely different?

Niclas
On Dec 13, 2015 18:12, "Kent SĂžlvsten" <kent.soelvsten@gmail.com> wrote:

> Hi
>
> We seem to have som inconsistencies between indexers and entitystores.
>
> When we get() an entity, it is fetched from the EntityStore that is
> "closest" to the corresponding EntityModel.
> When we save an entity, it is persisted in the EntityStore that is
> "closest" to the corresponding EntityModel.
>
> but ...
>
> The EntityStore propagates state to all indexers that are visible *from
> the store*
> When we query, we use the EntityFinder (indexer) that are "closest" to
> *the caller* to ifnd EntityReferences - which are then converted to
> entities.
>
> I believe this inconsistency should be fixed to a more consistent tale.
> Even today it leads to some confusion in multi-module projects - and it
> will get even worse, when we
> (which is the goal for 3.0) add more persistent types.
>
> What I suggest (details should possibly be fleshed out):
>
> When we get() an entity, it is fetched from the EntityStore that is
> "closest" to the corresponding EntityModel.
> When we save an entity, it is persisted in the EntityStore that is
> "closest" to the corresponding EntityModel.
> When we save an entity, the EntityStore notifies the indexer that is
> "closest" to the corresponding EntityModel.
> When we query for entities, we find all model implementing that entity
> type and perform the query against the indexers that are closest to each
> type.
>  - that is, if a type is implemented by more entities, these might not
> all be in the same indexer.
>
> Thoughts?
>
> I know this will not be backwards compatible in all cases - but still
> think we should go for it.
>
> /Kent
>
>
>
>
>
>

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