HI Team,
I have one use case where I have to call some api to retrieve some data to enrich my input event data stream, in most of the cases data is common. So I wanted to have some caching mechanism to hold the repeated data. I have used flink states to do the same. but as I was using asyncIO for data enrichment using rest api. I have to call write total three function like below:
keyedprocessfunction---->asyncIO---->KeyedCoProcessFunction
I have multiple api calls(around 15), so for API call I had to write 3 functions. now the code has gone crazy, really not readable and non maintable. Any idea of better caching strategy? Should I move to redis or something instead of using flink states.
Any help would be really appreciated. Thanks in advance.