惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Schneier on Security
F
Fortinet All Blogs
B
Blog
GbyAI
GbyAI
P
Proofpoint News Feed
量子位
The Register - Security
The Register - Security
宝玉的分享
宝玉的分享
大猫的无限游戏
大猫的无限游戏
云风的 BLOG
云风的 BLOG
V
Visual Studio Blog
B
Blog RSS Feed
WordPress大学
WordPress大学
Recorded Future
Recorded Future
Recent Announcements
Recent Announcements
V
Vulnerabilities – Threatpost
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Secure Thoughts
雷峰网
雷峰网
Stack Overflow Blog
Stack Overflow Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Webroot Blog
Webroot Blog
AWS News Blog
AWS News Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
The GitHub Blog
The GitHub Blog
爱范儿
爱范儿
O
OpenAI News
月光博客
月光博客
H
Hacker News: Front Page
S
Security Affairs
W
WeLiveSecurity
The Hacker News
The Hacker News
aimingoo的专栏
aimingoo的专栏
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Help Net Security
Help Net Security
MongoDB | Blog
MongoDB | Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
D
Docker
T
The Blog of Author Tim Ferriss
Spread Privacy
Spread Privacy
Blog — PlanetScale
Blog — PlanetScale
J
Java Code Geeks
S
Securelist
Microsoft Azure Blog
Microsoft Azure Blog
TaoSecurity Blog
TaoSecurity Blog
T
Threat Research - Cisco Blogs
M
MIT News - Artificial intelligence
A
About on SuperTechFans

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
The four-line cron that decides who falls in love (in my dating app)
gyani · 2026-05-27 · via DEV Community

I shipped a dating app five months ago. The matching engine is one Postgres function, a 100-line edge function, and a launchd job on my desk that hits a route every hour. No queue, no worker, no fancy ML stack. Here is the whole thing in order, and the small disaster that taught me to move the cron off Vercel.

What a "match" actually is

In most dating apps a match is a mutual swipe. In ours a match is a row in a suggested_matches table with a score above a threshold. Two profiles, one float in [0, 1], and a reason that gets shown to both sides.

The pipeline that creates that row is short.

launchd (hourly, on my Mac)
   |
   v
GET /api/cron/generate-matches  (Next.js route, bearer-guarded)
   |
   v
Supabase Edge Function  (Deno, batches users)
   |
   v
pgvector ANN  (top 100 candidates per user, cosine over embedded prompts)
   |
   v
Linear scorer  (four hand-weighted features over the candidate set)
   |
   v
INSERT into suggested_matches  (above threshold only)

Enter fullscreen mode Exit fullscreen mode

Five steps. The interesting line is the rerank.

The candidate generation step (and why I let pgvector do it)

Each user writes a small set of prompt responses on onboarding. We embed those responses with a single embedding call. That vector is one row in vibe_profiles.

Generating candidates for one user is then literally:

SELECT user_id, embedding <=> $1 AS cosine_distance
FROM vibe_profiles
WHERE user_id <> $1_user_id
  AND completed_at IS NOT NULL
  AND intent_overlap($1_intents, intents) > 0
ORDER BY embedding <=> $1
LIMIT 100;

Enter fullscreen mode Exit fullscreen mode

<=> is pgvector's cosine distance operator. Smaller is closer. intent_overlap is a Postgres function that returns the size of the intersection between two intent arrays (relationship, friendship, community).

I do not run ANN search myself. I do not pre-cluster. I do not maintain a separate vector store. pgvector handles the index, the operator, the query plan, the lot. The whole "candidate generation" layer that other dating apps build entire microservices for is one ORDER BY clause.

This was the first decision that surprised me about how cheap the whole thing turned out to be.

The rerank step is four weighted features

Cosine alone is a good first pass and a bad final answer. Two profiles can be vector-near because both write reflectively and recurse on the same word, even if their actual lives have no overlap. So the top-100 candidates get rescored.

The rescorer is a linear function over four features, each in [0, 1]:

