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

推荐订阅源

Google DeepMind News
Google DeepMind News
D
Docker
Last Week in AI
Last Week in AI
WordPress大学
WordPress大学
月光博客
月光博客
小众软件
小众软件
量子位
V
Visual Studio Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
T
Tailwind CSS Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
罗磊的独立博客
博客园 - 叶小钗
美团技术团队
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 三生石上(FineUI控件)
博客园 - 聂微东
博客园 - 司徒正美
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - Franky
Hugging Face - Blog
Hugging Face - Blog
GbyAI
GbyAI
C
Check Point Blog

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店
GitHub - ratchet-run/ratchet: A Java Jakarta EE CDI-nativ...
jputney · 2026-06-17 · via Hacker News: Show HN

Portable, CDI-based job scheduler for Jakarta EE 10/11.

Inject one service, submit a method call, and let Ratchet persist, claim, execute, retry, and observe the work — no heavyweight framework, no proprietary runtime.

@ApplicationScoped
public class OrderService {

    @Inject JobSchedulerService scheduler;

    public void placeOrder(Order order) {
        // Persisted, claimed, executed on a worker, retried on failure.
        scheduler.enqueueNow(() -> processOrder(order.getId()));
    }

    void processOrder(UUID orderId) { /* your business logic */ }
}

Full documentation → ratchet.run


Why Ratchet

  • Zero-ceremony CDI. @Inject JobSchedulerService and go. No XML, no scheduler boilerplate, no separate daemon.
  • Real workflows, not just timers. Chaining, conditional branching on results, batches, and jobs that park on an external signal until an approval or webhook resumes them.
  • Resilience built in. Retries with backoff, a circuit breaker, and a dead-letter queue — no Resilience4j, no Flyway, no extra runtime deps.
  • Stores you can prove. MySQL, PostgreSQL, and MongoDB ship out of the box, each verified by a reusable store TCK. Bring your own and run the same conformance suite.
  • Customizable to the core — see below.
  • Portable. Plain Jakarta EE 10/11. Runs on WildFly, Open Liberty, Payara, GlassFish, and friends.

Full feature tour →

Built to be customized

Almost every moving part of Ratchet is an SPI you can swap with a single CDI @Alternative bean — no forking, no config files. Override one interface and the engine picks it up at deploy time:

@Alternative
@Priority(jakarta.interceptor.Interceptor.Priority.APPLICATION)
@ApplicationScoped
public class PaymentRetryPolicy implements RetryPolicy {
    @Override
    public boolean shouldRetry(int attempt, Throwable cause) {
        // Stop early on a hard decline; otherwise let maxRetries decide.
        return !(cause instanceof PaymentDeclinedException);
    }
}

Swap the retry logic, circuit-breaker behavior, polling cadence, thread/executor strategy, payload encryption, key provider, metrics sink, per-job logging, node identity, cluster wakeups, the deserialization allowlist, and more — over two dozen extension points in all, each with a sensible default you only replace when you need to.

SPI extension guide → · Full SPI reference →

Quick Start

<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>run.ratchet</groupId>
      <artifactId>ratchet-bom</artifactId>
      <version>0.1.1-SNAPSHOT</version>
      <type>pom</type>
      <scope>import</scope>
    </dependency>
  </dependencies>
</dependencyManagement>

<dependencies>
  <dependency>
    <groupId>run.ratchet</groupId>
    <artifactId>ratchet-api</artifactId>
  </dependency>
  <dependency>
    <groupId>run.ratchet</groupId>
    <artifactId>ratchet</artifactId>
  </dependency>
  <!-- Pick your store: ratchet-store-{postgresql,mysql,mongodb} -->
  <dependency>
    <groupId>run.ratchet</groupId>
    <artifactId>ratchet-store-postgresql</artifactId>
  </dependency>
</dependencies>

Then three things before your first job runs:

  1. Provide a ClassPolicy. Ratchet refuses to start without a deserialization allowlist for job payloads — a security default, not a hurdle. A one-line @Alternative bean naming your packages does it.
  2. Apply the schema. SQL stores ship plain DDL (ddl/*-schema.sql) — apply it however you manage migrations. MongoDB initializes itself.
  3. Schedule a job. scheduler.enqueueNow(() -> work()), or use the builder for delays, priority, and options.

The Quick Start guide walks through all three with copy-paste snippets.

A taste of the API

// Multi-step workflow with conditional branching
scheduler.enqueue(() -> riskService.assess(applicationId))
    .whenResult(RiskConditions::isLowRisk,  () -> autoApprove(applicationId))
    .whenResult(RiskConditions::isHighRisk, () -> manualReview(applicationId))
    .thenOnFailure(() -> escalate(applicationId))
    .submit();

// Declarative cron scheduling
@Recurring(cron = "0 0 2 * * ?", name = "Nightly Cleanup")
public void performCleanup() { /* runs at 2 AM UTC */ }

// Park a job until an external signal arrives (or it times out)
scheduler.enqueue(() -> shipOrder(orderId))
    .awaitSignal("order:" + orderId + ":approved", Duration.ofHours(24))
    .submit();

More — batches, callbacks, encrypted payloads, event observation, job control: Workflows · Recurring jobs · Signals · Batches · Circuit breakers · Payload encryption · API reference

Showcase App

ratchet-showcase is a runnable Jakarta EE WAR with an order-fulfillment dashboard demonstrating live workflow chains, conditional fraud-review signals, retries, resource limits, queue health, and Prometheus metrics. See testing/ratchet-showcase/README.md to run it on WildFly, Payara, Open Liberty, or GlassFish against PostgreSQL, MySQL, or MongoDB.

Architecture

flowchart TD
  app["Your Application"]
  api["ratchet-api<br/>JobSchedulerService, JobBuilder, events, annotations, SPI"]
  ri["ratchet<br/>Poller, JobTask, CircuitBreaker, RetryEngine, RecurringScheduler, CDI wiring"]
  store["ratchet-store-core<br/>Entities + composed JobStore SPI"]
  mysql["ratchet-store-mysql"]
  postgres["ratchet-store-postgresql"]
  mongo["ratchet-store-mongodb"]

  app --> api --> ri --> store
  store --> mysql & postgres & mongo
Loading

Pluggable stores, optional cluster coordinators (PostgreSQL LISTEN/NOTIFY, JMS, Infinispan, Hazelcast), and reference encryption/metrics modules round out the reactor. Module overview & deployment topology →

Documentation

Start here Go deeper
Introduction Core concepts
Quick Start SPI & customization
Installation Deployment & clustering
API reference Troubleshooting

Requirements

  • Java 17+
  • Jakarta EE 10/11 (CDI 4.0/4.1, JPA 3.1/3.2, Interceptors 2.1/2.2, Concurrency 3.0/3.1)
  • Runtime Jakarta EE 10/11 server with managed executors (WildFly, Open Liberty, Payara, GlassFish 8, …); plain CDI/test deployments can opt into StandaloneExecutorProvider
  • Database MySQL 8+, PostgreSQL 14+, or MongoDB 6+

Building from Source

mvn clean compile        # compile all modules
mvn clean test           # unit tests
mvn clean verify         # unit + integration tests (requires Docker for Testcontainers)
mvn spotless:apply       # auto-format (Google Java Format)

Project Status

Ratchet is in 0.1.1-SNAPSHOT. The API is stabilizing; interfaces marked @Incubating may change between alpha releases. Feedback and contributions are welcome.

Community

License

Ratchet is licensed under the Apache License 2.0.