Skip to content

Event publishing for LoadBalancer#218

Merged
NiteshKant merged 2 commits into
rsocket:0.5.x-eventsfrom
NiteshKant:0.5.x-events-lb
Jan 9, 2017
Merged

Event publishing for LoadBalancer#218
NiteshKant merged 2 commits into
rsocket:0.5.x-eventsfrom
NiteshKant:0.5.x-events-lb

Conversation

@NiteshKant

Copy link
Copy Markdown
Contributor

Problem

No events are published for LoadBalancer

Modification

Publishing events for LoadBalancer

Result

More events, more insight!

__Problem__

No events are published for `LoadBalancer`

__Modification__

Publishing events for `LoadBalancer`

__Result__

More events, more insight!
@NiteshKant NiteshKant requested a review from stevegury January 9, 2017 17:04
lastRefresh = now;
addSockets(1);
if (eventListener != null) {
eventListener.socketsRefreshCompleted(Clock.elapsedSince(now), Clock.unit());

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would be better moved inside addSocket, since the addSocket action is asynchronous.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Discussed offline)
It is more involved to emit this event after the addSocket is finished. This event is more useful to indicate that socket refresh is happening, latency of connect can be useful in determining latency of refresh.

int n = numberOfNewSocket;
if (n > activeFactories.size()) {
n = activeFactories.size();
if (n > activeFactories.holder.size()) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not adding a size method in ActiveList?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@NiteshKant

Copy link
Copy Markdown
Contributor Author

@sgury I have addressed your comments.

@NiteshKant NiteshKant merged commit 39ea5b6 into rsocket:0.5.x-events Jan 9, 2017
@NiteshKant NiteshKant deleted the 0.5.x-events-lb branch January 9, 2017 22:11
NiteshKant added a commit that referenced this pull request Jan 9, 2017
* Event publishing for `LoadBalancer`

__Problem__

No events are published for `LoadBalancer`

__Modification__

Publishing events for `LoadBalancer`

__Result__

More events, more insight!
ilayaperumalg pushed a commit to ilayaperumalg/rsocket-java that referenced this pull request Dec 26, 2017
Replacing the dangling reference to LEASE_ERROR and replacing with REJECTED
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

Successfully merging this pull request may close these issues.

3 participants