function vibeScore(seed: Profile, cand: Profile): number {
  const sim    = 1 - cosineDistance(seed.vec, cand.vec);
  const intent = intentOverlap(seed.intents, cand.intents);
  const cad    = cadenceMatch(seed.cadence, cand.cadence);
  const geo    = geoFit(seed.geo, cand.geo);

  return 0.55 * sim
       + 0.20 * intent
       + 0.15 * cad
       + 0.10 * geo;
}

Enter fullscreen mode Exit fullscreen mode

That is the whole matcher.

Some notes on the weights:

  • sim carries the most weight because the prompt embedding is doing the real semantic work. The other three are guards.
  • intent is binary-ish in practice: if you are here for community and I am here for a relationship, the overlap is small and the score collapses.
  • cad (cadence) is a derived feature from how long a user takes to write a single prompt response. It is a very weak proxy for "how this person uses written language", but it correlates surprisingly well with whether a thread between two users sustains past day three. Worth its 15%.
  • geo is intentionally last and intentionally small. Most users care less about distance than they tell themselves they do, and weighting it more produces matches that are geographically convenient and texturally identical.

I tuned these by hand against the first ~50 matches that produced sustained threads, not by training a model. The set was too small for anything else. I will probably keep it that way until the set is too big for me to read in an afternoon, and even then I will resist.

The insert step is two lines

const above = scored.filter(s => s.score >= 0.45);
await sb.from("suggested_matches").upsert(above);

Enter fullscreen mode Exit fullscreen mode

Threshold 0.45 was empirically the floor below which users stopped reaching out. There is no clever pruning beyond that. Upsert handles the case where the same pair gets surfaced by both directions of the cron in the same window.

The cron is where I burned a day

This is the part that humbled me.

When I wrote the Vercel cron entry, I set the schedule to 0 * * * * (every hour at the top of the hour). The Vercel CLI accepted it locally. The build then rejected it with a quiet error because hourly crons are not on the Hobby plan. Worse, the rejection blocked the deploy. Every subsequent push hung in the build queue with a confusing error. I had a stack of essays sitting in PRs that I could not figure out why were not landing.

I burned half a day before I tracked it down. The fix in the end was two parts:

  1. Revert the Vercel cron to daily (0 0 * * *) so deploys flow again. Keep the function exactly as it is.
  2. Trigger the function from my own machine, hourly, via launchd:
   # scripts/matches_hourly.sh
   curl -X GET \
     -H "Authorization: Bearer $INTERNAL_CRON_SECRET" \
     https://byvibration.com/api/cron/generate-matches

Enter fullscreen mode Exit fullscreen mode

   <!-- ~/Library/LaunchAgents/com.byvibration.matches-hourly.plist -->
   <key>StartCalendarInterval</key>
   <dict><key>Minute</key><integer>0</integer></dict>

Enter fullscreen mode Exit fullscreen mode

The Vercel daily cron stays as a fallback for when the Mac is off. The hourly cadence comes from my own machine.

This feels janky in writing. It is fine in practice. A launchd entry on a Mac that is plugged in and caffeinated is more reliable than a Vercel cron on the free tier, and crucially it does not block deploys. The whole story of moving a cron off a hosted platform took thirty minutes, and the only thing it required was admitting that "real" infrastructure is not always the one with the prettier dashboard.

What I took from the build

Three things stayed with me after this pipeline landed.

The first is that the matcher is much smaller than people assume. Four features and a vector op. The intelligence is in the prompts the user writes, not in the math the engine does on top of them. If your matching layer is a regression model with 80 features, you are matching on noise.

The second is that cosine + a tiny linear rerank gets you a long way before you need to reach for anything heavier. The temptation to put a transformer-shaped thing in the rerank is real and almost always premature. Cosine over good prompt embeddings is already doing more lifting than any small model you would slot in.

The third is that you should put the cron where your deploys do not have to talk to it. The amount of incidental fragility you remove by detaching scheduled jobs from your hosting platform is genuinely surprising.


I work on byvibration, a dating and friendship app that matches by what people write, not by photos. The whole matcher described above is in the soulmate-core repo (MIT, 65 passing tests). If any of this resonates and you want to see how the four-feature rerank reads on real prompts, that is what the live site does.