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

推荐订阅源

NISL@THU
NISL@THU
有赞技术团队
有赞技术团队
WordPress大学
WordPress大学
U
Unit 42
腾讯CDC
宝玉的分享
宝玉的分享
Y
Y Combinator Blog
V
Visual Studio Blog
C
Check Point Blog
N
Netflix TechBlog - Medium
云风的 BLOG
云风的 BLOG
博客园 - 聂微东
酷 壳 – CoolShell
酷 壳 – CoolShell
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
P
Privacy & Cybersecurity Law Blog
V
Vulnerabilities – Threatpost
The Hacker News
The Hacker News
人人都是产品经理
人人都是产品经理
Google DeepMind News
Google DeepMind News
Vercel News
Vercel News
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
N
News and Events Feed by Topic
aimingoo的专栏
aimingoo的专栏
S
SegmentFault 最新的问题
Engineering at Meta
Engineering at Meta
Cyberwarzone
Cyberwarzone
The Last Watchdog
The Last Watchdog
S
Secure Thoughts
Recorded Future
Recorded Future
阮一峰的网络日志
阮一峰的网络日志
博客园 - Franky
E
Exploit-DB.com RSS Feed
V
V2EX
S
Security Affairs
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
IT之家
IT之家
爱范儿
爱范儿
小众软件
小众软件
Last Week in AI
Last Week in AI
C
Cybersecurity and Infrastructure Security Agency CISA
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
O
OpenAI News
The Cloudflare Blog
Cloudbric
Cloudbric
L
Lohrmann on Cybersecurity
H
Hacker News: Front Page
C
Cisco Blogs
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Webroot Blog
Webroot Blog
月光博客
月光博客

Show HN

