Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Event publishing for LoadBalancer#218

Merged
NiteshKant merged 2 commits intorsocket:0.5.x-eventsrsocket/rsocket-java:0.5.x-eventsfrom
NiteshKant:0.5.x-events-lbNiteshKant/reactivesocket-java:0.5.x-events-lbCopy head branch name to clipboard
Jan 9, 2017
Merged

Event publishing for LoadBalancer#218
NiteshKant merged 2 commits intorsocket:0.5.x-eventsrsocket/rsocket-java:0.5.x-eventsfrom
NiteshKant:0.5.x-events-lbNiteshKant/reactivesocket-java:0.5.x-events-lbCopy head branch name to clipboard

Conversation

@NiteshKant
Copy link
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
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
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
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
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
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.