Skip to content
View technobasant's full-sized avatar

Block or report technobasant

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Content in all repositories owned by your account will be closed.
Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
technobasant/README.md

Hi, I'm Basant Bhattarai

Data & AI Architect · Senior Data Engineer in Kathmandu. I design data platforms, the governance around them and the AI on them, then build them: nine years in software, six on production data platforms.

  • Moving analytics off the product's Postgres. Measure first, stop the damage, then scale out or migrate in stages with a way back. In production, two single-server Postgres databases, one of them a pgvector store, moved to Citus.
  • Platforms chosen on evidence and run at scale. A proof of concept on criteria fixed in advance, then ingestion, lakehouse and serving that stay correct, recoverable and affordable: a 15 TB+ production footprint, 100M+ events a day, 99.9% uptime.
  • Governance an auditor can check. Classification, masking, contracts and access review designed into the data model; SOC 2 controls for the platform and its infrastructure; erasure measured, not assumed.
  • AI on governed data. LangGraph, Google ADK and MCP agents whose output is typed, evaluated and reviewable before it becomes state, with isolation enforced outside the model. Analytics delivery 60% faster.

Start here — two reference architectures for a scenario common across the industry, published in full and measured

  • data-platform-architecture — a SaaS company leaving Postgres: the current state measured on a copy of its database at its peak rate (reports on the primary took the product's p95 from 40 to 525 ms; on the replica 3 of 35 long reports finished), options priced in its EU region, a staged target, a data model across four domains, governance with SOC 2 readiness (a 21-control matrix), migration and 18 decisions with machine-checked evidence; keeping personal data in one table cut what erasing one person rewrote from 31.8 million event rows to 60,000. A proof of concept on Databricks: the smallest warehouse ran the reports in under 3 s, a day's work took 38 s and was billed for 11 minutes awake, and Terraform owned 6 of 7 kinds of governance object. · case study
  • ai-platform-architecture — the same company's usage assistant, text-to-SQL over governed data, measured on Qwen3, Llama 3.3, gpt-oss and Databricks Genie: told to stay in one customer's data, the models leaked on 23 of 120 requests; a default-deny query rewrite matched row-level security on every query they wrote and refuses 44 of 44 hand-written escapes; a semantic layer took Llama 3.3 70B from 55 to 70 of 70. · case study
  • Choosing where the data lives — the decision guide behind them: RDS, Citus, TimescaleDB, ClickHouse, Trino, Iceberg and pgvector, by workload, with the measurements behind each rule.

Production use cases

Data platforms

Databases

AI systems

Open source — each with its method and measurements in the repository; case studies, grouped the same way, at basantbhattarai.com.np/work

Data platforms

  • streaming-platform — Kafka, Flink, ClickHouse and Iceberg with Avro contracts and a freshness SLO; every event counted at every layer, exactly-once through broker kills, TaskManager kills and stalls. · case study
  • spark-sql-kinesis Maven Central — Kinesis source and sink for Spark 4.2 Structured Streaming on AWS SDK v2. Upgrades in place: the checkpoint format is byte-identical, so no drain. · case study
  • dataset-registry — ownership before consumption, as a product: owners, freshness SLOs, versioned JSON Schema contracts, OpenLineage lineage, and breaking changes that wait for consumer acknowledgement. Go, PostgreSQL, Next.js. · case study
  • data-stack-lab — hands-on data engineering projects, one per tool, on one generated SaaS dataset with known answers, each checked in CI. dbt: a Type 2 dimension kept all 5,048 invoices on the plan they billed, where Type 1 moved 15.1% of revenue. Airflow 3: backfilled newest-first, high-water-mark loads lost 96.56% of a month with every run green. Data quality: nine injected defects; blocking let 0 of 3,198 bad rows through, and only control totals, volume and per-platform share saw the rows that never arrived. Spark: re-running one day with the default overwrite mode left 1 of 365 daily partitions. Databricks: a truncated file corrected under the same name was skipped by COPY INTO and Auto Loader, losing 1,638 events. · case study
  • lakehouse-lab — Iceberg on MinIO with Apache Polaris vending table-scoped credentials to Trino and StarRocks; dbt + Airflow medallion, compaction and rollback, every figure measured. · case study
  • rag-pipeline — scrape-to-RAG lakehouse: Airflow, Spark bronze/silver/gold on Delta and MinIO, Chroma, a FastAPI answer service, OpenLineage.

AI systems

  • governed-agent — an AI agent whose output becomes state only after a schema, a policy, a grounding check and, where required, a person: LangGraph + MCP, FastAPI with a PostgreSQL outbox, a Next.js review UI, measured on qwen3:8b. · case study
  • evalproof — LLM evaluation as measurement: calibrate the judge against a gold sample, correct its pass rate (ACC/PPI), and gate CI only on significant regressions. Local-first with Ollama; ships as a GitHub Action. · case study · live app · pip install evalproof
  • realtime-ml — real-time fraud scoring where leakage, training/serving skew and label delay are measured: Feast, LightGBM, MLflow, shadow serving, drift alerts and a paired-statistics promotion gate. · case study
  • retrieval-bench — pgvector, Qdrant and OpenSearch on the same embeddings: recall–latency curves, filtered-search recall collapse and its fixes, build cost, writes under load, and hybrid vs vector nDCG on public BEIR data. · case study
  • short-text-triage — label the string, not the row: multilingual embeddings, HDBSCAN and margin-banded assignment on a reproducible generated corpus; CI re-checks the figures. · case study
  • prevalence-shift — why counting predicted labels flattens a trend, and how ACC, SLD and prediction-powered inference fix it; CI re-runs all 1,000 replications. · case study · live app

Databases and distributed systems

  • distributed-db-lab — Postgres scale-out with Citus (migration planner, online rebalance under load with zero errors, tenant isolation), TimescaleDB at scale, and a 2×2 replicated ClickHouse cluster; every failure measured. · case study
  • db-failover-lab — six database engines, eight failover scenarios on real multi-node clusters: measured HA, sharding and backup/restore for PostgreSQL 18, Redis, MongoDB, ScyllaDB, SolrCloud and Galera. · case study
  • postgres-ha-lab — Patroni + etcd on amd64 Rocky 8 under QEMU and pgBackRest over mutual TLS: failover, replica rebuild and point-in-time restore actually performed. · case study

Delivery and infrastructure

  • platform-deployments — GitOps for governed-agent on a three-node Kubernetes cluster: Argo CD, an Argo Rollouts canary that aborted a bad release on its own in 6 of 6 runs, CloudNativePG, Kyverno and OpenTelemetry, plus Terraform for EKS. · case study

Upstream

  • awslabs/spark-sql-kinesis-connector#99 — an opt-in option to stop reading a shard once it is caught up, requested in the project's issue #11 (in review).
  • citusdata/citus#7333 — a minimal reproduction on Citus 14.2 of node removal leaving cleanup records behind, with the code path; an earlier report of mine, #4776, led to unnamed-constraint support on distributed tables.

Recent writing — measured, with the method stated; all 50 pieces, grouped by subject

Stack

Python · SQL · Go · TypeScript · Scala · Spark · Flink · Kafka · Kinesis · Airflow · dbt · Databricks · Unity Catalog · DuckDB · Iceberg · Trino · ClickHouse · PostgreSQL · Citus · pgvector · Kubernetes · Argo CD · Terraform · OpenTofu · AWS · LangGraph · MCP · MLflow · Feast · Next.js

basantbhattarai.com.np · Résumé · Work with me · LinkedIn · contact@basantbhattarai.com.np

Pinned Loading

  1. governed-agent governed-agent Public

    An AI agent whose output becomes state only after a schema, a policy, a grounding check and, where required, a person. LangGraph + MCP + FastAPI + PostgreSQL outbox + Next.js review UI, measured on…

    Python

  2. evalproof evalproof Public

    Treat LLM evaluation as measurement: calibrate the judge, correct its pass rate (ACC/PPI), and gate CI only on significant regressions. Local-first with Ollama.

    Python 1 1

  3. spark-sql-kinesis spark-sql-kinesis Public

    Kinesis source and sink for Spark Structured Streaming — Spark 4.2, Scala 2.13, AWS SDK v2. Maintained continuation of roncemer/spark-sql-kinesis.

    Scala 1

  4. distributed-db-lab distributed-db-lab Public

    Scaling PostgreSQL out with Citus, time-series with TimescaleDB, and a 2×2 replicated ClickHouse cluster: migration planner, online rebalance under load, tenant isolation, compression, and every fa…

    Python

  5. realtime-ml realtime-ml Public

    Real-time fraud scoring with leakage, skew and label delay measured: Feast (DuckDB + Redis), LightGBM, MLflow registry, FastAPI shadow serving, Kafka stream features, drift alerts and a paired-stat…

    Python

  6. streaming-platform streaming-platform Public

    Real-time clickstream platform where every event is counted at every layer: Avro contracts, exactly-once through Kafka and Flink into ClickHouse and Iceberg, a freshness SLO with burn-rate alerts, …

    Python