The four-line cron that decides who falls in love (in my dating app)
A new dating app utilizes a simple four-line cron job to manage its matching process. The app's matching engine relies on a Postgres function and a straightforward scoring system based on user profiles. This approach contrasts with more complex systems used by other dating apps, demonstrating efficiency in generating matches.
- ▪The dating app's matching engine consists of a Postgres function and a launchd job that runs every hour.
- ▪Matches are determined by a score in a suggested_matches table, rather than mutual swipes.
- ▪The candidate generation process is simplified to a single SQL query using pgvector's cosine distance operator.
Opening excerpt (first ~120 words) tap to expand
try { if(localStorage) { let currentUser = localStorage.getItem('current_user'); if (currentUser) { currentUser = JSON.parse(currentUser); if (currentUser.id === 3933445) { document.getElementById('article-show-container').classList.add('current-user-is-article-author'); } } } } catch (e) { console.error(e); } gyani Posted on May 27 The four-line cron that decides who falls in love (in my dating app) #architecture #automation #postgres #showdev 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.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at DEV.to (Top).