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

Per-Stream Term Buffer Sizes #193

Closed
mikeb01 opened this issue Jan 27, 2016 · 9 comments
Closed

Per-Stream Term Buffer Sizes #193

mikeb01 opened this issue Jan 27, 2016 · 9 comments

Comments

@mikeb01
Copy link
Contributor

mikeb01 commented Jan 27, 2016

Would it be possible to have term buffer sizes set on a per channel/stream basis. In our system some streams have significantly lower volume and don't need the same amount of resource as our busier streams.

@mjpt777
Copy link
Contributor

mjpt777 commented Jan 27, 2016

Yes this could be possible. There could be a Aeron.addPublication() that takes a termLength argument.

@mjpt777
Copy link
Contributor

mjpt777 commented Apr 8, 2016

Would this be better as a method argument when adding the publication or as a uri param on the channel.

The method argument is more discoverable. Uri params allow for more flexibility in future usage.

@mjpt777
Copy link
Contributor

mjpt777 commented Apr 8, 2016

Uri params also fits with the pattern established for multicast TTL. However it is stream specific and may be different by stream in the same channel.

@tmontgomery
Copy link
Contributor

URI params could be for stream also. Just means that when canonicalized, they are ignored.

@mjpt777
Copy link
Contributor

mjpt777 commented May 20, 2016

What should be the behaviour in the following scenario?

A publication is added and this sets up a channel. A term length is provided as a URI param and this is use for the first publication. Then two later publications are setup. One provides the same channel but with a different value for the term length as a URI param and the other provides no URI param. I suggest the second one that provides the URI param uses that one. What about the one without? Does it take one of the two previously supplied params?

@mikeb01
Copy link
Contributor Author

mikeb01 commented May 21, 2016

Personally I think the other one (with unspecified term length) should use the value configured on the media driver's context as it keeps things simple and easy to predict what size it will use.

@mjpt777
Copy link
Contributor

mjpt777 commented May 21, 2016

Also what should happen if a publication is added in one process with a term length and another is added with the same channel and stream but with a different length? Should the second one error?

@mikeb01
Copy link
Contributor Author

mikeb01 commented May 21, 2016

That would make the most sense. I wonder if the second should succeed if the length is unspecified? And just pick up the previously specified value?

mjpt777 added a commit that referenced this issue Jun 1, 2016
…g a publication via a channel uri parameter. Issue #193.
@mjpt777
Copy link
Contributor

mjpt777 commented Jun 1, 2016

Note that when using IPC if the subscription is created first then the length must be set via a channel param on the subscription. The creator of the subscription or publication wins. Later adds take the settings of the creator.

@mjpt777 mjpt777 closed this as completed Jun 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants