Thuta Learning
ရှာဖွေရန်
Redis
ProjectsData & Databasesbeginner

Project 1 — PostgreSQL + Redis Architecture

ဒီခန်းပြီးရင် ဘာတတ်သွားမလဲ

  • Project 1 — PostgreSQL + Redis Architecture concept ကို နားလည်ရှင်းပြနိုင်ရန်
  • နမူနာ Redis command/code ကို ကိုယ်တိုင် run ပြီး output စစ်နိုင်ရန်
  • Tutorial Platform project နှင့် production scenario တွင် မှန်ကန်စွာအသုံးချနိုင်ရန်

နားလည်ထားရမယ့် အချက်

Hybrid architecture တွင် data တစ်မျိုးစီရဲ့ system of record ကိုတိတိကျကျသတ်မှတ်ရပါတယ်။ PostgreSQL က durable relational facts ကိုပိုင်ပြီး Redis က reproducible cache၊ expiring sessions/rate limits၊ derived leaderboard နဲ့ bounded event processing ကိုကိုင်မယ်။ Consistency boundary နဲ့ Redis unavailable behavior ကို component တစ်ခုစီရေးရပါတယ်။

လက်တွေ့ scenario နဲ့ ချိတ်ကြည့်မယ်

Data ownership table၊ key inventory၊ TTL matrix၊ invalidation events၊ memory budget၊ security identities၊ persistence/HA tier နဲ့ SLOs ဆွဲမယ်။ Catalog cache failure တွင် degraded DB fallback၊ session failure တွင် fail closed/re-auth၊ analytics event failure တွင် durable outbox replay သတ်မှတ်မယ်။

အတူတူ စမ်းရေးကြည့်မယ်

text
PostgreSQL: users, tutorials, enrollments, progress, outbox
Redis cache: tutorial:*:v1          TTL 5m   rebuildable
Redis auth:  session:*              TTL 30m  fail re-auth
Redis limits: rl:*                  TTL 60s  endpoint policy
Redis ranks: leaderboard:*          TTL 90d  rebuildable
Redis jobs:  stream:tutorial-events bounded + consumer groups
You should see
Implementation မစမီ review လုပ်နိုင်သော architecture contract ရမည်။

၅ မိနစ် စမ်းကြည့်

Feature တစ်ခုစီအတွက် owner, RPO, RTO, TTL, fallback ပါသော table ဖြည့်ပါ။

သတိလေးတစ်ချက်

Redis ထဲရှိ value တိုင်းကို durable လို့ယူဆခြင်း သို့ cache လို့ယူဆခြင်းနှစ်မျိုးစလုံးမှားနိုင်ပါတယ်။ Data class အလိုက်သတ်မှတ်ပါ။

Redis — ArchitectureRedis

ဒီနေရာမှာ လူအများမှားတတ်တယ်

  • Redis ထဲရှိ value တိုင်းကို durable လို့ယူဆခြင်း သို့ cache လို့ယူဆခြင်းနှစ်မျိုးစလုံးမှားနိုင်ပါတယ်။ Data class အလိုက်သတ်မှတ်ပါ။
  • နမူနာ command ကို production Redis ပေါ် တိုက်ရိုက်မစမ်းဘဲ local/test instance နဲ့ recoverable data ပေါ်တွင် အရင်အတည်ပြုပါ။

လေ့ကျင့်ခန်း

Feature တစ်ခုစီအတွက် owner, RPO, RTO, TTL, fallback ပါသော table ဖြည့်ပါ။

You'll know it worked when: Implementation မစမီ review လုပ်နိုင်သော architecture contract ရမည်။

Project 1 — PostgreSQL + Redis Architecture | Thuta Learning