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

Expose a stream api and implement grouper in terms of streams. #1

Open
spion opened this issue Sep 20, 2013 · 0 comments
Open

Expose a stream api and implement grouper in terms of streams. #1

spion opened this issue Sep 20, 2013 · 0 comments

Comments

@spion
Copy link
Contributor

spion commented Sep 20, 2013

Instead of a row-emitting eventemitter, expose a stream. The benefits of streams are pretty great:

compose well

Streams can pipe to eachother. The grouper can be implemented as multiple components, each component being a separate stream.

support backpressure

Although the underlying databases (and node-anydb) don't really support backpressure, this may change in the future.

Edit: this already did change, and node-anydb as well as most of the databases already support streams.

lower memory usage

Streams will lower the memory usage of grouped joins - intermediate row results (which contain a lot of duplication) will not be stored in memory before processing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant