frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Show HN: Sentinel – prevent duplicate execution using Postgres

https://github.com/Sreejay-reddy/Sentinel
2•Sreejay_reddy•1h ago
A customer is charged twice, data is processed twice in an ETL pipeline or hundreds of other scenarios when you have to atomically analyse your code to prevent race conditions. Most teams use Redis Setnx or have homegrown lease tables and idempotency tables, try to make every endpoint idempotent or check and update in the same transaction or adopt very heavy commitment infra what if you could do it with just postgres ? I had to do the same, an idempotency table with states with the frontend sending a randomised session id Made my endpoint that receives payment webhooks always check and update This was annoying, to say the least to do across inventory, orders and payments My entire infrastructure depends on postgres select for update and wherever i forgot to put it, say across a direct order or cart order, a race condition lives So i made Sentinel, zero infra just postgres, it makes any endpoint you wrap it around functionally idempotent, it's caches the result and replays it, handles the entire life cycle from the work being claimed till completion with any errors being surfaced with reconciliation tooling Uses fencing tokens to throw out stale work, leases and heartbeat for the lifetime of the work and states to track progress.

from sentinel import Sentinel import psycopg

sentinel = Sentinel(get_conn=get_conn)

def process_payment_webhook(charge_id: str, amount: int): result = sentinel.once( key=f"stripe-webhook:{charge_id}", fn=charge_customer, kwargs={"charge_id": charge_id, "amount": amount}, ttl_ms=5000, hard_ttl_ms=30000 )

    if result.execution_alive:
        # Another worker is actively processing this charge
        return {"status": "processing"}

    elif result.uncertain:
        # Execution failed midway, side effects may have partially applied
        # Use reconciliation tooling to inspect and resolve
        return {"status": "uncertain", "reconcile": result.reconcile}

    else:
        # Newly completed or replayed from cache
        # Safe to return regardless of how many times this webhook fired
        return {"status": "ok", "response": result.response}
 
AsyncSentinel is available for async contexts.

Temporal and Airflow assume your tasks are idempotent. Sentinel is what makes them actually idempotent.

"GitHub: github.com/Sreejay-Reddy/Sentinel | pip install sentinel-coordination"

Plakar: Open-source backup tool, 95% faster restores in v1.1.3

https://www.plakar.io/posts/2026-06-16/plakar-v1.1.3-is-here/
1•vcoisne•1m ago•0 comments

OAuth proves who you are. Wallet auth proves what you hold

https://insumermodel.com/blog/one-thesis-five-companies.html
1•dcborthwick•1m ago•0 comments

Stop Destroying Videogames Submission and Examination

https://citizens-initiative.europa.eu/stop-destroying-videogames_en
1•ortusdux•2m ago•0 comments

Ask HN: How do you stay at the bleeding edge of AI tooling?

1•otekengineering•2m ago•0 comments

FastAPI and Nuxt and Web3 Boilerplate

https://www.pynuxt.com/en/
1•k0ngz1•5m ago•1 comments

Claude Workout Gate

https://github.com/BotchetDig/workout-gate
1•kyleblarson•6m ago•0 comments

U.S. battery industry cuts losses, shifts to new ventures amid EV bust

https://www.dallasfed.org/research/economics/2026/0303
1•speckx•6m ago•0 comments

Pinning down a hardware bug in Intel 13th/14th gen CPUs

https://fgiesen.wordpress.com/2025/05/21/oodle-2-9-14-and-intel-13th-14th-gen-cpus/
1•fanf2•6m ago•0 comments

GLM-5.2: Built for Long-Horizon Tasks

https://z.ai/blog/glm-5.2
1•meetpateltech•7m ago•1 comments

Show HN: Ito – Code reviews that run code

https://www.ito.ai
2•evanmarshall•8m ago•0 comments

Oxford Digital News Report 2026

https://reutersinstitute.politics.ox.ac.uk/digital-news-report/2026
2•thm•8m ago•0 comments

How to Demolish a Bridge

https://practical.engineering/blog/2026/6/16/how-to-demolish-a-bridge
1•crescit_eundo•10m ago•0 comments

Publishers Sue WeLib for Copyright Infringement

https://www.publishersweekly.com/pw/by-topic/digital/copyright/article/100652-publishers-sue-pira...
2•ilamont•10m ago•0 comments

The Google / Xreal Aura XR glasses are now available to preorder

https://www.theverge.com/gadgets/950597/xreal-google-aura-xr-glasses-deposit-scheme
1•MehrdadKhnzd•10m ago•0 comments

Ipcrawl: A living atlas of open webcams discovered on the public internet

https://ipcrawl.com
1•arm32•10m ago•0 comments

Show HN: I made Oregon Trail for founders (paste your company URL)

https://foundertrail.vercel.app/
1•jgvandehey•11m ago•1 comments

Piu

1•mostafaabdrabu•11m ago•0 comments

Microsoft Clarity Is Down?

https://clarity.microsoft.com/
1•rkj93•11m ago•0 comments

Jami – Feature Drop: Shared Services

https://jami.net/shared-services/
1•kevincox•11m ago•0 comments

FBI disrupted alleged terror plot targeting White House UFC event [video][5 min]

https://www.youtube.com/watch?v=JCLN9psHjxY
1•Bender•12m ago•0 comments

Simdjson: Parsing gigabytes of JSON per second

https://github.com/simdjson/simdjson
1•saikatsg•14m ago•0 comments

A satellite just learned to find things on its own – here's what that means

https://techcrunch.com/2026/06/15/a-satellite-just-learned-to-find-things-on-its-own-heres-what-t...
1•speckx•14m ago•0 comments

Microsoft turns to Amazon for help with GitHub's AI-driven capacity issues

https://www.businessinsider.com/microsoft-github-amazon-ai-cloud-capacity-2026-6
1•otterley•15m ago•0 comments

Third SAIR competition: inverse Galois challenge

https://terrytao.wordpress.com/2026/06/16/third-sair-competition-inverse-galois-challenge/
1•jjgreen•15m ago•0 comments

At first, it does sound crazy: meet the scientists trying to refreeze the Arctic

https://www.theguardian.com/environment/2026/jun/16/arctic-sea-ice-rethickening-climate-geoengine...
1•robaato•18m ago•0 comments

Claude: Elevated errors across many models

https://status.claude.com/incidents/xmhsglsz3h3w
47•forks•18m ago•13 comments

Logical Ways to Track AI Agent Lineage and State in Code Development

https://davenporter.substack.com/p/how-to-track-ai-agent-lineage-and
1•davenportjw•18m ago•0 comments

Making things: interview series on creativity

https://digitalseams.com/blog/making-things-interview-series
1•bobbiechen•22m ago•0 comments

How to Use an Nvidia EGPU with Your Mac for Local AI in 2026

https://www.compute-market.com/blog/nvidia-egpu-mac-local-ai-setup-2026
3•falava•22m ago•0 comments

Show HN: VulnFeed – 9 security tools your AI agent can call (MCP server)

https://vulnfeed.novadyne.ai/
1•ngburke•22m ago•1 comments