Skip to content

Architecting for Scale: Why MySQL, MongoDB, Redis & Kafka Choose Their DSA

Photo of venkatesh DB
Hosted By
venkatesh D.
Architecting for Scale: Why MySQL, MongoDB, Redis & Kafka Choose Their DSA

Details

Certainly! Here’s a 3‑hour meetup workshop plan that shows developers how to choose and understand data structures used in MySQL, MongoDB, Redis, and Kafka. You'll help them grasp why and how these systems pick specific structures for different workloads.

***

## 🎯 Session Title

“Choose the Right Data Structure: From MySQL to Kafka”
Objective:
By the end, participants will understand why each system uses its data structures and be able to apply similar reasoning to new problems.

***

## 🕒 Agenda Overview (3 Hours)

| Segment | Duration | Focus |
| ------- | -------- | ----- |
| | 15 min | Why DS decisions matter |
| | 30 min | B+Tree vs Hash |
| | 30 min | B+Tree in WiredTiger, special indexes |
| | 30 min | In-memory types |
| ☕ Break | 10 min | Networking |
| | 30 min | Segment + index logs |
| | 45 min | Apply choice reasoning |
| | 20 min | Share insights, next steps |

***

### 1. 💡 Importance of DS Choices (15 min)

  • Show real-world performance differences
  • Metric to DS trade-off framework: time/space/concurrency
  • Introduce examples from each system

***

### 2. 🧩 MySQL: B+Tree vs Hash (30 min)

  • Explain why InnoDB uses B+Tree for range, ORDER BY, and lookup
  • Memory engine and Adaptive Hash examples
  • Takeaway: B+Tree is general-purpose vs hash is O(1) but limited

***

### 3. 📘 MongoDB Index Strategies (30 min)

  • WiredTiger uses B+Tree for document/id indexes
  • Other indexes: compound, geospatial, hashed, text, multikey
  • Tradeoffs: sort speed, query pattern suitability

***

### 4. 🔄 Redis: In-Memory DS Choices (30 min)

  • Redis uses dict (hash tables) to map keys and manage sets, hashes, etc.
  • Focus on Sorted Sets implemented with skip list + hash map — ideal for leaderboards, TTLs
  • Choosing DS: latency, memory use, ordering needs

***

### ☕ 10-Minute Break

***

### 5. 📦 Kafka Logs & Indexes (30 min)

  • Explain append-only log segments + index/time index files for fast reads/writes
  • Segment strategy for retention, compaction, performance

***

### 6. 🧠 Group Workshop (45 min)

Setup: Small breakout teams
Task: Choose or design a DS for these scenarios:

  1. High-frequency writes + range queries → consider LSM-tree vs B+Tree
  2. Real-time leaderboard → skip list vs tree vs heap
  3. Autocomplete prefix search → trie vs radix tree vs prefix B+Tree
  4. Message queue logs → append-only log + segment index

Deliverables per team:

  • Selected DS and reasoning
  • Advantages, disadvantages, complexity
  • When not suitable

Share: Each group presents (3 min each) + peer Q&A

***

### 7. ✅ Wrap-up & Q&A (20 min)

  • Summarize DS decision patterns by system
  • Share the DS selection checklist:
  1. Identify patterns (lookup, range, order)
  2. Evaluate mem vs disk
  3. Choose base DS & adapt
  4. Consider concurrency, memory, indexing, maintenance
  • Resources:
  • B+Tree (Wikipedia)
  • Hash table design basics
  • Redis data types doc
  • Kafka internals overview
  • Invite to : coderrange.com DS mini-course

***

##

Photo of CoderRange - AI ,  Big data , Data Science !. group
CoderRange - AI , Big data , Data Science !.
See more events
Respond by
Saturday, September 20, 2025
5:29 AM
Needs a location
FREE
999 spots left