a port of x2 to c++ towards more generic actor system