Skip to content

Commit 4991d2d

Browse files
authored
Merge pull request #58 from GianIac/next-version
v0.1.0-alpha.4
2 parents 9077586 + 5983847 commit 4991d2d

20 files changed

Lines changed: 3012 additions & 248 deletions

File tree

Cargo.lock

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

HOST_API.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,12 @@ fn db_delete(key_ptr: u32, key_len: u32) -> i32
111111
### CRDT
112112

113113
CRDT functions operate on replicated data types. In the current implementation,
114-
GCounter state is held in the runtime sync manager's in-memory registry and
115-
the current total is materialized to sled after each local or remote update.
116-
Operations are broadcast to peers when sync is enabled. On startup, the runtime
117-
hydrates the in-memory GCounter registry from the materialized sled values.
114+
GCounter state is held in the runtime sync manager's in-memory registry,
115+
persisted as durable CRDT state/op-log metadata, and materialized to sled after
116+
each local or remote update. Operations are broadcast to peers when sync is
117+
enabled and recovered through periodic anti-entropy after reconnects or missed
118+
pushes. On startup, the runtime hydrates the in-memory GCounter registry from
119+
durable CRDT state/op-log data, with materialized totals retained as a fallback.
118120

119121
#### `crdt_gcounter_inc`
120122

@@ -295,7 +297,9 @@ pub extern "C" fn run() {
295297
- [x] `crdt_gcounter_inc` - Increment GCounter
296298
- [x] `crdt_gcounter_value` - Read GCounter value
297299
- [x] Durable GCounter materialization in sled
298-
- [x] Startup hydration from materialized GCounter values
300+
- [x] Durable GCounter CRDT state/op-log metadata
301+
- [x] Startup hydration from durable CRDT state/op-log data
302+
- [x] Bounded OpId dedup metadata persisted across restart
299303
- [ ] `crdt_set_add` - Add element to ORSet
300304
- [ ] `crdt_set_remove` - Remove element from ORSet
301305
- [ ] `crdt_set_contains` - Check membership

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Three things, and only three:
1717

1818
You write a WASM module. numax runs it. The state is there. Sync just happens.
1919

20-
> **Status:** `v0.1.0-alpha.3` - public technical preview.
20+
> **Status:** `v0.1.0-alpha.4` - public technical preview.
2121
> It works, it's tested, it's honest about what's missing. See [`ROADMAP.md`](./ROADMAP.md).
2222
2323
---

ROADMAP.md

Lines changed: 50 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Numax Roadmap
22

3-
> **Current release**: `v0.1.0-alpha.3` - developer preview.
3+
> **Current release**: `v0.1.0-alpha.4` - developer preview.
44
> **Final goal `v0.1.0`**: production-ready runtime for non-critical workloads.
55
> **Status**: alpha for feedback; production hardening still in progress.
66
@@ -45,8 +45,26 @@ Includes:
4545
and `/ready`.
4646

4747
Known limitations:
48-
- Durable full CRDT state/op-log recovery, automatic reconnect and anti-entropy
49-
remain tracked in Phase 10.
48+
- Durable full CRDT state/op-log recovery, automatic reconnect, anti-entropy
49+
and dual-mode wire serialization remain tracked in later phases.
50+
- API and wire format may change before `v0.1.0`.
51+
52+
### v0.1.0-alpha.4 ✅
53+
**Purpose**: network resilience and dual-mode serialization preview.
54+
55+
Includes:
56+
- Everything in `v0.1.0-alpha.3`.
57+
- Phase 10 network resilience: automatic reconnect with exponential backoff,
58+
peer health tracking and rotation, periodic anti-entropy, bounded op
59+
deduplication, durable CRDT state/op-log hydration and duplicate protection
60+
across restart.
61+
- Phase 11 dual-mode wire serialization: bincode for production, JSON for
62+
`--debug-protocol`, format negotiation in `Hello`/`HelloAck`, protocol
63+
version `2`, and serialization benchmark coverage.
64+
65+
Known limitations:
66+
- K-fanout gossip remains intentionally minimal; peers are still configured
67+
explicitly.
5068
- API and wire format may change before `v0.1.0`.
5169

5270
### v0.1.0 🎯
@@ -327,19 +345,19 @@ HTTP endpoint over Tokio.
327345
### Phase 10: Network Resilience 🌐
328346
**Goal**: Robust operation with an unstable network
329347

330-
- [ ] Automatic reconnect with exponential backoff
331-
- [ ] Peer health tracking (mark dead after N timeouts)
332-
- [ ] Peer rotation (replace dead peers)
333-
- [ ] Periodic anti-entropy (pull every N seconds)
334-
- [ ] Op deduplication (bloom filter or set of OpIds)
335-
- [ ] Durable CRDT state or op log, so restart/reconnect can recover full
348+
- [x] Automatic reconnect with exponential backoff
349+
- [x] Peer health tracking (mark dead after N timeouts)
350+
- [x] Peer rotation (replace dead peers)
351+
- [x] Periodic anti-entropy (pull every N seconds)
352+
- [x] Op deduplication (bounded set of OpIds)
353+
- [x] Durable CRDT state or op log, so restart/reconnect can recover full
336354
CRDT state rather than only materialized totals.
337-
- [ ] Startup hydration from durable CRDT state/op log.
338-
- [ ] Persist dedup metadata, or otherwise prevent duplicate remote ops after
355+
- [x] Startup hydration from durable CRDT state/op log.
356+
- [x] Persist dedup metadata, or otherwise prevent duplicate remote ops after
339357
restart.
340-
- [ ] Test: intermittent network (10% packet loss)
341-
- [ ] Test: node dies and comes back → converges
342-
- [ ] Test: duplicate op after restart does not double count
358+
- [x] Test: intermittent network (10% packet loss)
359+
- [x] Test: node dies and comes back → converges
360+
- [x] Test: duplicate op after restart does not double count
343361

344362
---
345363

@@ -351,12 +369,12 @@ HTTP endpoint over Tokio.
351369
- bincode: compact (~50% size), fast (~10x faster parse)
352370

353371
**Tasks**:
354-
- [ ] Add `bincode` to dependencies
355-
- [ ] `SerializationFormat` enum with a 1-byte header on the wire
356-
- [ ] CLI flag `--debug-protocol`
357-
- [ ] Format negotiation in Hello/HelloAck
358-
- [ ] Test: roundtrip for both formats
359-
- [ ] Benchmark: JSON vs bincode (size, speed)
372+
- [x] Add `bincode` to dependencies
373+
- [x] `SerializationFormat` enum with a 1-byte header on the wire
374+
- [x] CLI flag `--debug-protocol`
375+
- [x] Format negotiation in Hello/HelloAck
376+
- [x] Test: roundtrip for both formats
377+
- [x] Benchmark: JSON vs bincode (size, speed)
360378

361379
**Libraries**: `bincode`, `serde` (already present)
362380

@@ -463,8 +481,8 @@ criterion remains tracked in Phase 7 as lifecycle/settle/hydration.
463481
- [x] Phase 7 (Graceful shutdown) complete
464482
- [x] Phase 8 (Backpressure) complete
465483
- [x] Phase 9 (Observability) at least logging + health
466-
- [ ] Phase 10 (Resilience) at least reconnect + dedup + durable CRDT recovery
467-
- [ ] Phase 11 (Serialization) JSON + bincode working
484+
- [x] Phase 10 (Resilience) at least reconnect + dedup + durable CRDT recovery
485+
- [x] Phase 11 (Serialization) JSON + bincode working
468486
- [ ] Phase 12 (Host API) at least db_scan, time_now, random_bytes
469487
- [ ] Phase 13 (Load testing) at least the 3-nodes-1h scenario
470488
- [ ] All tests pass
@@ -497,5 +515,15 @@ criterion remains tracked in Phase 7 as lifecycle/settle/hydration.
497515

498516
---
499517

518+
## v0.1.0-alpha.4 Release Criteria
519+
520+
- [x] Phase 10 network resilience complete
521+
- [x] Phase 11 dual-mode serialization complete
522+
- [x] `cargo test` passes
523+
- [x] `cargo clippy --workspace --all-targets -- -D warnings` passes
524+
- [x] Known limitations documented in the roadmap
525+
526+
---
527+
500528
## 0.2.0:
501529
> coming soon ...

0 commit comments

Comments
 (0)