mafintosh / mafintosh/hyperlog

send only each log's head on replication handshake

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

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
469
Forks
20
PR merge metrics
No merged PRs in 30d

Description

As an optimization, we could keep a simple index of the "latest" head per log, instead of [traversing *all* heads](https://github.com/mafintosh/hyperlog/blob/master/lib/replicate.js#L214).

Note that this must be backwards compatible with the old state (i.e. generate the index if it doesn't exist already).

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 in lib/replicate.js around line 214, where replication currently traverses all heads during the handshake. Trace the existing state format and handshake flow, then determine how the latest-head index can be generated for old state. Done means the handshake sends only each log's head while remaining backwards compatible.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
distributed-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.