BlogsAblyMessage Annotations for Realtime Interactions

Message Annotations for Realtime Interactions

Message Annotations for Realtime Interactions

2
posts
2026

Message annotations provide a flexible mechanism for attaching metadata to messages, enabling features like reactions, flags, read receipts, and votes. They support various aggregation types (unique, distinct, multiple, total, flag) and can be used to deliver aggregated summaries or individual events. This enables building complex realtime interactions with fine-grained access control and efficient data handling, such as live voting systems where each client has a single vote enforced by the 'unique' aggregation. The introduction of the Java Path API for LiveObjects further enhances shared state management by allowing developers to reference locations within an object tree rather than specific object instances, simplifying conflict resolution, reconnection handling, and state recovery for Java applications.

2026

LiveObjects comes to Java: navigating shared state with the path API

7/20/2026

Introduces a Java SDK for LiveObjects, specifically the Path API, which allows developers to navigate and manage shared state within an object tree using path references instead of direct object instances. This simplifies handling state changes, conflict resolution, and reconnection by providing stable references that outlive specific object instances. The API supports inferring data types at the point of use and provides methods for reading and writing data through these paths, enabling use cases like live leaderboards, AI agent session state, and collaborative configuration panels.

One person, one vote: building live voting with message annotations

6/26/2026

This post introduces and details the implementation of a live voting system using Ably's message annotations. It explains how annotations, specifically the 'vote:unique.v1' type with the 'unique' aggregation, enforce one vote per client. It contrasts this approach with using raw messages or LiveObjects, highlighting the advantages of annotations in terms of data streams (summaries vs. individual events), least-privilege access control via token capabilities, and built-in vote semantics. The post also touches upon the use of annotations for free-text suggestions and the integration with channel rewind for late joiners. It further links annotations to other Ably features like appends and AI Transport.