Urgent.News

What's breaking now, across thousands of outlets.

Tech

Two coroutines, one journal: a Restate restart demo

Both preparation steps had finished when I stopped the Node process. The Restate server stayed running. After I started the service again, the pending invocation returned ["A", "B"] , and the preparation writes were still present only once each. This is the small recovery demo I wanted for Restate's new durable coroutines: two routines with their own steps, an interruption in the middle, and a…

The demonstration of Restate's new durable coroutines involved two separate routines, each with its own steps. An interruption occurred in the middle of the process, and the file was used to ensure the executed effects were easily inspectable. The routines utilized generator-based coroutines provided by Restate, allowing the scheduler to control when the routines advanced. I/O operations could overlap during completion, while the order of completion was recorded for recovery purposes.

The Restate Server version 1.8.1, Node.js 22.22.1, and the corresponding JavaScript packages at version 1.18.2 were used in the demo. The service wrote a short line during preparation, waited on a durable timer, and then wrote a finish line. The value returned by the generator traveled through the local variable and into the final result.

The service was implemented in a file named "service.mjs" using the following dependencies:

```javascript

npm install --save-exact @restatedev/restate-sdk@1.18.2 @restatedev/restate-sdk-gen@1.18.2

```

The service code included the creation of two lane functions (`prepare-a` and `prepare-b`) that returned generators. These generators handled the preparation and finish steps for each routine, writing the corresponding lines to a file named "effects.log". The `sleep` function was used to introduce an 8-second delay between the preparation and finish steps, allowing for an interruption window.

The service was configured in a "restate.toml" file, which specified the Restate server settings, including the binding addresses and memory size. The server was started using Node.js with the service file ("service.mjs") as the entry point.

To invoke the service, a request was made to the server's ingress endpoint at "http://127.0.0.1:18080/CoroutineDemo/run" with a JSON null body. Directly calling the Node.js endpoint would skip the server that owned the journal. After the first invocation finished without interruption, the results were consistent, with each preparation and finish line written once to the file.

For the restart trial, an interruption was introduced in the middle of the process. The service was able to handle the interruption, and the file was used to verify that the executed effects remained intact.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Why Pay for the Smartest Model Every Time?

Originally published on wrightfunctions.com , where the demos are live. A restaurant doesn't send every order to the head chef. Toast goes to the line cook.

  • Intelligent routing, cascading, distillation, and caching reduce large language model pricing.
  • Requests directed to most powerful model only when necessary, cutting costs up to 85%.
  • Distillation trains smaller model on larger model's outputs for faster, cheaper usage.

zk-barter: Exploring Zero-Knowledge Proofs for Trustless Digital Barter | Rushidev Ukalkar

How can two people exchange digital assets without either party having to trust the other to go first? That's the problem I'm exploring with zk-barter , a research project involving Solidity smart…

  • zk-barter project aims to enable trustless digital asset exchanges.
  • Utilizes zero-knowledge proofs (Groth16) and cryptographic commitments (libsnark).
  • Project is early-stage, not production-ready or independently audited.

Updating Rustup 1.29.3 while keeping the compiler fixed

The toolchain manager and the compiler have separate version numbers. I updated an isolated Rustup installation from 1.29.2 to 1.29.3 , kept its linked compiler at 1.99.1 , then compiled and ran a…

  • Rustup updated to version 1.29.3
  • Compiler version fixed at 1.99.1
  • Two regression fixes in 1.29.3

Introduction to Graph Databases for Knowledge Graphs

Introduction Graph databases are specialized database management systems that store and manage data as interconnected nodes and relationships.

  • Graph databases store data as interconnected nodes and relationships
  • Knowledge graphs represent complex real-world domains
  • Neo4j demonstrates creating a movie recommendation knowledge graph

Web lista para agentes de IA: guía con Cloudflare Radar

Una web lista para agentes de IA es una web que un agente puede encontrar, leer sin ruido y usar sin abrir un navegador: sabe qué hay, lo pide en Markdown y llama a sus herramientas por MCP o WebMCP.

  • Web lista para agentes de IA es página fácil de leer y utilizar sin navegador
  • Cloudflare evalúa lista de sitios en escáner gratuito, nota 0-100
  • Métodos para usar escáner: URL en isitagentready.com, Radar scanner o API

More from Wednesday 4 November →