Hi, David.
I'm writing a small system consisting of two processes: publisher and subscriber, by C++. I use Protocol Buffers and Arena.
In this small system, publisher will directly construct some protobuf messages in the memory area shared by publisher and subscriber, WITHOUT serialization (i.e., zero copy).
However, there are 2 (seemingly unsolvable) problems:
- the underlying data of
std::string is uncontrolled, thus subscriber cannot read std::string::c_str().
- the virtual table pointer of protobuf message is an absolute address in process publisher, thus it's impossible to use reflection, and whenever I call
google::protobuf::util::MessageToJsonString the system will crash.
I wonder whether phaser can solve these problems.
Thanks!