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

Message Aggregation #118

Open
magik6k opened this issue Oct 23, 2018 · 0 comments
Open

Message Aggregation #118

magik6k opened this issue Oct 23, 2018 · 0 comments

Comments

@magik6k
Copy link
Contributor

magik6k commented Oct 23, 2018

A way to aggregate multiple messages into one/fewer may be a nice option for apps operating on CRDTs or other data types which are nice to 'merge'. It could enable massive savings in terms of network bandwidth and cpu processing for certain use cases.

One particular use case I have in mind is voice-over-pubsub app, where an Aggregator would mix multiple sound channels into one (sort of audio-crdt), reducing network/cpu load for participants of big group calls.

I'm not sure about implementation details, one problem is probably a trade-off between efficiency and latency (e.g for voice apps we ideally don't want to increase latency more than 1-whatever-length-audio-chunk), so the optimal interface would let the aggregator control that well.

type Aggregator interface {
    Handle(<-chan Message) <-chan Message
}

Aggregator isn't the best name, and the interface optimally wouldn't require it to run in a separate goroutine to use. It would probably plug next to Validator stuff (and could be used to implement it)

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