apple / swift-cluster-membership

Distributed Membership Protocol implementations in Swift
https://apple.github.io/swift-cluster-membership/
Apache License 2.0
201 stars 20 forks source link

More efficient efficient coding for SWIMNIO payloads #38

Open ktoso opened 4 years ago

ktoso commented 4 years ago

In the SWIMNIO example implementation we use Codable and its JSON implementation. This is sub-optimal for gossip systems which are periodically always on in the background.

Re using the codable types but implementing an efficient binary serialization format would be preferable. It could well just be a hand woven implementation, since the payloads and messages are very simple and it's just an example app.

This matters if we'd like to compare bytes-per-message and bytes per second/minute of operation usage with other implementations, which is an important measure in general for gossip systems.