The third approach prevents you from batching across state keys which would be the most common type of batching.
On Thu, May 6, 2021 at 3:13 PM Rui Wang <ruw...@google.com> wrote: > At this moment, the third approach in the doc is preferred. To recap, the > third approach is the one that only changes FnApi by adding a repeated > field in the state request to support batching over FnApi. > > This approach has the following benefits: > 1. Avoid double requests problem introduced by prefetching (prefetching > needs two requests, one for prefetch and one for blocking fetch). > 2. This approach does not conflict with prefetching so no backward > compatibility issue even when we want to add prefetching in FnApi. So this > approach can be a good starting point. > > The caveat though is this approach does not support smart prefetching > (which needs runners support). However we can add that in the future if > necessary and that won't conflict with existing design. > > Please let us know if you have any objection before the implementation. > > > -Rui > > On Mon, Mar 22, 2021 at 12:27 PM Rui Wang <amaliu...@apache.org> wrote: > >> Hi Community, >> >> Andrew Crites and I drafted a document to discuss how to support state >> prefetching and batching over FnApi, which seems a missing functionality in >> FnApi. This will help us support Java state readLater() Api over FnApi. >> >> Please see: >> https://docs.google.com/document/d/1Z3a5YOZyYsN8MeS6hRhCXX31m9bKCXSOtjKSl7wX40c/edit?usp=sharing&resourcekey=0-eiNl525kmb3Av2bqgCsZUA >> >> >> -Rui >> >