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