why I needed this, in case it's useful to someone else
[ikiwiki.git] / doc / plugins / contrib / rsync / discussion.mdwn
1 ## A use case
2
3 Why I needed this plugin: I have two web servers available to me
4 for a project. Neither does everything I need, but together they
5 do. (This is a bit like the [Amazon S3
6 scenario](http://kitenet.net/~joey/blog/entry/running_a_wiki_on_Amazon_S3/).)
7
8 Server (1) is a university web server. It provides plentiful space
9 and bandwidth, easy authentication for people editing the wiki, and
10 a well-known stable URL. The wiki really wants to live here and
11 very easily could except that the server doesn't allow arbitrary
12 CGIs.
13
14 Server (2) is provided by a generous alumnus's paid [[tips/DreamHost]]
15 account. Disk and particularly network usage need to be minimized
16 because over some threshold it costs him. CGI, etc. are available.
17
18 My plan was to host the wiki on server (1) by taking advantage of
19 server (2) to store the repository, source checkout, and generated
20 pages, to host the repository browser, and to handle ikiwiki's CGI
21 operations. In order for this to work, web edits on (2) would need
22 to automatically push any changed pages to (1).
23
24 As a proof of concept, I added an rsync post-commit hook after
25 ikiwiki's usual. It worked, just not for web edits, which is how
26 the wiki will be used. So I wrote this plugin to finish the job.
27 The wiki now lives on (1), and clicking "edit" just works.