forked from Kuska-ssb/solar
-
Notifications
You must be signed in to change notification settings - Fork 2
/
notes
73 lines (52 loc) · 1.98 KB
/
notes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
[ phase 1: leaner and cleaner ]
x easy wins first
x bump deps
x handle compiler warnings
x handle clippy warnings
x remove sensor code
x remove plotting dep
x custom error type
x remove anyhow and thiserror deps
x implement error type
x implement result type
x implement From for each variant
x remove ci (annoying for now)
[ phase 2: improve docs & deepen understanding ]
x let's really understand this thing deeply before adding more to it
x still need to do a lot of documenting
x work through these files first and document for clarity of understanding
x src/actors/rpc/history_stream.rs
x src/storage/kv.rs
[ phase 3: write connection handler ]
- first we need to store public keys of feeds we wish to replicate
- this is currently stored in `solar.toml` as "friends"
- might be good to split into `secret.toml` and `replicate.toml`
- later we might move the content of `replicate.toml` into a kv
- then we can track things like 'last replication event with xyz peer'
- expose the ability to read and update `replicate.toml` via jsonrpc
- conn-db
- write a minimal api to open and update a kv store
- consider basing it on rust HashMap interface or sled api (BTreeMap)
- based on ssb-conn-db
[ phase 4: write ebt replication ]
-----
[ brainstorm ]
- ability to pause replication
- expose methods via jsonrpc server
- add an additional match to the select! loop in src/actors/peer.rs
- maybe track state in a separate actor (state machine)
- this also opens the door to schedule replication
- get list of feeds from the main kv database
- `get_peers`
- whose logs do we hold?
- should match the friends list
-----
[ nice to haves... ]
- replace serde with nanoserde or miniserde
- eventually, replace in kuska-ssb too
[ links ]
error inspiration:
https://github.com/xvxx/vial/blob/master/src/error.rs
https://github.com/xvxx/vial/blob/master/src/lib.rs#L241
ssb-conn-db:
https://github.com/ssbc/ssb-conn-db