0

I am currently building a ksqlDB instance and I target to deploy it in interactive mode.

I created streams and table to serve windowed aggregations with RocksDB.

I would like to query the cache with REST API calls (i.e. Python wrapper for KSQL Rest API), yet I am not sure if this is the right approach to implement since the number of calls can reach 1K TPS.

Could you please let me know if this is an anti-pattern here, if so what is the best practice?

Thanks.

Soner Guzeloglu
  • 103
  • 1
  • 11

1 Answers1

0

Your initial problem is not clear to me. You are not just requesting the cache)

I will assume that the cache is needed, for example, to enrich the data.

In this case, the best practice would be to create a stream with data that needs to be enriched and join by key. join

Second example. Indeed, it is bad to query the ksqldb table from outside. You can create a stream that will write to the topic, from which your consumer will write to the database (possibly specialized for cache - Redis, Memcached). You can also use a sink connector and do without writing a consumer.

asanisimov
  • 382
  • 2
  • 8