title: time-based simulation with actors model
body: <p>we have a single threaded application that simulates the interaction of a hundred of thousands of objects over time with the shared memory model.<br/>
  obviously, it suffers from its inability to scale over multi CPU hardware.</p>
  
  <p>after reading a little about agent based modeling and functional programming/actor model I was considering a rewrite with the message-passing paradigm.</p>
  
  <p>the idea is very simple - each object will be an actor and their interactions will be messages so that the simulation could happen in parallel. given a configuration of objects at a certain time - its future consequences can be easily computed.</p>
  
  <p>the question is how to model the time: <br/>
  for example let's assume the the behavior of object X depends on A and B, as the actors and the messages calculations order is not guaranteed it could be that when X is to be computed A has already sent its message to X but B didn't.
  how to make sure the computation happens correctly?</p>
  
  <p>I hope the question is clear<br/>
  thanks in advance.</p>