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

Batching/scheduling #278

Merged
merged 34 commits into from
Jun 21, 2016
Merged

Batching/scheduling #278

merged 34 commits into from
Jun 21, 2016

Conversation

Poincare
Copy link
Contributor

@Poincare Poincare commented Jun 11, 2016

This PR (originally part of PR #266) implements the logic that allows for queries to be batched together automatically. It is still WIP and I will now be implementing the changes as discussed with @helfer.

TODO:

  • Update CHANGELOG.md with your change
  • Make sure all of the significant new logic is covered by tests
  • Rebase your changes on master so that they can be merged easily
  • Make sure all tests and linter rules pass

@Poincare Poincare force-pushed the batching_scheduling branch from f1eae52 to be178d6 Compare June 11, 2016 00:39
@Poincare Poincare mentioned this pull request Jun 11, 2016
4 tasks
@Poincare Poincare force-pushed the batching_scheduling branch from 943a109 to 6672fa8 Compare June 15, 2016 00:47
@Poincare Poincare changed the title WIP: Batching/scheduling Batching/scheduling Jun 15, 2016
@helfer
Copy link
Contributor

helfer commented Jun 17, 2016

Can you rebase this on top of master now that the other PR is merged? It looks like they have some overlap now.

@stubailo
Copy link
Contributor

I assume the reason it's done as part of the network interface is because when we build batching at the transport level, we'll want to have a special network interface for that transport?

@helfer
Copy link
Contributor

helfer commented Jun 18, 2016

Yes, the idea is that different servers may not all support the same kind of batching. There's a "batcher" in the client that batches up requests and sends them to the network interface at the same time, but it's up to the network interface to decide whether it sends the queries batched or not.

Scheduling for polling queries is going to be another separate module, which just aligns polling intervals.

@Poincare Poincare force-pushed the batching_scheduling branch from 6672fa8 to a640c27 Compare June 20, 2016 19:26

public start(pollInterval: Number) {
this.pollInterval = pollInterval;
this.pollTimer = setInterval(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this setInterval even use the pollInterval? Or am I missing something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch - I'm not sure what happened there

@Poincare
Copy link
Contributor Author

Poincare commented Jun 21, 2016

Fixed @stubailo

@Poincare Poincare force-pushed the batching_scheduling branch from df6c746 to d6ce369 Compare June 21, 2016 22:35
@stubailo stubailo force-pushed the batching_scheduling branch from d6ce369 to 33669b6 Compare June 21, 2016 22:40
@stubailo stubailo force-pushed the batching_scheduling branch from 4461e86 to 9bd9996 Compare June 21, 2016 22:56
queryManager: this,
});
this.batcher = new QueryBatcher({
//we batch if the network interface supports batching if user has not specified
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment is not correct

@stubailo stubailo assigned stubailo and unassigned Poincare Jun 21, 2016
@stubailo stubailo merged commit 3ab90b2 into master Jun 21, 2016
@zol zol removed the in progress label Jun 21, 2016
@stubailo stubailo deleted the batching_scheduling branch September 20, 2016 03:41
jbaxleyiii pushed a commit that referenced this pull request Oct 17, 2017
jbaxleyiii pushed a commit that referenced this pull request Oct 18, 2017
Query docs: PropTypes is now a separate package
LevanArabuli pushed a commit to LevanArabuli/apollo-client that referenced this pull request Nov 3, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants