Shashank Dhiman

Selected work

Four production systems.

One year. Mostly backend. Built where the failure modes mattered.

messages.sql

postgres

-- Keyset cursor pagination · index seek, not table scan
SELECT m.*, u.name, u.avatar
FROM messages m
JOIN   users u ON u.id = m.sender_id
WHERE  m.conversation_id = $1
  AND  m.created_at < $2   -- cursor: last seen ts
ORDER BY m.created_at DESC
LIMIT $3;
02 / Sub-second chat at scaleMasters' Union · production

Real-Time Messaging

End-to-end messaging — DMs, group channels, presence, read receipts. Keyset cursor pagination replaced an O(n) offset scan with an O(log n) index seek. A Redis cache layer covers the hot path so PostgreSQL barely sees it.

  • −70%API latency
  • −60%DB round-trips
  • node
  • socket.io
  • redis
  • postgres
Case study · soon
LMSevents01SQSqueue02LAMBDAclassify · transform03CLICKHOUSEyyyymm partitions04APImulti-tenant05−55% query timeevent-driven · columnar
03 / Serverless ingest, columnar queryMasters' Union · production

Event Analytics Pipeline

Event-driven analytics: thousands of LMS events per day flow through Lambda into ClickHouse with YYYYMM partitioning and composite sort keys. A regex classifier maps raw events into nine categories, configurable without redeploy.

  • −55%query time
  • 9+event categories
  • aws lambda
  • sqs
  • clickhouse
  • node
Case study · soon

webhook.ts

typescript

// Webhook is the source of truth — client confirmation is never trusted
const event = stripe.webhooks.constructEvent(
  req.body,
  req.headers["stripe-signature"],
  process.env.STRIPE_WEBHOOK_SECRET,
);

if (event.type === "payment_intent.succeeded") {
  await Order.markPaid(event.data.object.metadata.orderId);
}
04 / MERN · payments · authQspider · internship

Eventify

Full-stack event platform with Stripe payments, JWT auth, and role-based access control. Order state lives in the webhook handler — never trusted to the client confirmation — so a closed browser doesn't lose a paid order.

  • 0lost payments
  • 3user roles, scoped
  • react
  • node
  • mongo
  • stripe
Case study · soon

Only one case study is shipped today. The others sit on a queue — deep dives in the order I have something new to say.