| 1 |
|
| 2 |
|
| 3 |
THIS FILE IS NO LONGER USED |
| 4 |
THIS FILE IS NO LONGER USED |
| 5 |
THIS FILE IS NO LONGER USED |
| 6 |
|
| 7 |
|
| 8 |
We now use the Bugzilla installation at Lysator to handle the bugs and |
| 9 |
feature requests of lyskomd. See the following: |
| 10 |
|
| 11 |
http://bugzilla.lysator.liu.se/ |
| 12 |
|
| 13 |
The Bugzilla URL:s below point out the relevant entries. The ideas |
| 14 |
were copied to Bugzilla during October 2001. |
| 15 |
|
| 16 |
|
| 17 |
THIS FILE IS NO LONGER USED |
| 18 |
THIS FILE IS NO LONGER USED |
| 19 |
THIS FILE IS NO LONGER USED |
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
* Open Secret Conferences (mirar) |
| 24 |
|
| 25 |
Bugzilla: <URL:http://bugzilla.lysator.liu.se/show_bug.cgi?id=127> |
| 26 |
|
| 27 |
It would be nice to be able to set permissions on a conference so |
| 28 |
that it is considered open to all with write permissions and closed |
| 29 |
or secret to all others. |
| 30 |
|
| 31 |
|
| 32 |
* Better Text Garbing ([email protected]) |
| 33 |
|
| 34 |
Bugzilla: <URL:http://bugzilla.lysator.liu.se/show_bug.cgi?id=82> |
| 35 |
|
| 36 |
Keep texts that have comments newer than N days, where N is a |
| 37 |
parameter of the conference. |
| 38 |
|
| 39 |
The parameter N has been implemented (keep_commented). The garb |
| 40 |
has to be changed (this is also in the TODO file.) It might be |
| 41 |
desirable to look even deeper into the comment chain so we keep |
| 42 |
*chains* that have additions newer than N days. |
| 43 |
|
| 44 |
|
| 45 |
* Chop up texts before sending ([email protected]) |
| 46 |
|
| 47 |
Bugzilla: <URL:http://bugzilla.lysator.liu.se/show_bug.cgi?id=105> |
| 48 |
|
| 49 |
We aren't too good at handling large texts. The problem is that we |
| 50 |
start off by reading the entire thing into memory from disk, then |
| 51 |
shove it all onto an ISC queue. For big texts that means we sit and |
| 52 |
wait for I/O of the text, then we sit and wait while we queue it all |
| 53 |
up, and while we're doing that, we actually wait for the server to |
| 54 |
write the garbage to the pipe! |
| 55 |
|
| 56 |
It would be nice to be able to spread the work around. |
| 57 |
|
| 58 |
I think the trick would be to not read everything from disk at once. |
| 59 |
We want to read a bit, send it, read some more, and send that. We |
| 60 |
add a function to ISC that lets us push an ISC packet onto the ISC |
| 61 |
queue that contains no data, just an instruction to call a callback. |
| 62 |
That callback reads some more data from the disk and queues that in |
| 63 |
ISC too. |
| 64 |
|
| 65 |
When we want to output a text, we start by enqueueing a callback to |
| 66 |
read the second bit of the text. Then we read the first bit and |
| 67 |
enqueue that. When we call isc_flush, isc will start by calling the |
| 68 |
callback. It will enqueue a callback to read the third bit from |
| 69 |
disk, then read the second bit from disk and enqueue that. Then we |
| 70 |
return to ISC and let ISC write the first bit to the socket. The |
| 71 |
result is that the ISC queue will contain block N of the text, then |
| 72 |
a callback to get N+2, then block N+1. |
| 73 |
|
| 74 |
The reason for doing it this way is that if we can get the callback |
| 75 |
to do the reads asynchronously, we can have ISC writing a bit of |
| 76 |
data to the socket while we are reading the next bit from disk. If |
| 77 |
we can do async reads, when ISC gets to the callback, the queue will |
| 78 |
contain a callback for block N+1, then block N of the text. The |
| 79 |
callback will enqueue a callback for block N+2, then initiate an |
| 80 |
async read for block N+1 and return immediately. The server will |
| 81 |
write block N to the socket concurrently with the read of block N+1. |
| 82 |
When the async read returns, its handler (callback, signal handler, |
| 83 |
whatever) enqueues the data in the ISC queue. This should result in |
| 84 |
the server spending much less time in IO wait. |
| 85 |
|
| 86 |
If we can't do async reads, then we might as well just put the |
| 87 |
callback for block N+1 after the data for block N. Async reads are |
| 88 |
available under Solaris, but not in Linux 2.0. Regrettably the |
| 89 |
interface is probably vendor-dependent. |
| 90 |
|
| 91 |
A potential problem is that we need to make *sure* that the text |
| 92 |
file is not cleaned when a text is deleted. That is not a problem in |
| 93 |
the current server, but could be in the future. If we have a pending |
| 94 |
request for text N, and someone deletes it before we can send the |
| 95 |
whole thing, we have to be able to continue sending it. |
| 96 |
|
| 97 |
Changes need to be made to ISC (typed queue elements, call the |
| 98 |
callback); prot_a_output and mux.c (need to output texts in a |
| 99 |
special way); plus we have to write the callbacks. This should be |
| 100 |
totally doable. |
| 101 |
|
| 102 |
NEWS: The aio_ interface is not supported by Linux, at least not |
| 103 |
yet. It is, however, a Posix 4 extension, not just a Solaris thing. |
| 104 |
On Linux we'd have to use poll or select to do asynchronous IO. Is |
| 105 |
it possible to use ISC for this as well? |
| 106 |
|
| 107 |
note: it is impossible to use select to do asynchronous I/O |
| 108 |
against files. select always considered data from a file to |
| 109 |
be immediately availabe. /ceder |
| 110 |
|
| 111 |
ceder says: adding support for aio_* to ISC is probably a good |
| 112 |
idea. It should be possible to do it in a way that is useful even |
| 113 |
on platforms that don't have aio_*. The idea then is to make sure |
| 114 |
that we never read more than one block from the file until we have |
| 115 |
written it to the client. Having a 8 KiB buffer where chunks are |
| 116 |
copied from file to client, from file to client, is a lot better |
| 117 |
than reading 1 MiB from file, chopping it up in small blocks, and |
| 118 |
storing them i an ISC queue. |
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
* Sync the database without blocking requests ([email protected]) |
| 124 |
|
| 125 |
Bugzilla: <URL:http://bugzilla.lysator.liu.se/show_bug.cgi?id=128> |
| 126 |
|
| 127 |
Currently the database is synced in three phases. Phase one creates |
| 128 |
a snapshot of all changed objects by traversing the internal arrays |
| 129 |
and moving the data pointer to the snapshot pointer in the cache |
| 130 |
nodes. The second phase writes objects to disk. The third phase |
| 131 |
frees the snapshot data from memory. The first and last phase block |
| 132 |
the server completely. |
| 133 |
|
| 134 |
Rewrite the sync algorithm like this. Assume that all objects in the |
| 135 |
database can be ordered, regardless of type. The server can be in |
| 136 |
one of two states: syncing or not syncing. |
| 137 |
|
| 138 |
When the server starts syncing, open the target data file and write |
| 139 |
the database header to the file. Write kom_info to the database. Set |
| 140 |
next_to_sync to zero. |
| 141 |
|
| 142 |
Periodically, sync a few objects. Examine object next_to_sync. If it |
| 143 |
has been saved to disk, do nothing. If it has a snapshot, write the |
| 144 |
snapshot to disk. If it is in memory, write it to disk from memory. |
| 145 |
If it is on disk, copy it from the old data file. Clear the |
| 146 |
snapshot. Clear the dirty flag. Clear the saved-to-disk flag. |
| 147 |
Increase next_to_sync and repeat this step until a fixed number of |
| 148 |
objects have been saved. |
| 149 |
|
| 150 |
When all objects are done, set the state of the server to not |
| 151 |
syncing, set the current data file to the one just synced. |
| 152 |
|
| 153 |
While the server is syncing, access to objects needs to be done |
| 154 |
carefully. If an object is requested that has not been synced, |
| 155 |
create a snapshot of it before returning it, or write it to disk |
| 156 |
immediately. If an object that has been synced but is not in memory |
| 157 |
is requested, then it must be read from the new data file. |
| 158 |
|
| 159 |
Tricky stuff: if something is added while we are syncing, it should |
| 160 |
not be written to disk. If something is deleted while we are syncing |
| 161 |
is should be written to disk anyway. |
| 162 |
|
| 163 |
The basic idea here is to make sure that the database file contains |
| 164 |
a copy of the database as it was when the sync was started, no |
| 165 |
matter what happens with it afterwards. We have like an index; |
| 166 |
everything before the index has been synced and can be treated as if |
| 167 |
we are not syncing at all. Everything beyond the frontier may be |
| 168 |
unsynced, and we need to make sure that it is retained unchanged |
| 169 |
until it gets written to disk. |
| 170 |
|
| 171 |
|
| 172 |
* Hierarchical Conferences ([email protected]) |
| 173 |
|
| 174 |
Bugzilla: <URL:http://bugzilla.lysator.liu.se/show_bug.cgi?id=110> |
| 175 |
|
| 176 |
LysKOM conferences should be organized hierarchically. |
| 177 |
|
| 178 |
Give each conference a parent conference pointer and a children |
| 179 |
conference list. Internally, prepend the parent ID to each |
| 180 |
conference name, so that we can have two conferences with the same |
| 181 |
name contained below different parent conferences. The prepending |
| 182 |
should not be visible to the client. |
| 183 |
|
| 184 |
Permissions in a conference are based on the permissions in the |
| 185 |
conference closest in child-parent order to the requested conference |
| 186 |
in which the person is a member (whew!) Some examples: conference A |
| 187 |
is rd_prot and conference B is not. Persons who are members of A can |
| 188 |
see anything in A and B. Persons who are members in B can see |
| 189 |
anything in B, but not in A. To persons who are members of neither, |
| 190 |
B behaves as if it were rd_prot, since its parent conference is. |
| 191 |
|
| 192 |
It has to be possible to do name lookup on a subtree of the |
| 193 |
conference tree. |
| 194 |
|
| 195 |
The small_conf_stat structure should probably mirror the tree |
| 196 |
structure and contain permission information about conferences. |
| 197 |
Don't forget that we want to be able to do sequential traversal of |
| 198 |
all elements in a subtree. |
| 199 |
|
| 200 |
This should require surprisingly small changes in the server. Mainly |
| 201 |
small_conf_stat, name lookup and storage, and permissions checks. |
| 202 |
|
| 203 |
|
| 204 |
* Garbage Collecting Conferences ([email protected]) |
| 205 |
|
| 206 |
Bugzilla: <URL:http://bugzilla.lysator.liu.se/show_bug.cgi?id=129> |
| 207 |
|
| 208 |
Conferences have an expire field. Conferences that have not |
| 209 |
contained texts for that many days should be removed automatically |
| 210 |
by the garbage collector or by dbck. |
| 211 |
|
| 212 |
|
| 213 |
* Mark Types ([email protected]) |
| 214 |
|
| 215 |
Bugzilla: <URL:http://bugzilla.lysator.liu.se/show_bug.cgi?id=96> |
| 216 |
|
| 217 |
Marks should be fixed. Marks should have flags and stuff. Texts |
| 218 |
should know who has marked them. There's a text about this somewhere |
| 219 |
in LysKOM. |
| 220 |
|
| 221 |
|
| 222 |
* Multibyte character compatibility ([email protected]) |
| 223 |
|
| 224 |
Bugzilla: <URL:http://bugzilla.lysator.liu.se/show_bug.cgi?id=99> |
| 225 |
|
| 226 |
The server should be capable of operating in multi-byte |
| 227 |
environments. We'll have to be able to specify a coding system and |
| 228 |
charset for conference and person names. We'll have to make sure the |
| 229 |
regexp engine can deal with multibyte characters. We'll need a new |
| 230 |
method of separating the subject line from the text body. The name |
| 231 |
matching will have to be more flexible. For eight-bit characters |
| 232 |
we'll need a way of specifying a collate table. For multibyte |
| 233 |
characters, maybe we'll have to be able to specify a procedure to |
| 234 |
determine equivalence of two characters. |
| 235 |
|
| 236 |
|
| 237 |
|
| 238 |
Local variables: |
| 239 |
mode: outline |
| 240 |
paragraph-separate: "[ \t]*$" |
| 241 |
outline-regexp: "[*]+" |
| 242 |
end: |