Release v1.3.0 — AI-Powered Migration Explanation & Migrations Folder Support · migradiff/migra Show HN: HumanForScale – See how big things are DropLock Show HN: Ego lite – why our browser agent writes JavaScript not CLI commands Extend AI · sound like you, everywhere SnapState — Your workspace, perfected. Helios. Is plug-in solar worth it? GitHub - riddleling/docOCR: macOS CLI and HTTP OCR tool for converting document images to Markdown. Geostakes — Stake. Guess. Win. Show HN: AI-org – org-mode powered by AI GitHub - PepperDev/totpgate: Lightweight SPA TOTP port knocking daemon GitHub - ppnpm/clinlang: Shorthand writing for doctors. Write shortly and later convert into structured case documentations. cartographer-skill/skills/cartographer/SKILL.md at main · spinchange/cartographer-skill GitHub - schildep/verified-polygon-intersection: Formally verified polygon intersection FreeCal — calendars for your organisation Show HN: Self Publish Studio Owl VIP Email Alerts | Gmail Notifications for Specific Senders 1 Million Pixels Show HN: [Geo-Cast] hear what other people are saying ClawChat GitHub - migradiff/migra: The actively maintained fork of migra — PostgreSQL schema diff and migration script generator. vibebnb · bring back Airbnb's vibe filters GitHub - jmaczan/tiny-vllm: Build your own high performance LLM inference engine in C++ and CUDA - a smaller version of vLLM Reposeek - Find the repo to build on GitHub - hunvreus/heypi: Chat agents for your team, with approvals and sandboxed tools. Slack, Discord, Telegram, webhooks. Show HN: Heirlooms – pass your legacy to family after stop breathing Show HN: I launched a micro-gig marketplace and used it to buy my own GTM plan Show HN: AionOS – self-healing microkernel in Zig (boots on real hardware) GitHub - njbrake/dotpi: My ds4 + pi configuration for success Sverklo - Repo Memory for Coding Agents GAIA Atlas - Local Stellar Map GitHub - joshduffy/claude-handoff-guard: Hook-enforced ownership for AI coding session handoffs Prezlo — The AI Visibility Platform for Professionals GitHub - kenm47/nvEnvy: Fast, keyboard-driven note-taking app for macOS — a modern rebuild of nvALT in Swift/SwiftUI. vibewarz — bot-vs-bot arena Inkfeed TV Explorer — 10,000 Free TV Channels Oort — The prompt stack solo devs ship with GitHub - Bella3202019/promptloop: Claude Code for prompt eval Stefan Le Noach Show HN: A smarter CSS selector generator Phoenix Code - Free Open Source Code Editor | Successor to Brackets Korean OEM/ODM Manufacturer Sourcing Platform | OEMKorea GitHub - OWASP/www-project-agent-memory-guard: OWASP Foundation web repository GitHub - fynyky/elemental: Simple reactive front-end library HolaClaw: run OpenClaw securely in Mac Semiconductor Review GitHub - vaddisrinivas/tab-council: Chrome MV3 extension that turns AI tabs into a structured model council Stillis - The Social Stock Market OpenHive — Agents working together Repolog — SEO, Performance, Security & AI Readiness audits Integuru - Generate fast, reliable APIs for any platform JobTrue — Your home base for the job search. LocalizeASO - ASO Localization for App Store Screenshots and Metadata RFC Reader — search & read IETF RFCs Kotlin Stdlib API Search — Autocomplete & Doc Reference KeptWell — Your family's medical binder, replaced. Cliparr | Self-hosted video clipper for Plex, Jellyfin, and local files. GitHub - glebmish/claude-code-replay: Replay Claude Code session logs to reconstruct lost project files, commit by commit. One Tile GitHub - aavilagallego/TheFoundry: The Foundry is a User Friendly - Enterprise Ready Multi-Agent System (MAS) bootstrapping framework. Monitoring | Firecrawl EverFree — Free, GitHub-backed notes Show HN: Orbital Package System (Ops) Free Furigana Converter: Kanji to Hiragana | EZFurigana How I built Ensemble · Brutal Cut Claude Code Costs ~50% Without Quality Loss | Headroom GitHub - stateflow-dev/adaptive-runtime: Adaptive Runtime Layer for Stateful AI Systems Show HN: Artwork in the style of Mark Rothko GitHub - fayazara/Screendrop: A native macOS menu bar app for taking screenshots, recording the screen, annotating captures, and sharing them when needed. It is built for a fast local workflow: capture something, preview it immediately, mark it up, save it, copy it, or upload it from the same floating preview. deepface.dev GitHub - gitricko/hermes-webtop: An agent that grows with you Sensonym - Forget Flashcards, Learn Languages by Doing Steam 上的 Code: Terraform GitHub - Thinklanceai/agentkeeper: Crash-resistant cognitive continuity for AI agents — checkpoint/restore, cross-model state reconstruction, semantic recall, and compression. Your agent survives crashes, restarts, and model switches. Tap — The browser with no tabs. Blinken · Bring back the blink GitHub - remontsuri/EV-QA-Framework: ML-powered QA framework for EV battery systems — telemetry validation, anomaly detection, SOH prediction, CAN bus (2.0B + J1939) emulation, DBC parser, Prometheus metrics, Grafana dashboard Show HN: Sixbpm – a free thing that slows your breathing down MapZap — 300 Local Business Leads in 60 Seconds Alphaset - Organic data, expert-grown Show HN: OSSentinel.live – AI-powered open source security monitoring Show HN: Claude Code AskUserQuestion which works for subagents/teams/workflows GitHub - SharkUI/SharkBay: SharkBay is a local-first macOS workbench for software projects. It helps you keep a set of local repositories visible, open project-scoped terminals and browser tabs, inspect Git state, and coordinate agent work through local Markdown task records. GitHub - doiito/gliding_horse: Gliding Horse is a multi-agent orchestration framework built in Rust that supports PDCA scheduling and knowledge graph-based agents, with comprehensive Chinese documentation, and is suitable for building enterprise-level AI agent systems. GitHub - 0xJaksun/lithium-core: Storage engine for AI agents to navigate, store, and retrieve structured data. PostgreSQL ltree, built-in versioning, scoped queries. GitHub - GiorgosXou/MLPico: Static-allocation MLP inference in ANSI C using 2-slot circular buffer with fixed stride indexing. An easy to use, minimal MLP alternative to GiorgosXou/NeuralNetworks enhanced with PROGMEM, int-quantization etc. GitHub - skorotkiewicz/acp-p2p: A P2P (POC) of the ACP for decentralized agent communication GitHub - yeet-src/airtop: htop for the airwaves — a live 802.11 (Wi-Fi) RF dashboard in your terminal GitHub - tamarillo-ai/theta-spec: harness agnostic configuration standard Show HN: DRD – Git for distributed consensus failures" GitHub - Heidar-An/Mira: Search for files semantically - no exact filenames required. GitHub - djadmin/fort: macOS CLI: endpoint security audit + SOC 2 readiness reports GitHub - exlee/rik: rik - limited agent edition Pieces | The pre-information market GitHub - jmilinovich/grove: Open-source MCP server over a git-backed Obsidian vault. Single-user, self-host. Six tools, hybrid search, provenance/blame, auto-link discovery. GitHub - Astralchemist/rig: Local-first semantic knowledge graph with magnetic-pull retrieval GitHub - sediman-agent/OpenSkynet: Your 24/7 Terminator CSP Radar GitHub - wartzar-bee/tokenscope: See what your AI-coding session actually cost — and what is eating your context. Local, read-only CLI for Claude Code.
GitHub - Sreejay-Reddy/Sentinel: PostgreSQL-backed execution coordination primitive for correctness-sensitive distributed work.
Sreejay_redd · 2026-06-17 · via Show HN

Not all work is safe to retry.

Payments, webhooks, startup jobs, long-running operations and other correctness-sensitive operations often need stronger guarantees than "just run it again."

Sentinel is a PostgreSQL-backed execution coordination primitive that provides execution ownership, cached result replay, heartbeat-backed liveness, fencing tokens, and explicit handling of uncertain execution outcomes.

Sentinel's primary interface is once(), which coordinates execution across competing workers and replays completed results to subsequent callers.


