Sure: /--> AsyncIO --\ STREAM --> ProcessFunc -- -- Union -- WindowFunc \------------------/
ProcessFunc keeps track of the unique keys per window duration and emits each distinct key just once to the AsyncIO function via a side output. Through the main output it sends all values it receives. AsyncIO queries the external store for each key it receives. Union just unions both streams (possibly using an Either type). WindowFunction compute the window and includes the information that was fetched by the AsyncIO function. Cheers, Fabian Am Di., 23. Juli 2019 um 17:25 Uhr schrieb Flavio Pompermaier < pomperma...@okkam.it>: > For each key I need to call an external REST service to get the current > status and this is why I'd like to use Async IO. At the moment I do this in > a process function but I'd like a cleaner solution (if possible). > Do you think your proposal of forking could be a better option? > Could you provide a simple snippet/peudo-code of it? I'm not sure I've > fully undestand your suggestion.. >