Skip to content

Can phaser directly share messages in memory between processes? #1

Description

@shynur

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!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions