Re: reads which modify data
Edward Kimber <[email protected]>
| Newsgroups | gmane.comp.java.prevayler |
|---|---|
| Message-ID | <[email protected]> |
This sounds like some sort of simulation... I would think about having a system clock that triggers a model update/recalculation on every tick. This system can include your seeded pseudo-random elements and also be deterministic. You can then allow very fast direct access reads and you don't need to worry about the write operation because all model updates will be performed by the 'tick' transaction. Just an idea. :) Ed 2009/3/2 hakan eryargi <[email protected]>: > ok, this is what i do without the (pseudo)random part: "lazy evaluation" > > for the random part, the problem is how to find a random seed that we > can later find again and use. using same seed is a solution but of > course we dont want that. we are in the middle of a read operation > came from some client at some -truly- random time. so we cant use > executionTime as a seed. we cannot depend on any pre-seeded sequence > since this is a read and there is no guarantee it will occur again in > same order. > > am i missing something ? > > On Mon, Mar 2, 2009 at 6:38 AM, Klaus Wuestefeld > <[email protected]> wrote: >> Stop thinking in terms of "reads which modify data" and think about it >> as "lazy evaluation", which is perfectly ok. Something like this: >> >> >> Object executeQuery(Date executionTime) { >> >> synchronized (_system) { >> if (!isStateUpdatedTo(executionTime)) >> updateStateWithReallyComplexAndPseudoRandomRulesTo(executionTime); >> } >> >> return queryStateWhatever(); >> } >> >> >> See you, Klaus. >> >> ------------------------------------------------------------------------------ >> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA >> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise >> -Strategies to boost innovation and cut costs with open source participation >> -Receive a $600 discount off the registration fee with the source code: SFAD >> http://p.sf.net/sfu/XcvMzF8H >> _______________________________________________ >> To unsubscribe go to the end of this page: http://lists.sourceforge.net/lists/listinfo/prevayler-discussion >> _______________________________________________ >> "Databases in Memoriam" -- http://www.prevayler.org >> > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise > -Strategies to boost innovation and cut costs with open source participation > -Receive a $600 discount off the registration fee with the source code: SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > To unsubscribe go to the end of this page: http://lists.sourceforge.net/lists/listinfo/prevayler-discussion > _______________________________________________ > "Databases in Memoriam" -- http://www.prevayler.org > ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ To unsubscribe go to the end of this page: http://lists.sourceforge.net/lists/listinfo/prevayler-discussion _______________________________________________ "Databases in Memoriam" -- http://www.prevayler.org