What is the best Practice for end-to-end WordCount application? [closed]

Author: liveisshort

Originally Sourced from: https://stackoverflow.com/questions/66063240/what-is-the-best-practice-for-end-to-end-wordcount-application

We want to find total favorite count for each user in real-time. We want to use Flink for streaming processing, and cassandra for storing total counts.

The basic model in cassandra like that;

userId: String, totalFavoriteCount: Long 

Kafka -> Flink -> Cassandra

Should we keep state in Flink, and upsert data in Cassandra? In this case, we have to manage state (rocksdb, memory, redis etc.) I'm not sure this is the best practice. We have to keep state for all word-count apps.

Is there any way to create word-count applciations efficiently?