Skip to content

[Task] Messaging API #2216

@weboko

Description

@weboko

Description

Implement the messaging API in js-waku; should be used in the Logos forum PoC and Qaku.

Currently, application developers using js-waku must navigate complex low-level protocols and implement their own strategies for message reliability, delivery confirmation, and missed message retrieval. This increases development overhead and hinders adoption, particularly for resource-constrained applications. There is a lack of a high-level, developer-friendly API that abstracts Waku protocols and provides reliable messaging functionality out of the box.

User Story

  • As a developer, I want to send and receive messages using a simple API, so that I don’t have to manage Waku protocols directly.
  • As a developer, I want the Messaging API to abstract core protocols, so that I can build applications without worrying about underlying protocol details.
  • As a developer, I want to retrieve past messages reliably using the API, so that users don’t miss important messages during temporary disconnections.
  • As a developer, I want the API to handle peer discovery and connection management automatically, so that I don’t have to implement these strategies myself.
  • As a developer, I want to use the API to confirm whether messages have been successfully delivered or are still pending, so that I can provide users with feedback on message status.
  • As a developer, I want the Messaging API to integrate store queries and service node redundancy, so that I can ensure message reliability in my application.
  • As a developer, I want to use a high-level sendMessage function with built-in reliability mechanisms, so that I can focus on building application logic rather than managing network stability.
  • As a user, I want messages to be delivered reliably even if my device is temporarily disconnected, so that I don’t miss any important communication.
  • As a developer, I want the API to support multiple connection strategies (e.g., redundant connections, light push, filter), so that I can optimize performance for different use cases.
  • As a developer, I want to receive detailed error logs and feedback from the API, so that I can debug and improve my application effectively.

Proposed Solution / Feature Design

Preliminary breakdown

Not possible before logos-messaging/pm#282 is done.

  • Adapter for the messages: Filter, Store, LightPush. Track propagation of the message.
  • Event driven API: error tracking, message state propagation, libp2p, peers, connectivity.
  • Health manager & reliability manager: re-iteration.
  • Recovery strategies: 0 connections, lost Filter nodes, Store nodes.
  • Error handling: light push failures, Store disconnects etc.

Optional: Diagram or Draft of Design

TBD

Notes

Sub-issues

Metadata

Metadata

Assignees

Labels

effort/weeksWeek+ effort or large task.

Type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions