On Dec 28, 2013, at 2:56 PM, Cedric Greevey wrote:
> Your requirements are unusual.
> 
> That being said, you might want to consider:
> 
> 1. Using a PRNG with recordable seed, and sane concurrency semantics, to 
> achieve repeatability -- rerun with same seed to get identical replay of 
> events.
> 
> 2. If crashes are happening after days, add snapshotting -- some ability to 
> save the state of the whole simulation from time to time (including current 
> PRNG state). Use the last snapshot before a crash to investigate the crash. 
> Requires item 1, above, for rerunning from the same snapshot to produce 
> unvarying results.
> 
> I'd suggest using a ref world, with a periodically waking thread that does a 
> (spit (dosync (dump-all-the-refs-to-some-data-structure))) or something. (If 
> retries become a big problem you'll need to add more coordination, maybe 
> using core.async to get everything else to take a breather during each state 
> dump.) You also need order-independence (which suggests a deterministic 
> breaking up of the world into the domains of different threads, with defined 
> interaction channels and times, and a separate PRNG per thread -- I'd suggest 
> a state-dumpable Mersenne Twister instance per thread, seeded at startup 
> using values from java.util.Random, itself seeded with a known startup seed).

I can see how and why all of the above would work. But it's a pretty big 
effort, for which I would have no other use, and which would be unnecessary for 
me if I could just see the values of locals on crashes, as I can with other 
Lisps.


-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to