Skip to main content

Snapshot management in Actyx Pond

Wolfgang Werner

Developer Advocate

In event-sourced systems, state snapshots are used to alleviate the costs of computing state from event streams. Snapshots are essential to keep processing overhead and latency in check when working with long-lived and/or high traffic models.

The Actyx Pond ships with reasonable defaults for creating and retaining snapshots. However, in certain cases, snapshots may grow too large. This post outlines how to segment state and compress snapshots to avoid this.

Pond 2.4.0 Released

Benjamin Sieffert

Benjamin Sieffert

Distributed Systems Engineer at Actyx

Today we are proud to announce the release of Pond version 2.4.0 on npm.

This release contains the following improvements:

  • Improved exception handling capabilities
  • observeAll – "Seed event" has succeeded "first event" terminologically. expireAfterFirst has been renamed to expireAfterSeed
  • observeAll – The makeFish function is now allowed to return undefined, in order to ignore a given seed event
  • Fixed an issue where moving a complex structure from an event into Fish state and later modifying that state could lead to data corruption
  • Improved memory usage and time travel performance in some cases

On a related note, we have added technical documentation for observeAll and observeOne.

Happy hacking!

Pond 2.3.0 Released

Benjamin Sieffert

Benjamin Sieffert

Distributed Systems Engineer at Actyx

Today we are proud to announce the release of Pond version 2.3.0 on npm.

This release contains the following improvements:

  • Addition of observeAll and observeOne functions to the Pond – see our dedicated blog post
  • Pond.dispose() will now properly shut down all async operations, so that applications may terminate orderly
  • Fixed a bug where command serialization between subsequent calls to Pond.run() was broken if the argument Fish was originally woken by Pond.observe()
  • Turn Pond.test() and Pond.mock() into synchronous functions
  • Direct validation of arguments passed to FishId.of() – the strings must not be empty
  • If the enqueue function passed to pond.run() callbacks is invoked after the callback has returned, it will now throw an error rather than silently fail to emit
  • Support for nodejs 12 (LTS Erbium)

Happy hacking!

Introducing observeAll() and observeOne() for Actyx Pond

Benjamin Sieffert

Benjamin Sieffert

Distributed Systems Engineer at Actyx

With the release of Pond 2.3.0 we are shipping two new major functions: Pond.observeAll() and Pond.observeOne() – they will make development a lot easier in some cases.

Sneak peak:
pond.observeAll(taskCreatedTag, makeTaskFish, {}, x => console.log('all tasks:', x))

In this blog post we give an overview of the new functions and explain the motivation behind adding them.

Designing the C# Pond: Union Types

Benjamin Sieffert

Benjamin Sieffert

Distributed Systems Engineer at Actyx

One of the many projects we’re currently pushing forward at Actyx is a port of the Actyx Pond V2 from TypeScript to C#.

C# and TypeScript build on very different foundations. Both are modern multi-paradigm languages; both have somewhat dynamic function dispatch mechanisms; but the typical C# program is still very much concerned with the runtime type of objects, as modeled by the CLR. TypeScript meanwhile is all about type shapes (or duck typing): The type system itself is quite strong, but its reality does not carry over into the (JavaScript) runtime.

One way this difference in typing plays out is union types. Union types are a cornerstone of TypeScript programming, and prominently feature in our TypeScript Pond interfaces. But C# does not have an exact equivalent. In this blog post we are looking at ways to preserve all the TypeScript Pond’s features, without giving up idiomatic C#.