Sluonics GmbH

Supporting you with software development.

Distributed Simulation network code

Situation

The distributed simuation network code is responsible for handling different kinds of messages send between simulation components.These were simple messages as well as messages with a response (remote procedure calls).

The simulation framework had not been tested under heavy load.

Delivered solution

1. Measurement

A python script for creating mock up simulation components producing a certain message frequency and length for several computers was implemented. The network code was extended to allow round trip measurement times for different layers of the message system. The measurement round trip times were stored in histograms.

Before improvements were implemented, the histograms have shown a significant round trip time increase once more than one component send a message at the same time.

2. Optimization

Optimizations applied are,

  • Implementing an active object pattern with optimized consumer producer queues for the socket code
  • Reducing the number of locks
  • Reducing the number of layers the message had to pass

Afterwards the changes to the network code were ported to a Java framework.

Benefits

  • Solved latency issues
  • Scales with the number of simulation components
  • Proven by measurements

Costs

  • 3 months development time

Tools

  • C++
  • MS Visual Studio 2010
  • G++ tool chain
  • Python
  • Java

Impressum and privacy statement