n0-computer / n0-computer/iroh-docs

Implementing application specific communication on top of `iron-docs`

Open
#31 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
74
Forks
16
PR merge metrics
No merged PRs in 30d

Description

Overview

  • iroh-docs uses iroh-gossip under the hood to implement the exchange of ToLiveActor events. Using NamespaceID as gossip's TopicId, See following snippet from iroh-docs
let sub = self
    .gossip
    .subscribe_with_opts(namespace.into(), JoinOptions::with_bootstrap(bootstrap));

let (sender, stream) = sub.split();
let abort_handle = self.active_tasks.spawn(
    receive_loop(
        namespace,
        stream,
        self.to_live_actor.clone(),
        self.sync.clone(),
    )
    .map(move |res| (namespace, res)),
);
entry.insert(ActiveState {
    sender,
    abort_handle,
});

Problem:

  • I would like to be able to send custom events to peers who are interested in the same iroh-docs namespace.
  • Looking at iroh-gossip examples, I'm only seeing this TopicId::from_bytes(rand::random()) as a way to create a TopicId.
    Question:
  • Should I use the same channel (NamespaceId) to send my custom events, may affect iroh-docs or add computational overhead to differentiate the events.
  • Or is there a standard way for me to generate one or multiple TopicId based on the NamespaceId to use as a separate channel for my application specific events?

Perhaps this boils down to whether I can (or should) get away with using only DocTicket to connect and sync not just my application's document, but my entire application as well?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the iroh-docs subscription snippet and the iroh-gossip examples using TopicId. Investigate how NamespaceID, DocTicket, and application-specific events are intended to interact, including whether a shared or derived topic is appropriate. Done means an agreed design or documented API for application-specific communication without disrupting document synchronization.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
distributed-systems, networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.