->done and piecemeal starts working
[rersyncrecent.git] / Todo
blob5d2f64ad0fd03ee7dd379cf3649b67a48f333b53
1 2008-09-18  Andreas J. Koenig  <andreas.koenig.7os6VVqR@franz.ak.mind.de>
3         * Always check if we stringify to a higher value than in the entry
4         before.
6         * And in covered make an additional check if we would be able to see a
7         numerical difference between the two numbers and if we can't then switch
8         to a different, more expensive algorithm. Do not want to be caught by
9         floating surprises.
11 2008-09-17  Andreas J. Koenig  <andreas.koenig.7os6VVqR@franz.ak.mind.de>
13         * chaching has several aspects here: we can cache the interval of the
14         recentfile which only will change when the mtime of the file changes. We
15         must re-mirror the recentfile when its ttl has expired. Does have_read
16         tell you anything? It counts nothing at all. Only the mtime is
17         interesting. The ntuple mtime, low-epoch, high-epoch. And as a separate
18         thing the have_mirrored because it is unrelated to the mtime.
20         * Robustness of floating point calculations! I always thought that the
21         string calculated by the origin server for the floating representation
22         of the epoch time is just a string. When we convert it to a number and
23         later back to a string, the other computer might come to a different
24         conclusion. This must not happen, we want to preserve it unter any
25         circumstances. I will have to write tests with overlong sequences that
26         get lost in arithmetic and must see if all still works well.
28         But one fragile point remains: if one host considers a>b and the other
29         one considers them == but no eq. To prevent this, we must probably do
30         some extra homework.
32 2008-09-16  Andreas J. Koenig  <andreas.koenig.7os6VVqR@franz.ak.mind.de>
34         * the concept of tracking DONE needs an object per recentfile that has
35         something like these methods:
37         do_we_have(xxx), we_have(xxx), do_we_have_all(xxx,yyy), reset()
39         covered()        register()    covered()
41         The unclear thing is how we translate points in time into intervals. We
42         could pass a reference to the current recent_events array when running
43         we_have(xxx) and let the DONE object iterate over it such that it only
44         has to store a list of intervals that can melt into each other. Ah, even
45         passing the list together with a list of indexes seems feasiable.
47         Or maybe ask for the inverted list?
49         Whenever the complete array is covered by the interval we say we are
50         fully covered and if the recentfile is not expired, we are uptodate.
52 2008-09-07  Andreas J. Koenig  <andreas.koenig.7os6VVqR@franz.ak.mind.de>
54         * idea: have a new flag on recentfiles with the meaning: if this
55         changes, you're required to run a full rsync over all the files. The
56         reason why we set it would probably be: some foul happened. we injected
57         files in arbitrary places or didn't inject them although they changed.
58         The content of the flag? Timestamp? The relation between the
59         recentfiles would have to be inheritance from the principal, because any
60         out of band changes would soon later propagate to the next recentfile.
62         By upping the flag often one can easily ruin the slaves.
64         last out of band change? dirtymark?
66         Anyway, this implies that we read a potentially existing recentfile
67         before we write one.
69         And it implies that we have an eventloop that keeps us busy in 2-3
70         cycles, one for current stuff (tight loop) and one for the recentfiles
71         (cascade when principal has changed), one for the old stuff after a
72         dirtymark change.
74 2008-09-05  Andreas J. Koenig  <andreas.koenig.7os6VVqR@franz.ak.mind.de>
76         * need a way to "return" the next entry after the end of a list. When
77         the caller says "before" or "after" we would like to know if he could
78         cover that interval/threshold or not because this influences the effect
79         of a newer timestamp of that recentfile. DONE with $opt{info}.
81 2008-09-04  Andreas J. Koenig  <andreas.koenig.7os6VVqR@franz.ak.mind.de>
83         * one of the next things to tackle: the equivalent of csync2 -TIXU.
85         loop implies tixu (?). Nope, something like --statefile decides. Per
86         default we do ...?
88         T test, I init, X including removals, U nodirtymark
90         So we have no concept of dirtymarks, we only trust that since we are
91         running we have observed everything steadily. But people will not let
92         this program run forever so we must consider both startup penalty and
93         book keeping for later runs. We keep this for later. For now we write a
94         long running mirror that merges several intervals.
96 2008-09-02  Andreas J. Koenig  <andreas.koenig.7os6VVqR@franz.ak.mind.de>
98         * need to speed up the 02 test, it's not clever to sleep so much. Reduce
99         the intervals!
101         * rersyncrecent, the script: default to one week. The name of the switch
102         is --after. Other switches? --loop!
104 2008-08-30  Andreas J. Koenig  <andreas.koenig.7os6VVqR@franz.ak.mind.de>
106         * need a switch --skip-deletes (?)
108         * need a switch --enduser that tells us that the whole tempfile
109         discipline is not needed when there is no downstream user. (?)
111         Without this switch we cannot have a reasonable recent.pl that just
112         displays the recent additions. Either we accept to download everything.
113         Or we download temporary files without the typical rsync protocol
114         advantages.
116         Or maybe the switch is --tmpdir? If --tmpdir would mean: do not use
117         File::Temp::tempdir, this might be a win.
119 2008-08-29  Andreas J. Koenig  <andreas.koenig.7os6VVqR@franz.ak.mind.de>
121         * apropos missing: we have no push, we never know the downstream
122         servers. People who know their downstream hosts and want to ascertain
123         something will want additional methods we have never thought about, like
124         update or delete a certain file.
126 2008-08-26  Andreas J. Koenig  <andreas.koenig.7os6VVqR@franz.ak.mind.de>
128         * tempted to refactor rmirror into resolve_symlink, localize, etc.
129         Curious if rsync_options=links equal 0 vs. 1 will make the expected
130         difference.
132         * rsync options: it's a bit of a pain that we usually need several rsync
133         options, like compress, links, times, checksum and that there is no
134         reasonable default except the original rsync default. I think wee can
135         safely assume that the rsync options are shared between all recentfile
136         instances within one recent tree.
138 2008-08-20  Andreas J. Koenig  <andreas.koenig.7os6VVqR@franz.ak.mind.de>
140         * deletes: if a delete follows an add quickly enough it may happen that
141         a downstream mirror did not see the add at all! It seems this needs to
142         be mentioned somewhere. The point here is that even if the downstream is
143         never missing the principal timeframe it may encounter a "delete" that
144         has no complimentary "add" anywhere.
146 2008-08-19  Andreas J. Koenig  <andreas.koenig.7os6VVqR@franz.ak.mind.de>
148         * I suspect the treat of metadata is incorrect during read or something.
149         The bug that I am watching is that between 06:08 and 06:09 the 6h file
150         contained more than 6 hours worth of data. At 06:08 we merged into the
151         1d file. We need to take snapshots of the 6h file over the course of an
152         hour or maybe only between XX:08 and XX:09? Nope, the latter is not
153         enough.
155         Much worse: watching the 1h file: right at the moment (at 06:35) it
156         covers 1218867584-1219120397 which is 70 hours.
158         Something terribly broken. BTW, 1218867584 corresponds to Sat Aug 16
159         08:19:44 2008, that is when I checked out last time, so it seems to be
160         aggregating and never truncating?
162         No, correct is: it is never truncating; but wrong is: it is aggregating.
163         It does receive a lot of events from time to time from a larger file.
164         Somehow a large file gets merged into the small one and because the
165         "meta/merged" attribute is missing, nobody is paying attention. I
166         believe that I can fix this by making sure that metadata are honoured
167         during read. DONE and test adjusted.
169 2008-08-17  Andreas J. Koenig  <andreas.koenig.7os6VVqR@franz.ak.mind.de>
171         * grand renaming plan
173         remotebase          => remoteroot   to fit well with localroot        DONE
174         local_path()        => localroot    seems to me should already work   DONE
175         recentfile_basename => rfilename    no need to stress it has no slash DONE
177         filenameroot??? Doesn't seem too bad to me today. Maybe something like
178         kern? It would anyway need a deprecation cycle because it is an
179         important constructor.
181         * I like the portability that Data::Serializer brings us but the price
182         is that some day we might find out that it is slowing us a bit. We'll
183         see.
185 2008-08-16  Andreas J. Koenig  <andreas.koenig.7os6VVqR@franz.ak.mind.de>
187         * should we not enter the interval of the principal (or the interval of
188         the merging file?) in every aggregated/merged file?
190         * we should aim at a first release and give up on thinking about
191         sanitizing stuff and zloop. Let's just admit that a full traditional
192         rsync is the only available sanitizer ATM. Otherwise it's complicated
193         stuff: sanitizing on the origin server, sanitizing on the slaves,
194         sanitizing forgotten files, broken timestamps, etc. Let's delay it and
195         get the basics out before this becomes a major cause for mess.
197 2008-08-13  Andreas Koenig  <k@andreas-koenigs-computer.local>
199         * On OSes not supporting symlinks we expect that RECENT.recent contains
200         the contents of the principal recentfile. Actually this is identical on
201         systems supporting symlinks. Simple, what follows from that is that we
202         need to keep the serializer in the metadata because we cannot read it
203         from the filename, doesn't it? Of course not. It's a chicken and egg
204         problem. This leaves us with the problem to actually parse the
205         serialized data to find out in which format it is. So who can do the 4
206         or 5 magics we wanted to support? File::LibMagic?
208 2008-08-09  Andreas Koenig  <k@andreas-koenigs-computer.local>
210         * remotebase and recentfile_basename are ugly names. Now that we need a
211         word for the shortest/principal/driving recentfile too we should do
212         something about it.
214         localroot is good. rfile is good. local_path() is bad, local_path($path)
215         is medium, filenameroot() is bad, remotebase is bad, recentfile is
216         already deprecated.
218         Up to now remotebase was the string that described the remote root
219         directory in rsync notation, like pause.perl.org::authors. And
220         recentfile_basename was "RECENT-1h.yaml".
222 2008-08-08  Andreas Koenig  <k@andreas-koenigs-computer.local>
224         * The test that was added in today's checkin is a good start for a test
225         of rmirror. We should have more methods in Recent.pm: verify,
226         addmissingfiles. We should verify the current tree, then rmirror it and
227         then verifytree the copy. We could then add some arbitrary file and let
228         it be discovered by addmissingfiles, then rmirror again and then
229         verifytree the copy again.
231         Then we could start stealing from csync2 sqlite database [no port to
232         OSX!] and fill a local DB. And methods to compare the database with the
233         recentfiles. Our strength is that in principle we could maintain state
234         with a single float. We have synced up to 1234567890.123456. If the Z
235         file does not add new files all we have to do is mirror the new ones and
236         delete the goners.
238         This makes it clear that we should extend current protocol and declare
239         that we cheat when we add files too late, just to help the other end
240         keeping track. Ah yes, that's what was meant when zloop was mentioned
241         earlier.
243         Maybe need to revisit File::Mirror to help me with this task.
245 2008-08-07  Andreas Koenig  <k@andreas-koenigs-computer.local>
247         * There must be an allow-me-to-truncate flag in every recentfile.
248         Without it one could construct a sequence of updates winning the locking
249         battle against the aggregator. Only if an aggregator has managed to
250         merge data over to the next level, truncating can be allowed. DONE with
251         accessor merged.
253 2008-08-06  Andreas Koenig  <k@andreas-koenigs-computer.local>
255         * We should probably guarantee that no duplicates enter the aggregator
256         array.
258 2008-08-02  Andreas J. Koenig  <andreas.koenig.7os6VVqR@franz.ak.mind.de>
260         * To get merge operation faster would need a good benchmark test. What
261         02 spits out isn't reliable enough and is dominated by many other
262         things. Between
264         commit 10176bf6b79865d4fe9f46e3857a3b8669fa7961
265         Author: Andreas J. Koenig <k@k75.(none)>
266         Date:   Sat Aug 2 07:58:04 2008 +0200
268         and
270         commit 3243120a0c120aaddcd9b1f4db6689ff12ed2523
271         Author: Andreas J. Koenig <k@k75.(none)>
272         Date:   Sat Aug 2 11:40:29 2008 +0200
274         there was a lot of trying but the effect is hardly measurable with
275         current tests.  
277         * overhead of connecting seems high. When setting
278         max_files_per_connection to 1 we see that.
280 2008-08-01  Andreas J. Koenig  <andreas.koenig.7os6VVqR@franz.ak.mind.de>
282         * 1217622571.0889 - 1217597432.86734 = 25138.2215600014
284         25138.2215600014/3600 = 6.98283932222261
286         It jumps into the eye that this is ~ 7 hours, not ~6, so there seems to
287         be a bug in the aggregator. FIXED
289 2008-07-27  Andreas J. Koenig  <andreas.koenig.7os6VVqR@franz.ak.mind.de>
291         * e.g. id/Y/YE/YEWENBIN/Emacs-PDE-0.2.16.tar.gz: Do we have it, should
292         we have it, can we mirror it, mirror it!
294         I fear this needs a new class which might be called
295         File::Rsync::Mirror::Recent. It would collect all recentfiles of a kind
296         and treat them as an entity. I realize that a single recentfile may be
297         sufficient for certain tasks and that it is handy for the low level
298         programmer but it is not nice to use. If there is a delete in the 1h
299         file then the 6h file still contains it. Seekers of the best information
300         need to combine at least some of the recentfiles most of the time.
302         There is the place for the Z loop!
304         But the combination is something to collect in a database, isn't it. Did
305         csync2 just harrumph?
307 2008-07-26  Andreas J. Koenig  <andreas.koenig.7os6VVqR@franz.ak.mind.de>
309         * it just occurred to me that hosts in the same mirroring pool could
310         help out each other even without rewriting the recentfile. Just fetch
311         the stuff to mirror from several places, bingo. But that's something
312         that should rather live in a separate package or in rsync directly.
314         * cronjobs are unsuited because with ntp they would all come at the full
315         minute and disturb each other. Besides that I'd hate to have a backbone
316         with more than a few seconds latency.
318 2008-07-25  Andreas J. Koenig  <andreas.koenig.7os6VVqR@franz.ak.mind.de>
320         * a second rsync server with access control for PAUSE. Port? 873 is the
321         standard port, let's take 8873.
323         * if there were a filesystem based on this, it would have a slow access
324         to inexistent files. It would probably provide wrong readdir (only based
325         on current content) or also a slow one (based on a recentfile written
326         after the call). But it would provide fast access to existing files. Or
327         one would deliberately allow slightly blurred answers based on some
328         sqlite reflection of the recentfiles.
330         * todo: write a variant of mirror() that combines two or more
331         recentfiles and treats them like one
333         * todo: signal handler to remove the tempfile
335 2008-07-24  Andreas J. Koenig  <andreas.koenig.7os6VVqR@franz.ak.mind.de>
337         * now that we have the symlink I forgot how it should be used in
338         practice.
340         * the z loop: add missing files to Z file. Just append them (instead of
341         prepending). So one guy prepends something from the Y file from time to
342         time and another guy appends something rather frequently. Collecting
343         pond. When Y merges into Z, things get epoch and the collecting pond
344         gets smaller. What exactly are "missing files"?
346         take note of current epoch of the alpha file, let's call it the
347         recent-ts
349         find all files on disk
351         remove all files registered in the recentworld up to recent-ts
353         remove all files that have been deleted after recent-ts according to
354         recentworld
356 2008-07-23  Andreas J. Koenig  <andreas.koenig.7os6VVqR@franz.ak.mind.de>
358         * rersyncrecent might be a cronjob with a (locked) state file which
359         contains things like after and maybe last z sync or such?
361         rrr-mirror might be an alternative name but how would we justify the
362         three Rs when there is no Re-Rsync-Recent?
364         With the --loop parameter it is an endless loop, without it is no loop.
365         At least this is simple.
367         * todo: new accssor z-interval specifies how often the Z file is updated
368         against the filesystem. We probably want no epoch stamp on these
369         entries. And we want to be able to filter the entries (e.g. no
370         by-modules and by-category tree)
372 2008-07-20  Andreas J. Koenig  <andreas.koenig.7os6VVqR@franz.ak.mind.de>
374         * Fill the Z file. gc or fsck or both. Somehow we must get the old files
375         into Z. We do not need the other files filled up with filesystem
376         contents though.
378         * need interface to query for a file in order to NOT call update on
379         PAUSE a second time within a short time.
381 2008-07-19  Andreas J. Koenig  <andreas.koenig.7os6VVqR@franz.ak.mind.de>
383         * recommended update interval? Makes no sense, is different for
384         different users.
386         * Moosify
388         Local Variables:
389         mode: change-log
390         change-log-default-name: "Todo"
391         tab-width: 2
392         left-margin: 2
393         End: