java real-time simulation for mongodb