SShortSingh.
Back to feed

Node.js Daily Shipment Reports Use Durable Jobs for Subscriber Email Delivery

0
·5 views

The article explains a design for scheduling daily shipment report emails to subscribers in a Node.js backend. It recommends using cron to start a single coordinator, which then creates one durable, idempotent delivery job per subscriber. The author argues that email fan-out, rather than the single scheduled trigger, drives most of the cost and that a delivery ledger provides proof of delivery per recipient. Recovery after crashes is simplified by recording attempts and terminal states, with acknowledgements determining which unfinished work is retried. The piece also weighs whether to retain full rendered message bodies or only compact metadata, a choice it says should be governed by compliance requirements.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

GPUStack and vLLM in Production: Capping KV Cache to Prevent Out-of-Memory Crashes

A small on-prem team running four mixed-GPU nodes replaced ad hoc Docker wrappers with GPUStack, a control plane that places models across available GPUs and exposes an OpenAI-compatible endpoint. The platform worked as advertised, but its VRAM placement estimate ignores activation peaks, CUDA graph capture, and real prompt lengths, treating context as a fixed budget rather than a per-sequence cost. Running a 70B model under long-prompt traffic caused repeated worker out-of-memory crashes, which the team traced to KV cache growth multiplied by concurrency. They stabilized deployments by pinning max context length, lowering GPU memory utilization, capping concurrent sequences, and disabling host swap, with a similar approach applied to llama-box on the heterogeneous node. The write-up also notes a separate throughput decline over time that was still under investigation.

0
ProgrammingDEV Community ·

Five Habits That Turn a Vibe-Coded Demo Into a Working Product

Agent-generated apps can run well on the builder's own machine yet fail elsewhere, because local tools, leftover environment settings, or uncommitted files hide the real problems. The article recommends cloning the project into an empty folder and following the README to catch these gaps early. It also urges storing secrets in git-ignored environment files, reviewing agent-written changes carefully (especially around data, payments, login, and secrets), and testing failure cases such as empty inputs or a down dependency. For multi-service apps, it suggests a single startup command with readiness checks, and it closes by advising a usability test with someone who has not seen the app before.

0
ProgrammingDEV Community ·

Udhaar Book turns photos of shop credit notebooks into tracked balances and reminders

A developer has built Udhaar Book, an open-source tool that reads a photo of a shopkeeper's handwritten credit ledger, known as a khata. An open-weight AI model extracts the entries, with a deterministic parser as a fallback when no API key is available. The shopkeeper must confirm every line before anything is recorded, and the app tracks running balances per page. Reminders are generated in English, Hindi, or Marathi, with amounts pulled from the ledger rather than the model. The project runs at no cost using free-tier models and a local SQLite file, and was submitted to a Hacktoberfest challenge.

0
ProgrammingDEV Community ·

Leakage-Aware Model Predicts Diabetic Hospital Readmission Using 100,000 Encounters

The author built a model to predict hospital readmission for diabetic patients using roughly 100,000 hospital encounters from 1999 to 2008. Records were grouped by patient so that no individual appeared in both training and test sets, guarding against data leakage. The model reached a ROC-AUC of about 0.69, clearly beating a majority-class baseline that identified no readmitted patients, though gradient boosting offered little gain over logistic regression. The decision threshold was chosen on training data, and calibration showed predicted risk closely matched observed risk. The author stresses that the model was trained on US data and would need local validation before any use in Kenya or other settings.