Buffer refactoring in zenoh core
Discussed in https://github.com/eclipse-zenoh/roadmap/discussions/12
Originally posted by Mallets April 11, 2022
Summary
Current ZBuf and WBuf implementations are ubiquitously used in zenoh code and bindings.
As a result, current implementation needs to accomodate a large set of requirements making it hard to scale and optimise for particular scenarios.
A recent PR, introduced common traits for ZBuf and WBuf implementations.
This allows to have targeted buffer implementation that expose a common trait leaving the internal structure tailored to the use case (e.g. serialisation, defragmentation, shared memory, etc.).
Intended outcome
Targeted implementations of ZBuf and WBuf for different places in the code.
As a result, memory management and performance should benefit from it.
How will it work?
Users will still use the same zenoh API that is based on the common traits.