-
Couldn't load subscription status.
- Fork 288
Make Stream generic over container type #411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
SummaryTimely currently assumes that batches of data are a combination of time, meta information, and a vector of datums. Requiring the data batch to be encoded as a vector limits flexibility in certain situations. Some clients could store data in a column-first batch format, or would like to customize the default allocation policy through a custom type. Here, we analyze the requirements Timely imposes on a possible batch type and work towards generalizing the API be open to the type of batch data structure. GoalsThe goals of this effort are twofold:
The goal should be met maintaining compatibility for existing client code. Non-goalsIt is no goal to provide a different backing structure than the currently default DescriptionIn Timely, data is passed between operators in the form of a In the following, we define a
A container should represent possibly immutable data. For this reason, each container should have an associated builder. The builder accepts updates, wich are then stashed into a finalized container for passing along dataflow edges. The container API should enable Timely to re-use allocations where possible. AlternativesThe current API using vectors of data can be interpreted as vector of a single data elements, which itself contains the batch of data. It would add a pointer dereference to access the data, but does not require changes to Timely's API. The downside of this approach is that containers cannot express custom allocation strategies. |
9e3bee5 to
cfc99e6
Compare
|
I changed the implementation to limit changes on public interfaces. Currently, the |
|
Differential now compiles without any changes. Materialize encodes some of the types and needs a few changes. |
3a213f6 to
5a60c7e
Compare
b01b16f to
5025ebc
Compare
Currently, the Stream abstraction has an opinion of the content type of message bundles, which is that all datums are contained in vectors. With this change, Streams are generic over the container type, allowing user code to supply other container types if required. This change exposes the lower-level building blocks to provide generic operators over the container type, but many operators still require the data to be contained by vectors. Enables the drain function on containers implementing DrainContainer. Due avoid lifetime complications, the trait needs to be implemented with a known lifetime, for example using impl<C: Container> ... where for<'a> &'a mut C: DrainContainer Container builder: Separate container from building a container CoreStream: Alias core stream over vectors as `Stream` to limit API changes Signed-off-by: Moritz Hoffmann <[email protected]>
Signed-off-by: Moritz Hoffmann <[email protected]>
...for pushers, input, unordered input, a few more. Signed-off-by: Moritz Hoffmann <[email protected]>
Signed-off-by: Moritz Hoffmann <[email protected]>
Signed-off-by: Moritz Hoffmann <[email protected]>
Signed-off-by: Moritz Hoffmann <[email protected]>
Signed-off-by: Moritz Hoffmann <[email protected]>
Signed-off-by: Moritz Hoffmann <[email protected]>
Signed-off-by: Moritz Hoffmann <[email protected]>
Signed-off-by: Moritz Hoffmann <[email protected]>
Signed-off-by: Moritz Hoffmann <[email protected]>
Signed-off-by: Moritz Hoffmann <[email protected]>
Signed-off-by: Moritz Hoffmann <[email protected]>
Signed-off-by: Moritz Hoffmann <[email protected]>
Signed-off-by: Moritz Hoffmann <[email protected]>
Signed-off-by: Moritz Hoffmann <[email protected]>
Signed-off-by: Moritz Hoffmann <[email protected]>
Signed-off-by: Moritz Hoffmann <[email protected]>
Signed-off-by: Moritz Hoffmann <[email protected]>
Unfortunately, timestamps cannot yet be recycled because the association of product time's allocation cannot be expressed. Signed-off-by: Moritz Hoffmann <[email protected]>
Signed-off-by: Moritz Hoffmann <[email protected]>
Signed-off-by: Moritz Hoffmann <[email protected]>
Signed-off-by: Moritz Hoffmann <[email protected]>
Signed-off-by: Moritz Hoffmann <[email protected]>
Signed-off-by: Moritz Hoffmann <[email protected]>
Signed-off-by: Moritz Hoffmann <[email protected]>
Signed-off-by: Moritz Hoffmann <[email protected]>
Signed-off-by: Moritz Hoffmann <[email protected]>
Signed-off-by: Moritz Hoffmann <[email protected]>
Signed-off-by: Moritz Hoffmann <[email protected]>
Signed-off-by: Moritz Hoffmann <[email protected]>
Signed-off-by: Moritz Hoffmann <[email protected]>
Signed-off-by: Moritz Hoffmann <[email protected]>
Signed-off-by: Moritz Hoffmann <[email protected]>
5025ebc to
ac63fa0
Compare
|
Superseded by #426. |
Currently, the Stream abstraction has an opinion of the content type of
message bundles, which is that all datums are contained in vectors. With
this change, Streams are generic over the container type, allowing user
code to supply other container types if required.
This change exposes the lower-level building blocks to provide generic
operators over the container type, but many operators still require the
data to be contained by vectors.
Signed-off-by: Moritz Hoffmann [email protected]