You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ go run . -listen 127.0.0.1:7070 -replicate -health 127.0.0.1:8080
35
35
Terminal 2: dial the receiver and send one blob.
36
36
37
37
```bash
38
-
go run . -listen 127.0.0.1:0 -dial 127.0.0.1:7070 -put-key demo -put-data "hello streamhive" -exit-after-put
38
+
go run . -listen 127.0.0.1:0 -dial 127.0.0.1:7070 -put-content-key -put-data "hello streamhive" -exit-after-put
39
39
```
40
40
41
41
Inspect counters:
@@ -44,7 +44,7 @@ Inspect counters:
44
44
curl -s http://127.0.0.1:8080/metrics
45
45
```
46
46
47
-
Look for `replication_blobs_stored`, `replication_bytes_stored`, and transport frame counters. Use `/metrics` for JSON or `/metrics/prometheus` for Prometheus text format.
47
+
Look for `replication_blobs_stored`, `replication_bytes_stored`, and transport frame counters. The sender derives the blob key from `SHA-256(put-data)` when `-put-content-key` is set. Use `/metrics` for JSON or `/metrics/prometheus` for Prometheus text format.
48
48
49
49
Or run the whole flow:
50
50
@@ -79,7 +79,7 @@ go run . -listen 127.0.0.1:7070 -replicate -store-dir ./streamhive-data
Copy file name to clipboardExpand all lines: docs/ARCHITECTURE.md
+3-4Lines changed: 3 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,7 +81,7 @@ classDiagram
81
81
- Listener and peer map share a mutex; the accept loop exits when the listener is closed.
82
82
-`Close` stops new accepts, waits for the accept goroutine, then closes open peer connections. Peer goroutines remove themselves from the map on EOF / error via `unregisterPeer`.
83
83
- Optional `FrameHandler` runs per frame on each peer session until error, context cancellation, or disconnect.
84
-
- CLI replication installs a `FrameHandler` that decodes `blob.put` messages and writes to `MemoryStore` by default, or `FileStore` when `-store-dir` is set. Outbound `-put-key` / `-put-data` sends one frame after `-dial` or `-peers` connects.
84
+
- CLI replication installs a `FrameHandler` that decodes `blob.put` messages and writes to `MemoryStore` by default, or `FileStore` when `-store-dir` is set. Outbound `-put-key` / `-put-data` sends one manually keyed frame after `-dial` or `-peers` connects; `-put-content-key` derives the key from `SHA-256(-put-data)`.
85
85
-`-peer-reconnect` manages only static `-peers` targets. It retries failed dials with exponential backoff and schedules another retry when an outbound configured peer disconnects.
86
86
- Replication peers advertise local keys on connect. Receivers reply with `blob.missing`, and owners send the requested blobs with `blob.put`.
0 commit comments