Commit | Line | Data |
---|---|---|
a78e83b8 | 1 | # vim:sw=2:sts=2: |
e678174b SK |
2 | TODO |
3 | ==== | |
33cf2848 | 4 | |
e678174b SK |
5 | Legend: |
6 | - [ ] not started | |
7 | - [-] in-progress | |
8 | - [x] done | |
9 | - [~] cancelled | |
33cf2848 | 10 | |
e678174b SK |
11 | In-progress |
12 | ----------- | |
13 | ||
14 | - [-] Convert to Typed Racket | |
15 | - [x] build executable (otherwise too-slow) | |
16 | - [-] add signatures | |
17 | - [x] top-level | |
18 | - [ ] inner | |
19 | - [ ] imports | |
24f1f64b | 20 | - [-] commands: |
a60c484e SK |
21 | - [x] c | crawl |
22 | Discover new peers mentioned by known peers. | |
24f1f64b | 23 | - [x] r | read |
d96fa613 | 24 | - see timeline ops above |
24f1f64b | 25 | - [ ] w | write |
d96fa613 SK |
26 | - arg or stdin |
27 | - nick expand to URI | |
9d1b7217 SK |
28 | - Watch FIFO for lines, then read, timestamp and append [+ upload]. |
29 | Can be part of a "live" mode, along with background polling and | |
30 | incremental printing. Sort of an ii-like IRC experience. | |
24f1f64b | 31 | - [ ] q | query |
d96fa613 SK |
32 | - see timeline ops above |
33 | - see hashtag and channels above | |
4214c0f3 | 34 | - [x] d | download |
e678174b SK |
35 | - [ ] options: |
36 | - [ ] all - use all known peers | |
37 | - [ ] fast - all except peers known to be slow or unavailable | |
38 | REQUIRES: stats | |
3a4b2233 | 39 | - [x] u | upload |
54c0807b | 40 | - calls user-configured command to upload user's own timeline file to their server |
24f1f64b SK |
41 | Looks like a better CLI parser than "racket/cmdline": https://docs.racket-lang.org/natural-cli/ |
42 | But it is no longer necessary now that I've figured out how to chain (command-line ..) calls. | |
e678174b SK |
43 | - [-] Output formats: |
44 | - [x] text long | |
45 | - [x] text short | |
46 | - [ ] HTML | |
47 | - [ ] JSON | |
48 | - [-] Peer discovery | |
49 | - [-] parse peer refs from peer timelines | |
50 | - [x] mentions from timeline messages | |
51 | - [x] @<source.nick source.url> | |
52 | - [x] @<source.url> | |
a60c484e | 53 | - [ ] "following" from timeline comments: # following = <nick> <uri> |
8cd862ed | 54 | - [ ] Parse User-Agent web access logs. |
a60c484e SK |
55 | - [-] Update peer ref file(s) |
56 | - [x] peers-all | |
57 | - [x] peers-mentioned | |
58 | - [ ] peers-followed (by others, parsed from comments) | |
59 | - [ ] peers-down (net errors) | |
60 | - [ ] redirects? | |
b06cbfc2 | 61 | Rough sketch from late 2019: |
c91a1ca9 SK |
62 | let read file = |
63 | ... | |
64 | let write file peers = | |
65 | ... | |
66 | let fetch peer = | |
67 | (* Fetch could mean either or both of: | |
68 | * - fetch peer's we-are-twtxt.txt | |
69 | * - fetch peer's twtxt.txt and extract mentioned peer URIs | |
70 | * *) | |
71 | ... | |
72 | let test peers = | |
73 | ... | |
74 | let rec discover peers_old = | |
75 | let peers_all = | |
76 | Set.fold peers_old ~init:peers_old ~f:(fun peers p -> | |
77 | match fetch p with | |
78 | | Error _ -> | |
79 | (* TODO: Should p be moved to down set here? *) | |
80 | log_warning ...; | |
81 | peers | |
82 | | Ok peers_fetched -> | |
83 | Set.union peers peers_fetched | |
84 | ) | |
85 | in | |
86 | if Set.empty (Set.diff peers_old peers_all) then | |
87 | peers_all | |
88 | else | |
89 | discover peers_all | |
90 | let rec loop interval peers_old = | |
91 | let peers_all = discover peers_old in | |
92 | let (peers_up, peers_down) = test peers_all in | |
93 | write "peers-all.txt" peers_all; | |
94 | write "peers-up.txt" peers_up; | |
95 | write "peers-down.txt" peers_down; | |
96 | sleep interval; | |
97 | loop interval peers_all | |
98 | let () = | |
99 | loop (Sys.argv.(1)) (read "peers-all.txt") | |
e678174b SK |
100 | |
101 | Backlog | |
102 | ------- | |
a60c484e | 103 | - [ ] user-agent file as CLI option - need to run at least the crawler as another user |
9c34c974 | 104 | - [ ] Support fetching rsync URIs |
3231d4b5 SK |
105 | - [ ] Check for peer duplicates: |
106 | - [ ] same nick for N>1 URIs | |
107 | - [ ] same URI for N>1 nicks | |
55da29c0 SK |
108 | - [ ] Background polling and incremental timeline updates. |
109 | We can mark which messages have already been printed and print new ones as | |
110 | they come in. | |
111 | REQUIRES: polling | |
4ffb857c | 112 | - [ ] Polling mode/command, where tt periodically polls peer timelines |
e678174b SK |
113 | - [ ] nick tiebreaker(s) |
114 | - [ ] some sort of a hash of URI? | |
115 | - [ ] angry-purple-tiger kind if thingie? | |
116 | - [ ] P2P nick registration? | |
117 | - [ ] Peers vote by claiming to have seen a nick->uri mapping? | |
118 | The inherent race condition would be a feature, since all user name | |
119 | registrations are races. | |
120 | REQUIRES: blockchain | |
121 | - [ ] stats | |
122 | - [ ] download times per peer | |
123 | - [ ] Support redirects | |
54c0807b | 124 | - should permanent redirects update the peer ref somehow? |
e678174b SK |
125 | - [ ] Support time ranges (i.e. reading the timeline between given time points) |
126 | - [ ] optional text wrap | |
127 | - [ ] write | |
128 | - [ ] timeline limits | |
54c0807b SK |
129 | - [ ] peer refs set operations (perhaps better done externally?) |
130 | - [ ] timeline as a result of a query (peer ref set op + filter expressions) | |
e678174b SK |
131 | - [ ] config files |
132 | - [ ] highlight mentions | |
133 | - [ ] filter on mentions | |
134 | - [ ] highlight hashtags | |
135 | - [ ] filter on hashtags | |
136 | - [ ] hashtags as channels? initial hashtag special? | |
137 | - [ ] query language | |
138 | - [ ] console logger colors by level ('error) | |
139 | - [ ] file logger ('debug) | |
140 | - [ ] Suport immutable timelines | |
141 | - store individual messages | |
142 | - where? | |
143 | - something like DBM or SQLite - faster | |
144 | - filesystem - transparent, easily published - probably best | |
145 | - [ ] block(chain/tree) of twtxts | |
146 | - distributed twtxt.db | |
147 | - each twtxt.txt is a ledger | |
148 | - peers can verify states of ledgers | |
149 | - peers can publish known nick->url mappings | |
150 | - peers can vote on nick->url mappings | |
151 | - we could break time periods into blocks | |
152 | - how to handle the facts that many(most?) twtxt are unseen by peers | |
153 | - longest X wins? | |
154 | ||
155 | Done | |
156 | ---- | |
38c9ecd5 | 157 | - [x] Dedup read-in peers before using them. |
9c5e4499 SK |
158 | - [x] Prevent redundant downloads |
159 | - [x] Check ETag | |
160 | - [x] Check Last-Modified if no ETag was provided | |
161 | - [x] Parse rfc2822 timestamps | |
e678174b SK |
162 | - [x] caching (use cache by default, unless explicitly asked for update) |
163 | - [x] value --> cache | |
164 | - [x] value <-- cache | |
165 | REQUIRES: d command | |
166 | - [x] Logger sync before exit. | |
167 | - [x] Implement rfc3339->epoch | |
168 | - [x] Remove dependency on rfc3339-old | |
169 | - [x] remove dependency on http-client | |
170 | - [x] Build executable | |
171 | Implies fix of "collection not found" when executing the built executable | |
172 | outside the source directory: | |
173 | ||
174 | collection-path: collection not found | |
175 | collection: "tt" | |
176 | in collection directories: | |
177 | context...: | |
178 | /usr/share/racket/collects/racket/private/collect.rkt:11:53: fail | |
179 | /usr/share/racket/collects/setup/getinfo.rkt:17:0: get-info | |
180 | /usr/share/racket/collects/racket/contract/private/arrow-val-first.rkt:555:3 | |
181 | /usr/share/racket/collects/racket/cmdline.rkt:191:51 | |
182 | '|#%mzc:p | |
183 | ||
184 | ||
185 | Cancelled | |
186 | --------- | |
187 | - [~] named timelines/peer-sets | |
188 | REASON: That is basically files of peers, which we already support. |