On Tue, Dec 28, 2010 at 10:46 AM, Rickard Öberg <[email protected]> wrote:
> The only reason I can think of, for
> architectural reasons, is if you want to do sharding and hence simplify
> routing to the correct server.
>
> So I'm guessing there's some other problem, that is yet to be spelled out,
> that you're facing. Exactly what is it?
Simplified Use-case;
public interface StockDividend
{
void addDividendPoint( String streamName, DividendPoint point );
ManyAssociation<DividendStream> streams();
:
}
For each StockDividend there are a few hundred streams(), but the
"stream names" are known to the user applications via other means and
many streamNames are shared across many StockDividends.
So, now; How do I get from [StockDividend]+streamname to
[DividendStream] ?? There is no identity to DividendStream known to
external systems other than a sub-entity of StockDividend.
I have covered the the options previously... I came to think of one
more; I can require the domain modelers to create 3 layers instead of
two, where the outermost only deals with 'external' to 'internal'
identity translation, but to me that also feels like big hack to get
around...
This is nothing about sharding or anything special. Just that there
are cases when we have external identities, and in case of aggregates
I can use them straight as Entity Identity as well, but often the
external Identity is relative to an aggregate Entity. When that
aggregation is very very small, one can loop through the
ManyAssociation, but already in the dozen a severe penalty hit occurs,
reading in 10s or 100s of more entities than is really necessary. The
system actually knows exactly which one to get at.
Perhaps you are fortunate enough to be able to move internal
identities to external clients. That choice is sometimes/often not
available, a world of external identities exists, and when they are
compounded from several fields Qi4j can't cope, or at least that is my
assertion.
I am bringing up a short-coming that I feel is real, and sense that
you feel it is not real since you leave in a "bounded bubble".
I don't even think that my additional layer of responsibility has any
major additional impact, i.e. I don't write the domain model. I
provide for an application platform where you can drop a domain model
and the environment wires up everything around it so it works. My
developers won't need to know how to assemble Qi4j applications, how
to integrate web views, JAX-WS, JAX-RS and what other interfaces we
decide to support, they don't need to worry about what sharding is,
how messages move across instances, between datacenters and that the
system survives random failures. I take care of that part, in return
they don't bother me with writing the actual domain logic that makes
the money for the company.
As I said, I think even IF I had to do it all myself, I think the
problem still persist, and that the culprit is known as "external
identities".
Cheers
--
Niclas Hedhman, Software Developer
http://www.qi4j.org - New Energy for Java
I live here; http://tinyurl.com/3xugrbk
I work here; http://tinyurl.com/24svnvk
I relax here; http://tinyurl.com/2cgsug
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev