On Mon, Feb 22, 2010 at 6:07 PM, Jacek Sokulski <[email protected]> wrote:
> We have thought of several aproaches: > 1. replicating data store on our side through event sourcing, but due to > database size (system is collecting up to 500GB data per day) it is probable > not feasible (there are also security issues). Is it possible to receive a stream of changes, which is pre-filtered down to your needs? Even though the main system collects that kind of amounts, it is often the case that your particular sub-domain is only interested in a fraction of that. > 2. to have Qi4j-ish data store on our side but use it as a cache, it is a > bit difficult as there are other systems changing the data as well, so the > data can be invalid very quickly. Well "invalid in time" is a interesting concept, since ALL data is stale at some point in time when you might read it. So, what we do in real-time systems (industrial automation) is figuring out the fastest frequency the data is needed, and then sample twice that speed. So, in an enterprise scenario; if it is a user at the other end, he can probably only consume (depending on app) a small number of changes per second, perhaps even only a minute per change, in which case you only need to ensure 'staleness' better than half the given time. > 3. develop custom Qi4j data store that maps entities to existing database > schema and then use only transient mixins (ones that does not need to > persist state) or use separate (possible local) storage for additional > mixins state. This can work, but can become a complex issue to code up, depending on the consistency of the datastore. Another approach is to create what Eric Evans call an "anti-corruption layer", where the data from the store is mapped 1:1 to a local domain model and then from that mapped to the "ideal" domain model at class level. > 4. develop domain model without Qi4j and use only some features of Qi4j, > like data validation, or simplified AOP. That is probably your best first shot. Don't bite off more than you can chew. A lot will depend on how the existing services are organized, but you can always import those external services into Qi4j as Qi4j services and code up your thing in a SOA fashion instead of a "Persistent" system. > I would be gratefull if anyone could share his or her experience or ideas I think "experience" at the current time is very limited... ;-) Cheers -- Niclas Hedhman, Software Developer http://www.qi4j.org - New Energy for Java I live here; http://tinyurl.com/2qq9er I work here; http://tinyurl.com/2ymelc I relax here; http://tinyurl.com/2cgsug _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