Installation

pip install sentinel-coordination

Requires Python 3.9+ and a PostgreSQL database.


Database Setup

from sentinel import init_db

conn = get_conn()
init_db(conn)
conn.close()

This creates the coordination tables Sentinel needs. Safe to run multiple times.


Getting Started

import psycopg
from sentinel import Sentinel

def get_conn():
    return psycopg.connect("postgresql://postgres:postgres@localhost/testdb")

sentinel = Sentinel(
    get_conn=get_conn,
    default_ttl_ms=3000
)

The Once API

sentinel.once() is the primary interface. Given a key and a function, it guarantees that function runs at most once per key across any number of competing workers and returns the cached result to anyone else who asks.

def process_payment(amount, customer_id):
    charge_card(
        amount=amount,
        customer_id=customer_id
    )

    return {
        "ok": True,
        "payment_id": "pay_123"
    }

result = sentinel.once(
    key="payment-order-789",
    fn=process_payment,
    kwargs={
        "amount": 99_00,
        "customer_id": "cus_abc"
    },
    ttl_ms=3000,
    hard_ttl_ms=30000
)

Reading the result

result = sentinel.once(...)

if result.execution_alive:
    # Another worker is actively executing.

elif result.uncertain:
    # Execution truth could not be established.
    # Use reconciliation tooling if needed.

else:
    # If execution_alive and uncertain are both False,
    # response contains either a newly completed result
    # or a cached result from a previous execution.
    return result.response

Async

If you're working in an async context, use AsyncSentinel:

import psycopg
from sentinel import AsyncSentinel

async def get_conn():
    return await psycopg.AsyncConnection.connect("postgresql://...")

sentinel = AsyncSentinel(
    get_conn=get_conn,
    default_ttl_ms=3000
)

result = await sentinel.once(
    key="payment-order-789",
    fn=process_payment,
    kwargs={"amount": 99_00, "customer_id": "cus_abc"},
    ttl_ms=3000,
    hard_ttl_ms=30000
)

AsyncSentinel accepts async functions as fn. The heartbeat runs on OS threads and does not interfere with the event loop.

For async schema setup:

from sentinel import async_init_db

await async_init_db(conn)

Django

Install the Django optional dependency:

pip install sentinel-coordination[django]

Then use DjangoSentinel directly:

from sentinel.integrations.django import DjangoSentinel

sentinel = DjangoSentinel()

DjangoSentinel uses Django's configured database connection and respects Django's connection lifecycle.

To use Django migrations instead of init_db, add sentinel.integrations to INSTALLED_APPS and run:

python manage.py migrate sentinel.integrations

TTL and Hard TTL

sentinel.once(
    key="...",
    fn=fn,
    ttl_ms=3000,       # Heartbeat interval and lease window
    hard_ttl_ms=30000  # Absolute maximum lifetime of this execution
)

ttl_ms controls how often the heartbeat needs to renew the lease. hard_ttl_ms is the ceiling, no matter how healthy the heartbeat, execution cannot extend past this point.

For short work, they can be equal. For long-running jobs, use a short ttl_ms to detect dead workers quickly and a large hard_ttl_ms to give live workers room to finish.

If you omit hard_ttl_ms, it defaults to ttl_ms meaning heartbeat extension won't meaningfully extend the lease. This is intentional: explicit is better than surprising behavior for long-running work.


Namespaces

If you're running multiple systems against the same database, namespaces keep your coordination keys isolated.

sentinel = Sentinel(
    get_conn=get_conn,
    namespace="payments"
)

Tradeoffs

Sentinel makes specific choices that won't suit everyone.

PostgreSQL only. The coordination layer runs on PostgreSQL. If you need Redis-backed coordination or want to avoid adding DB load for execution state, Sentinel isn't the right fit today. Redis support is on the roadmap.

Explicit over automatic. Uncertain states are surfaced, not resolved for you. This is a feature for correctness-sensitive systems and friction for everything else.

No built-in retries. Sentinel coordinates execution. It doesn't implement retry logic, backoff, or dead-letter queues. You bring those or compose them yourself.

Not a queue. Sentinel doesn't dispatch work or schedule tasks. It coordinates execution of work you've already routed to a worker.


Known Failure Boundaries

If a worker enters the executing state and disappears before completion, Sentinel will not automatically replay the work.

At that point Sentinel cannot safely determine whether the side effect completed, partially completed, or never completed.

Instead, Sentinel surfaces the outcome as uncertain and requires explicit reconciliation.

Sentinel chooses correctness over automatic replay.


Project Status

The core execution semantics are stable as of 0.4.0. Reconciliation tooling and observability APIs will continue to evolve.


Roadmap

  • Redis cache for better throughput
  • Append-only execution event log (sentinel_events)
  • FastAPI integration
  • Correlate — cross-service execution observability
  • Stronger reconciliation tooling
  • Metrics and observability hooks
  • Framework integrations
  • Additional language support

License

MIT