Replies: 2 comments 5 replies
-
|
Hi @zsmoore, Can you help clarify a few things? What is ticker mode exactly? In GraphQL Java we always had a per level mode by default, do you mean that when you talk about more predictable mode? We just recently added a new mode in GraphQL Java which is called exhausted strategy, which works similar to the JS dispatching mode. Best |
Beta Was this translation helpful? Give feedback.
-
|
Sure thing, we are using dataloaders without graphql in our app to benefit from the caching per request + batching decentralization. Ticker mode I am referring to is with the scheduledDLRegistry here - So unfortunately we are not able to benefit from the GQL general functionality as we are only leveraging the underlying library. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello all,
We have been using ticker mode for awhile now and are moving away from it due to a troubling amount of threads spawned / cpu / gc overload.
We currently have 47 DLs in production using a dispatch all basic predicate and looking at the code
java-dataloader/src/main/java/org/dataloader/registries/ScheduledDataLoaderRegistry.java
Line 237 in 918203c
See that dispatches are scheduled on a per DL level rather than a dispatch all, if i am doing calculations correctly then I believe a tick time of 5 ms , with 47 DLs, and a call time of 400ms == 3760 threads per call.
There is room for tuning here but I was wondering why we need a per dataloader dispatch vs, a single callback which runs a dispatchAll on a single thread for the reschedule. This seems like it would significantly decrease thread overhead for the ticker mode.
Beyond this we are moving towards a more deterministic, level by level deterministic dispatch which i have been thinking about how to contribute back to OS but haven't found a great way to generalize it yet.
Wondering about thoughts specifically on if a per DL reschedule is necessary vs a dispatch all at once when the default dispatch all predicate is used.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions