Fetch Rewards · FAST AI Platform & Platform Foundations
Architecting High-Throughput FAST AI Platforms, Streaming Data, & DevEx Tooling
Architectural blueprint and interactive system prototype for the Fetch Rewards FAST AI Platform and Platform Foundations team. Bridging core ML models to brand managers across Fetch's 27PB Data Lake using async Python backends, type-safe API boundaries, and real-time streaming interfaces.
Ingestion Scale
600 → 10,000 rows/run with bounded memory
Annual API Savings
Redis semantic cache with 38% hit rate
Real-Time Streaming
Kafka distributed event pipeline (0 dropped)
Production Uptime
FDA 21 CFR Part 11 regulated systems
FAST Real-Time Ingestion, OCR & Agent Execution Engine
Test the live architecture under simulated high-throughput receipt traffic. Benchmarks Server-Sent Events (SSE), SKU brand matching, and background agent orchestration over the 27PB lakehouse.
Pipeline Controls
Pantry & Groceries Run (Kroger #4910)
Target Brand Partners: PepsiCo & Unilever
| SKU / Item Name | Brand Attribution | Price | Base Pts | Earned Points |
|---|
3-Tier Enterprise Architecture: Fetch FAST AI Platform
Scalable, distributed blueprint connecting mobile receipt clients, async Python streaming backends, 27PB Iceberg lakehouse analytics, and type-safe frontend dashboards.
Tier 1: Edge, Ingestion & Real-Time Event Bus
High-Throughput Receipt Intake & Kafka Event Streaming
Cloudflare Edge & WAF
Cloudflare / Envoy GatewayTLS termination, global Anycast routing, DDoS mitigation, and edge token inspection.
Kafka Ingestion Bus (4M req/min)
Apache Kafka / MSKDistributed partitioning by `user_id` & `merchant_id` ensuring strict FIFO ordering per receipt.
Circuit Breaker & Rate Limiter
Redis Token BucketToken-bucket throttling protecting downstream OCR services during high-volume promotional spikes.
Staff-Level Architectural Trade-offs & Guardrails
- ›Partitioning by `user_id` avoids hot-partition bottlenecks while guaranteeing per-user idempotency.
- ›Async event decoupling allows the mobile app to return immediate 202 Accepted (<45ms).
Zero-Trust Sequences, Async Backpressure & Type Contracts
Detailed technical workflows solving real-time streaming timeouts, schema drift between Python and TypeScript, and multi-model cost attribution.
Server-Sent Events (SSE) Streaming with Bounded Queue & Reconnection
Solves AWS ALB 60s idle socket timeouts and client drops during heavy analytics queries.
Client Connect
GET /api/v1/receipts/stream with JWT & Last-Event-ID header.
Bounded Queue
FastAPI assigns asyncio.Queue(maxsize=100) preventing RAM bloat.
15s Heartbeats
Async task emits ': ping\n\n' every 15s preventing proxy timeout.
Redis Pub/Sub
Worker pushes OCR chunks to user stream channel id.
Auto Replay
On drop, client reconnects; Redis replays unacknowledged tokens.
async def event_generator(user_id: str, last_event_id: Optional[str] = None):
queue = asyncio.Queue(maxsize=100) # Bounded backpressure queue
redis_client = await get_redis_pool()
# Replay missed events from Redis stream if reconnecting
if last_event_id:
missed = await redis_client.xrange(f"stream:{user_id}", min=last_event_id)
for msg_id, payload in missed[1:]:
yield f"id: {msg_id}\ndata: {payload['data']}\n\n"
try:
while True:
try:
# Wait for token with 15-second heartbeat timeout
data = await asyncio.wait_for(queue.get(), timeout=15.0)
msg_id = await redis_client.xadd(f"stream:{user_id}", {"data": data})
yield f"id: {msg_id}\ndata: {data}\n\n"
except asyncio.TimeoutError:
# Keep-alive comment ping prevents AWS ALB / Cloudflare socket termination
yield ": ping\n\n"
except asyncio.CancelledError:
logger.info(f"SSE stream closed gracefully for user {user_id}")Production Algorithms for Fraud, SKU Graphs & Points Optimization
Hands-on code execution and algorithmic state machines solving real-world receipt fraud, fuzzy brand classification, and promotion rewards maximization.
Sliding Window Log Velocity Limiter (Redis ZSET: O(log N) Time / O(N) Space)
Prevents automated receipt injection fraud by validating uploads against a rolling time window.
async def is_receipt_upload_allowed(user_id: str, now: float, window_sec: int, max_req: int) -> bool:
key = f"rate_limit:receipt:{user_id}"
cutoff = now - window_sec
# 1. Atomic pipeline: prune expired keys + insert current + count
pipe = redis.pipeline()
pipe.zremrangebyscore(key, 0, cutoff) # Remove timestamps older than window
pipe.zadd(key, {str(now): now}) # Add current receipt upload
pipe.zcard(key) # Count items in active window
pipe.expire(key, window_sec + 5)
_, _, current_count, _ = await pipe.execute()
return current_count <= max_reqProduction Arsenal & Career Provenance
7+ years of battle-tested experience building high-throughput distributed backends, AI platforms, and compliance-grade architectures.
Airbnb
Current RoleSenior Software Engineer, ML Infrastructure & AI Engineering (GenAI Platform)
- ✓Architected BPI Virtual Analyst (greenfield-to-production) for 128+ daily active enterprise analysts, scaling tabular batch ingestion 16x (600 to 10,000 rows/run) with bounded memory streaming.
- ✓Built FacadeDriver multi-model Python runtime standardizing 30+ foundation models (Bedrock Claude, Azure OpenAI, Vertex AI) with OpenTelemetry cost attribution and Redis semantic caching, saving $180,000/year.
- ✓Engineered automated 23-version evaluation harness (1,690 ground-truth test cases) ensuring deterministic regression testing across all model upgrades.
- ✓Operate on-call rotations for foundational Redpen Airflow & BigAir data pipelines handling high-throughput batch uploads across 19 production configs in 11+ languages.
Eli Lilly and Company
FDA RegulatedSenior Software Engineer — Dose Management Platform (FDA 21 CFR Part 11)
- ✓Engineered mission-critical radiopharmaceutical distribution backend maintaining 99.9% uptime across 6 months under strict federal compliance.
- ✓Built dynamic gRPC `GrpcMetadataProvider` for Kubernetes ServiceAccount token rotation on disk, eliminating worker starvation and manual pod restarts.
- ✓Created self-healing `/fix-temporal` state re-arming engine to resync Temporal workflow histories with PostgreSQL after disaster recovery restores.
- ✓Engineered atomic gap-free ID generation (`CMCDOS-2031`) preventing PostgreSQL sequence skips and FDA compliance deletion flags.
Southwest Airlines
Distributed SystemsSenior Software Engineer — Backend & Data Platform
- ✓Scaled distributed Kafka event streaming pipelines processing 4,000,000 requests/minute peak with zero message drop across high-volume flight operations.
- ✓Built resilient consumer group partition rebalancing logic and dead-letter queue (DLQ) retry topologies.
Shell PLC
ML SystemsSenior Software Engineer — Backend & Data Science
- ✓Architected deep learning autoencoder anomaly detection pipelines for real-time sensor telemetry across global asset networks.
Modular Deep Learning Architecture for Cross-Domain Transfer and Incremental Learning
App. No.: 202541026299 (Indian Patent Office) · Continuous parameter isolation & zero catastrophic forgetting.
Embracing the Future of Work: AI as an Accelerator & Demos > Memos
At Fetch, we embrace using AI thoughtfully to move faster and think better. Here is how my engineering creeds, production track record, and working style align directly with Fetch's core values.
AI as an Accelerator, Not a Substitute
Authenticity, transparency, and tighter feedback loops.
"Show how you use AI not just to move faster, but to think better: to drive clearer decisions, tighter feedback loops, and stronger outcomes."
Demos > Memos (Bias Toward Action)
Working software resolves debates faster than speculative memos.
"You could have built a prototype during the meeting. Ship what solves the immediate friction, verify empirical metrics, then iterate."
Small Teams Ship Exponentially Faster
High agency, tight customer feedback, zero bureaucratic drag.
"Listen, build, ship, tell the user, repeat. Product adoption and real-world outcomes always outweigh raw code volume."
The 4 Core Evaluation Pillars
Mapped directly to Fetch's senior engineering scope and technical expectations.
Technical Experience & Project Ownership
Spearheaded platform foundations across Airbnb GenAI Platform, Eli Lilly FDA Part 11 validation, and Southwest Airlines high-throughput event streaming.
Delivered 16x throughput scaling (from 600 to 10,000 rows/run, 40MB batch uploads) by implementing bounded memory queues and decoupled async workers.
Authored Indian Patent 202541026299 for modular deep learning architecture with cross-domain transfer learning.
Architectural Deep Dive & Open System Inquiries
Prepared high-agency inquiries exploring the FAST AI platform architecture, distributed lakehouse streaming, and developer foundations:
Background Agent Sandboxing & Skills Registry
Inquiry 1"In multi-step autonomous agent workflows, how does the FAST platform approach type-safe tool schemas, runtime execution sandboxing, and dynamic skill registration across shared microservices?"
Real-Time Streaming vs. 27PB Batch Analytics
Inquiry 2"For analytical platform UIs, what does the architectural trade-off look like between real-time streaming interfaces (WebSockets/SSE) and asynchronous background batch processing across the 27PB data lake?"
0-to-1 Velocity vs. Platform Foundations
Inquiry 3"How does the engineering org balance rapid 0-to-1 feature velocity for brand managers with long-term platform stability and shared component developer experience for the rest of Fetch's engineering teams?"