منصوبے کے بارے میں
Spectrum ایک اوپن سورس متبادل کے طور پر ڈیزائن کیا گیا سیلف ہوسٹڈ پروڈکٹ اینالٹکس ویئر ہاؤس ہے، جو commercial پلیٹ فارمز جیسے کہ Amplitude اور Mixpanel کے لیے استعمال ہوتا ہے۔ یہ پروجیکٹ یہ دکھاتا ہے کہ ایک احتیاطی PostgreSQL only architecture کیسے event ingestion, sessionization, funnel analysis, cohort retention, revenue attribution, اور A/B testing کو external message brokers یا big-data frameworks کے بغیر سنبھال سکتی ہے۔
سسٹم raw clickstream events کو FastAPI endpoint کے ذریعے ingest کرتا ہے، انہیں idempotent ELT pipeline کے ذریعے process کرتا ہے جس میں `FOR UPDATE SKIP LOCKED` batch claims شامل ہیں، اور analytical constructs کو pure SQL میں compute کرتا ہے—30 منٹ کی session boundaries window functions کے ذریعے اور account-level dimensions پر weekly conversion funnels۔ Materialized views Grafana dashboards کے لیے pre-aggregated metrics فراہم کرتی ہیں جبکہ row-level security tenant data کو الگ رکھتی ہے۔
اہم architectural patterns میں three-schema design شامل ہے جو staging, warehouse, اور analytics layers کو الگ کرتی ہے؛ monthly range-partitioned fact tables partition pruning کے ساتھ؛ chronological event timestamps پر BRIN indexes؛ malformed payloads کے لیے dead-letter queue؛ اور concurrent-safe pipeline execution جو simultaneous runner instances کے بغیر duplicate processing برداشت کرتا ہے۔ پروجیکٹ Alembic migrations, Prometheus metrics exposure, integration tests کے ساتھ آتا ہے جو exact funnel rates اور retention isolation کو assert کرتی ہیں، اور partition-pruning speedups دکھانے والا ایک benchmark script بھی شامل ہے۔
Deployment Podman containers پر منحصر ہے جو PostgreSQL, API server, اور Grafana کو orchestrate کرتے ہیں، جس میں ایک single `make demo` command ہر چیز provision کرتی ہے، simulated user activity generate کرتی ہے، transformation pipeline چلاتی ہے، اور visualization layer شروع کرتی ہے۔
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.