Skip to content
This repository was archived by the owner on Jun 20, 2024. It is now read-only.
This repository was archived by the owner on Jun 20, 2024. It is now read-only.

four layers of gob is bad #519

Open
Open
@rade

Description

@rade

The sending of topology gossip currently goes through four layers of gob encoding, and involves n_peers+3 encoders...

  • 1. one GobEncoder for each peer, into which we encode the connections
  • 2. one GobEncoder for the set of peers, into which all peers are
    encoded, with their connection information represented by the
    result of the aforementioned encoding.
  • 3. one GobEncoder for encoding the gossip (hash, source, and the
    result of (2)) as a ProtocolMsg payload.
  • 4. one GobEncoder in the TCPSender, which is used to encode a byte
    slice - comprising the ProtocolMsg tag and payload - as a single
    message

This has a bad design smell to it and probably is also rather inefficient.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions