finds.dev← search

// the find

water8394/flink-recommandSystem-demo

★ 4,475 · Java · updated Feb 2024

:helicopter::rocket:基于Flink实现的商品实时推荐系统。flink统计商品热度,放入redis缓存,分析日志信息,将画像标签和实时记录放入Hbase。在用户发起推荐请求后,根据用户画像重排序热度榜,并结合协同过滤和标签两个推荐模块为新生成的榜单的每一个产品添加关联产品,最后返回新的用户列表。

A demo real-time product recommendation system built on Flink, HBase, Redis, and Kafka. It implements three recommendation strategies simultaneously — popularity (hot items via Flink time windows), item-based collaborative filtering, and tag/portrait-based matching — and combines them at request time. Built as a learning project, not production software.

The architecture is well-thought-out for a demo: separating the stream processing (flink-2-hbase) from the serving layer (web) is the right call and keeps concerns clean. Using Flink's ValueState for the interest-window calculation (action within 100s = interest event) is a concrete and appropriate use of stateful stream processing, not a contrived example. The three-column recommendation UI makes the difference between algorithms visible, which is genuinely useful for learning. Docker Compose setup with pre-baked SQL and HBase init scripts means someone can actually run this without a week of infrastructure pain.

The codebase is frozen in Flink 1.x era patterns — no sign of the DataStream/Table API improvements from Flink 1.14+ and the HBase connector approach here would need significant rework for anything past Flink 1.12. The collaborative filtering is computed in a scheduled job (SchedulerJob.java), not in a streaming pipeline, which defeats the point of using Flink for real-time recommendations — you're just doing batch CF with extra steps. User portrait dimensions are hardcoded to color/origin/style, which is obviously e-commerce-domain-specific with no abstraction; there's no path to adapting this without rewriting the portrait logic. Last meaningful commit was 2024 and the article linked for deployment instructions is from 2019, so dependency versions are old enough that you'll hit breaking changes before you get anything running.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →