Skip to content

Commit

Permalink
Expand Future Work section in README
Browse files Browse the repository at this point in the history
  • Loading branch information
pyotrk committed May 25, 2026
1 parent 0095c0a commit f140c74
Showing 1 changed file with 24 additions and 8 deletions.
32 changes: 24 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ All types support `merge`, `clone`, `deinit`, and JSON serialization/deserializa
|---|---|---|---|
| `POST /<key>` | 201 | Create CRDT from JSON body |
| `GET /<key>` | 200/404 | Read CRDT as JSON |
| `PATCH /<key>` | 202 | Merge client replica into existing CRDT |
| `PATCH /<key>` | 200/202 | Merge client replica into existing CRDT (202 when congested) |
| `DELETE /<key>` | 204 | Remove CRDT (idempotent) |
| `POST /register` | 201 | Get next server replica ID |
| `GET /<key>` (WebSocket upgrade) | 101 | Real-time sync via WebSocket |
Expand Down Expand Up @@ -63,11 +63,27 @@ WASM module exporting functions for collaborative text editing via the RGA CRDT.

## Future Work

- **Tombstone garbage collection**: Removed nodes accumulate without bound in RGA and OR-Set
- **No persistence**: All state is in-memory only
- **No authentication/authorization**: All endpoints are open
- **No rate limiting**: No protection against overload
- **Client-server only**: No peer-to-peer architecture
- **Delta sync**: Every PATCH sends the full CRDT state. For large RGA
documents this wastes bandwidth. Transmitting only what changed would
be faster and cheaper.

- **TLS and auth**: The API is open. TLS termination and authentication
should be handled externally before requests reach the server.

- **Tombstone garbage collection**: Removed RGA and OR-Set entries
accumulate forever. A compaction pass would reclaim memory once all
replicas acknowledge a deletion.

- **Persistence**: All state is in-memory. A client application using the
library can add its own persistence layer (write-ahead log, snapshot,
database).

- **Blocking notification channel**: WebSocket subscriber channels are
bounded queues (32 slots). When full, `queue.putOne` blocks the entire
actor thread, stalling all CRDT operations. Should use a drop-policy
or separate notification queue instead.

- **Client-server only**: No peer-to-peer architecture.

## External Dependencies

Expand Down Expand Up @@ -108,7 +124,7 @@ The server listens on `[::]:8080` with IPv4 `0.0.0.0:8080` fallback.
# Create a counter
curl -X POST http://localhost:8080/my-counter \
-H "Content-Type: application/json" \
-d '{"type":"counter","counter":{"counters":[[0,1]]}}'
-d '{"counter":[[0,1]]}'

# Read it back
curl http://localhost:8080/my-counter
Expand All @@ -119,7 +135,7 @@ curl -X POST http://localhost:8080/register
# Merge a replica
curl -X PATCH http://localhost:8080/my-counter \
-H "Content-Type: application/json" \
-d '{"type":"counter","counter":{"counters":[[1,2]]}}'
-d '{"counter":[[1,2]]}'

# Delete
curl -X DELETE http://localhost:8080/my-counter
Expand Down

0 comments on commit f140c74

Please sign in to comment.