Title: Add dispatch strategy, implement bfs strategy by zsmoore · Pull Request #261 · graphql-java/java-dataloader · GitHub
Open Graph Title: Add dispatch strategy, implement bfs strategy by zsmoore · Pull Request #261 · graphql-java/java-dataloader
X Title: Add dispatch strategy, implement bfs strategy by zsmoore · Pull Request #261 · graphql-java/java-dataloader
Description: See discussion in - #256 Build on #243 Allow for custom dispatch strategies Right now the dispatch strategy (in this PR and the original busy strategy) do not need dataloader references, they just need registry references. Its possible that strategies prefer to have the DL loaded such as a DFS strategy to trigger the dl dispatch immediately without using a registry reference but as there is no current need do not include it. Because of the circular reference dependency between dispatch strategy and registry, choose to add a bootstrap function into the interface to give a reference to the strategy BFS strategy handles dispatching in a level by level fashion see example here - i.e. Async Path A B (async) E F C G (async) H D I J A dispatches immediately, queues B, C, D B, C, D dispatch queue G, H, I, J Thread is spawned to wait for B to finish and retry every 30 ms B finishes, queues E, F E, F, G, H, I, J dispatched This dispatch strategy also handles chained dataloaders but beyond that handles ASYNC chained dataloaders such that a dataloader makes an api call then chains a subsequent dataloader. This is done with minimal thread overload by doing dispatchAll + only queueing a single thread when work is known to exist but not be completed Added some tests to verify some behavior of the dispatch strategy
Open Graph Description: See discussion in - #256 Build on #243 Allow for custom dispatch strategies Right now the dispatch strategy (in this PR and the original busy strategy) do not need dataloader references, they just ...
X Description: See discussion in - #256 Build on #243 Allow for custom dispatch strategies Right now the dispatch strategy (in this PR and the original busy strategy) do not need dataloader references, they just ...
Opengraph URL: https://github.com/graphql-java/java-dataloader/pull/261
X: @github
Domain: patch-diff.githubusercontent.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:cde072a7-7d52-d94d-e854-f20d7838691a |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | E786:6834D:9ABEDB:CFBB5A:6970145E |
| html-safe-nonce | 954dd05208e2399eaca9f5e55f23d8eb17b09d34196493723973bbadf7284aed |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNzg2OjY4MzREOjlBQkVEQjpDRkJCNUE6Njk3MDE0NUUiLCJ2aXNpdG9yX2lkIjoiODA2OTQxNDEyNDA0ODYxODU5MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 13fe6afb71cc875edb9b007a88c475518ef66f8ce603840f33a1a2c708caddeb |
| hovercard-subject-tag | pull_request:3150596521 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/graphql-java/java-dataloader/pull/261/checks |
| twitter:image | https://avatars.githubusercontent.com/u/8812688?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/8812688?s=400&v=4 |
| og:image:alt | See discussion in - #256 Build on #243 Allow for custom dispatch strategies Right now the dispatch strategy (in this PR and the original busy strategy) do not need dataloader references, they just ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 043a09521e81f00c45482046b3f38390b8b292cf9a86ad665a632633a072c05c |
| turbo-cache-control | no-cache |
| go-import | github.com/graphql-java/java-dataloader git https://github.com/graphql-java/java-dataloader.git |
| octolytics-dimension-user_id | 14289921 |
| octolytics-dimension-user_login | graphql-java |
| octolytics-dimension-repository_id | 97364654 |
| octolytics-dimension-repository_nwo | graphql-java/java-dataloader |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 97364654 |
| octolytics-dimension-repository_network_root_nwo | graphql-java/java-dataloader |
| turbo-body-classes | logged-out env-production page-responsive full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 98881eadf8ae73000970c42161c094b0809b1330 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width