Skip to content
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

Tracking issue for building Streaming primitives #177

Open
15 tasks
vertexclique opened this issue Feb 29, 2020 · 0 comments
Open
15 tasks

Tracking issue for building Streaming primitives #177

vertexclique opened this issue Feb 29, 2020 · 0 comments
Labels
A-streams Area: Stream Primitives C-feature-request Category: Feature Request

Comments

@vertexclique
Copy link
Member

vertexclique commented Feb 29, 2020

First; Feel free to edit or comment on this issue (like every other issue of this project).

We are getting close one step at a time to building a completely backpressure-aware, asynchronous streaming approach.

For this, we need to define couple of terminology in this tracking issue and mark what we might want to implement as primitives in Bastion, and then moving forward what should be self-contained in Bastion Streams.

A list of primitives follows as a list by what they do and how do we implement them.

Basic Operators

  • Map: distributes elements to the downstream with the help of dispatcher.
  • FlatMap: associative version of Map for collections.
  • Throttle: limits the throughput to a specific number of elements per time unit
  • Limit: limit number of the element from upstream to given max number.
  • Log: log elements flowing through
  • Sliding: provide a sliding window over the incoming stream and pass the windows as groups of elements downstream
  • Take: pass n incoming elements downstream and then complete
  • TakeWhile: pass elements downstream as long as a predicate function return true for the element include the element when the predicate first return false and then complete
  • GroupBy: demultiplex the incoming stream into separate output streams (IMO this would be the hardest)

Backpressure aware operators

  • Buffer: allows for temporarily faster upstream events by buffering size elements

Fan-In

  • Merge: merge two distinct stream flows
  • MergePreferred: merge two distinct stream flows with a having one as a higher priority

Fan-Out

  • Broadcast: broadcast incoming elements to n different stream flows.
  • Partition: distribute incoming elements to n different stream flows based on the predicate function

Error Handling

  • OnErrorWithBackoff: backpressure the upcoming elements and re-enqueue the erroring element internally with a backoff.

Please copy this to your project with referring the Bastion project. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-streams Area: Stream Primitives C-feature-request Category: Feature Request
Projects
None yet
Development

No branches or pull requests

3 participants