[Stop messing up your stream processing joins! \| Systems Design Interview 0 to 1 with Ex-Google SWE - YouTube](https://www.youtube.com/watch?v=oiPCC8G6ufg&list=PLjTveVh7FakLdTmm42TMxbN8PvVn5g4KJ&index=44) # Types of Stream Data Joins ## Stream-Stream Joins Cases where you want to match events from two streams. Requires you to store incoming events in a consumer, so it can be matched with data from the other stream. ## Stream-Table Joins Use [[Change Data Capture (CDC)]] to keep an in-memory copy of the table data up-to-date in the consumer. Effectively, turns the database into a stream. ## Table-Table Joins Use above CDC approach to turn both databases into streams. # Patterns We cache derived state in memory. This leads to issues: - Memory - less space per consumer - Leading to many partitioners and many consumers - The in-memory state is not fault tolerant - A WAL is not enough. How can we handle? Using technology like [[Apache Flink]]. # Related Topics - [[Stream Processing]]