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

Implement Watchers (fixes #107, #111). r=gmarty #129

Merged
merged 1 commit into from
Apr 28, 2016
Merged

Implement Watchers (fixes #107, #111). r=gmarty #129

merged 1 commit into from
Apr 28, 2016

Conversation

azasypkin
Copy link
Member

No description provided.

@azasypkin
Copy link
Member Author

Hey @gmarty r?, I think the code part is ready for review, could you please take a look?

I'm just planning to add few more tests.

}

return Promise.all(pingPromises);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we have a similar issue here than when trying to put these 2 pings in a promise.
If one of the ping takes very long to resolve, the next ping will be delayed for as long. Maybe it's better to have 2 timers here: 1 for local and 1 for remote.
What do you think?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think we have a similar issue here than when trying to put these 2 pings in a promise.
If one of the ping takes very long to resolve, the next ping will be delayed for as long.

It's hard to say, preliminary ping takes very long to resolve should be an edge case, and more important to have less network requests as possible.

Maybe it's better to have 2 timers here: 1 for local and 1 for remote.
What do you think?

Yeah, maybe we can try that, I'm wondering maybe they should even have different periods... Do you want me to try to do it in this PR or file appropriate issue?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes please can you try to do that in that PR?
Also different periods of time sound good.

Maybe also we should use the connection type from the net-info API (only in Chrome for now). If on Wifi we can ping more often that on radio. This optimisation can definitely wait for another PR as long as we fill a bug for it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes please can you try to do that in that PR?

Okay, trying.;

Also different periods of time sound good.
Maybe also we should use the connection type from the net-info API (only in Chrome for now). If on Wifi we can ping more often that on radio. This optimisation can definitely wait for another PR as long as we fill a bug for it.

Done #135

@gmarty
Copy link
Collaborator

gmarty commented Apr 28, 2016

I'm very excited about this PR, it shows the real potential of a powerful and user-friendly API! I left some comments, but r+!


assert.isDefined(
component,
'ReactDOM.render() did not render component (see issue #133).'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you use the link, an issue number only can be ambiguous (is it a foxbox error? a React error?):
https://github.com/fxbox/app/issues/133

@azasypkin
Copy link
Member Author

Thanks a lot for review! Review comments handled and travis is green, merging!

@azasypkin azasypkin merged commit 5212830 into fxbox:master Apr 28, 2016
@azasypkin azasypkin deleted the issue-111-watchers branch April 28, 2016 13:05
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.

2 participants