Skip to content

Improve peer service concurrency (leverage channel parallelism) #242

Open
@aramallo

Description

@aramallo

We need to improve Partisan concurrency so that we can capture the benefits of channels and parallelism per channel.

At the moment there is

  • a single peer service manager server per node - this serializes all peer service view management messages and depending on the implementation it might serialise the forwarding of user messages. For example, partisan_pluggable_peer_service_manager serializes them when disable_fast_forward is true (default is false) or when the message forwarding options require Causal Delivery or Acknowledgements. The problem then is that we have a single gen_server instance serializing all connections (channel shards).
  • a single plumtree_broadcast server per node
  • a single rpc_backend server per node - regardless of the number of channel shards

Ideally we should have a single peer_service_manager to maintain the view and a pool of additional servers for handling Causal Delivery, Acks, etc aligned with channel shards, so that we can trully leverage the parallelism offered by them.

In addition, we want to send data directly to the connection sockets rather than sending them to the socket controlling process.

This woudl result in:

  • a peer service manager server instance per node in charge of view management
  • 1 peer service forwarder (manager helper server) per channel connection for message forwarding
  • 1 plumtree broadcast server per channel and/or per channel connection (dependeing on forward_opts() chosen)
  • 1 RPC backend per connection

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions