TimelyDataflow / timely-dataflow

A modular implementation of timely dataflow in Rust
MIT License
3.3k stars 272 forks source link

Simplify communication `Message` type #596

Closed frankmcsherry closed 1 week ago

frankmcsherry commented 1 week ago

This PR chases down some simplifications due to the removal of abomonation, looking forward to flexibility enabled by containers.

Specifically, the Message<T> type has wrapped several ways to present a T, including owned and borrowed forms, as well as numerous accessors. All of the borrowed forms have been dead code since the abomonation removal, and the attendant complexity unwarranted. This PR removes it.

Going forward, distinctions between owned and borrowed seem best housed in containers, which can themselves resemble MessageContents<T> which was the enum that could be owned or borrowed. The Message<T> type remains, but seemingly only to support serialization methods, but this behavior could be move into a trait that containers are expected to implement if they are to be used for exchange edges.