Stateful Functions Flink Interaction with Hbase and Redis

317 Views Asked by At

Learning on how to use Flink Stateful Functions. I was wondering how it can interact with Hbase and Redis. I don't see any connectors for both hbase and redis in stateful functions. Does accessing these through a service via an async api call makes sense.

1

There are 1 best solutions below

0
On

If you are interesting in doing point lookups (what is the value for a key X) then, you can contact any external service during the invocation of the function.

  • If you are using remote functions, then you can simply use the Redis or HBase clients to issue requests during an invocation of your function. Check out the example here If you are a Python user.

  • If you are using the embedded functions then, you would have to use an asynchronous client for Redis / HBase. (many functions are multiplexed on a single physical thread, therefore blocking is not advised) See this, and an example here

I should also mention that, if you can, use the built in primitives in StateFun. Using them would give you out of the box, great scalability, low latency state access, and exactly once messaging & state guarantees.

Good luck!