70322ae3 |
1 | TODO list for agedu |
2 | =================== |
3 | |
50e82fdc |
4 | - adjust the default web server address selection. |
5 | + some systems (e.g. OS X) don't like us binding to random |
6 | localhost addresses. So if that fails, try falling back to |
7 | 127.0.0.1 proper (and a randomly selected port) before giving |
8 | up. |
9 | + since binding to port 80 isn't generally feasible, we should |
10 | adjust the default behaviour when the user specifies --addr |
11 | with no port: it should select port zero, and then print the |
12 | port number on standard output. (Possibly also print the URL |
13 | as usual, in that situation: translate INADDR_ANY to |
14 | INADDR_LOOPBACK and then do the same as when we made the |
15 | entire address up ourself.) |
70322ae3 |
16 | |
50e82fdc |
17 | - we should munmap in all operating modes where we mmapped, |
18 | otherwise chaining them will run out of address space |
19 | |
20 | - we could still be using more of the information coming from |
21 | autoconf. Our config.h is defining a whole bunch of HAVE_FOOs for |
22 | particular functions (e.g. HAVE_INET_NTOA, HAVE_MEMCHR, |
23 | HAVE_FNMATCH). We could usefully supply alternatives for some of |
24 | these functions (e.g. cannibalise the PuTTY wildcard matcher for |
25 | use in the absence of fnmatch, switch to vanilla truncate() in |
26 | the absence of ftruncate); where we don't have alternative code, |
27 | it would perhaps be polite to throw an error at configure time |
28 | rather than allowing the subsequent build to fail. |
29 | + however, I don't see anything here that looks very |
30 | controversial; IIRC it's all in POSIX, for one thing. So more |
31 | likely this should simply wait until somebody complains. |
32 | |
33 | - it would be useful to support a choice of indexing strategies. |
34 | The current system's tradeoff of taking O(N log N) space in order |
35 | to be able to support any age cutoff you like is not going to be |
36 | ideal for everybody. A second more conventional mechanism which |
37 | allows the user to specify a number of fixed cutoffs and just |
38 | indexes each directory on those alone would undoubtedly be a |
39 | useful thing for large-scale users. This will require |
40 | considerable thought about how to make the indexers pluggable at |
41 | both index-generation time and query time. |
9c6e61f2 |
42 | |
1e8d78b9 |
43 | - IPv6 support in the HTTP server |
cfe942fb |
44 | * of course, Linux magic auth can still work in this context; we |
45 | merely have to be prepared to open one of /proc/net/tcp or |
46 | /proc/net/tcp6 as appropriate. |
1e8d78b9 |
47 | |
70322ae3 |
48 | - run-time configuration in the HTTP server |
49 | * I think this probably works by having a configuration form, or |
50 | a link pointing to one, somewhere on the report page. If you |
51 | want to reconfigure anything, you fill in and submit the form; |
52 | the web server receives HTTP GET with parameters and a |
53 | referer, adjusts its internal configuration, and returns an |
54 | HTTP redirect back to the referring page - which it then |
55 | re-renders in accordance with the change. |
56 | * All the same options should have their starting states |
57 | configurable on the command line too. |
58 | |
70322ae3 |
59 | - curses-ish equivalent of the web output |
60 | + try using xterm 256-colour mode. Can (n)curses handle that? If |
61 | not, try doing it manually. |
f2e52893 |
62 | + I think my current best idea is to bypass ncurses and go |
63 | straight to terminfo: generate lines of attribute-interleaved |
64 | text and display them, so we only really need the sequences |
65 | "go here and display stuff", "scroll up", "scroll down". |
f2e52893 |
66 | + Infrastructure work before doing any of this would be to split |
67 | html.c into two: one part to prepare an abstract data |
68 | structure describing an HTML-like report (in particular, all |
69 | the index lookups, percentage calculation, vector arithmetic |
70 | and line sorting), and another part to generate the literal |
71 | HTML. Then the former can be reused to produce very similar |
72 | reports in coloured plain text. |
70322ae3 |
73 | |
f2e52893 |
74 | - http://msdn.microsoft.com/en-us/library/ms724290.aspx suggest |
75 | modern Windowses support atime-equivalents, so a Windows port is |
373a02e5 |
76 | possible in principle. |
77 | + For a full Windows port, would need to modify the current |
78 | structure a lot, to abstract away (at least) memory-mapping of |
79 | files, details of disk scan procedure, networking for httpd. |
80 | Unclear what the right UI would be on Windows, too; |
81 | command-line exactly as now might be considered just a |
82 | _little_ unfriendly. Or perhaps not. |
83 | + Alternatively, a much easier approach would be to write a |
84 | Windows version of just the --scan-dump mode, which does a |
85 | filesystem scan via the Windows API and generates a valid |
86 | agedu dump file on standard output. Then one would simply feed |
87 | that over the network connection of one's choice to the rest |
88 | of agedu running on Unix as usual. |