Skip to content

About

Demo program for Seattle Startup Summit

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

EloqKV vs Neon — E-Commerce Recommendation Demo

Side-by-side database performance comparison for e-commerce recommendation queries. Demonstrates the latency difference between EloqKV Cloud (Redis-compatible) and Neon Cloud (PostgreSQL) when data exceeds the buffer pool.

Quick Start

# Install dependencies
npm install

# Copy env file and fill in your credentials
cp .env.local.example .env.local

# Run locally
npm run dev

Environment Variables

Variable Description
NEON_DATABASE_URL Neon PostgreSQL connection string
ELOQKV_HOST EloqKV hostname
ELOQKV_PORT EloqKV port (default: 6379)
ELOQKV_USERNAME EloqKV username
ELOQKV_PASSWORD EloqKV password

Seeding Data

CLI (recommended for large datasets)

# Small test (1K users, ~100K records) — takes ~1-5 minutes
npm run seed:small

# Large demo (1M users, ~100M records) — takes hours
npm run seed:large

# Target a specific database
npm run seed:neon
npm run seed:eloqkv

UI

Navigate to /import in the web app to configure parameters and trigger imports via the browser.

Tunable Parameters

Parameter Small Large Description
Users 1,000 1,000,000 Number of users
Products 1,000 1,000 Product catalog size
Categories 50 50 Number of categories
Avg Purchases 100 100 Average purchases per user
Min Purchases 50 50 Minimum purchases per user
Max Purchases 150 150 Maximum purchases per user

How It Works

  1. Each user has ~100 purchase records stored as individual rows (Neon) / keys (EloqKV)
  2. The recommendation algorithm fetches 100 purchases, computes a weighted category score, and returns the best-seller in the top category
  3. With ~8 GB of data exceeding the buffer pool, Neon must perform ~100 random disk reads per query
  4. EloqKV handles the same access pattern efficiently with SRANDMEMBER + MGET

Deploy to Vercel

vercel deploy

Set environment variables in the Vercel dashboard. For the maxDuration setting (60s), a Vercel Pro plan is recommended.

About

Demo program for Seattle Startup Summit

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages