annotate silvermirror-whitepaper.txt @ 0:abb358e2434c

initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
author k0s <k0scist@gmail.com>
date Mon, 07 Sep 2009 15:39:06 -0400
parents
children 9b139702a8f9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
1 SilverMirror Whitepaper
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
2
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
3 It is necessary to maintain parallel directory structures of various
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
4 resources across an arbitrary number of computers. The traditional
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
5 approach is the central server model, where files live in one
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
6 canonical location and the network is used to give access to the data.
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
7 However, this model has deficiencies, chiefly among them that if the
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
8 server goes down or must be moved a considerable amount of effort must
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
9 be extended to set up a new central server.
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
10
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
11 Distributed version control, often of nominal use (in the case where a
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
12 canonical trunk exists) is ideally suited to provide mirroring of
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
13 desired resources across computers.
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
14
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
15 Implementation
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
16
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
17 A front end to a DVCS - most likely mercurial but potentially bzr -
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
18 will be written to keep resources in sync across an arbitrary number
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
19 of computers. The front end, called SilverMirror, may be used to push
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
20 or pull changes to resources. Optionally, a daemon will monitor
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
21 changes to resources and push or pull changes at desired intervals.
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
22
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
23 The use should be as natural as possible and require no interaction
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
24 for everday tasks. A resource consists of a directory and all
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
25 subdirectories and their contents. Once a resource is denoted as
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
26 versioned, any change to the resource's directory structure should be
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
27 mirrored across machines without user intervention. Files matching a
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
28 pattern may be ignored, either globally or on a per resource basis,
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
29 for the purpose of versioning.
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
30
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
31 Configuration
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
32
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
33 SilverMirror is configured via an INI file containing a section for
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
34 each resource and a section for application configuration.
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
35
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
36 The main section, denoted [::SilverMirror::], has the following options:
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
37
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
38 * directory: base directory for SilverMirror. The SilverMirror
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
39 configuration is stored in ${directory}/.silvermirror . If omitted,
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
40 the user's home directory is used.
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
41
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
42 * ignore: global patterns of files and directories to ignore. Paths
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
43 matching these patterns will not be versioned.
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
44
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
45 Each section has the following configuration options:
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
46
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
47 * directory: path of the resource. If a relative path is used, it is
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
48 joined with the directory setting from the main section. If this
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
49 setting is not specified, the section name is used as a relative path.
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
50
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
51 * ignore: paths not to version on a per resource basis. This is in
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
52 addition to the patterns specified by the ignore setting in the main
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
53 section.
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
54
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
55 * conflict: handler to resolve conflict.
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
56
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
57 * hosts: hosts to push/pull from
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
58
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
59 In order to ensure coherency among resources, all relevant
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
60 configuration options must be synced prior to push/pull transactions.
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
61
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
62 Default Configuration:
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
63
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
64 [::SilverMirror::]
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
65 conflict = ClobberRemote
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
66
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
67 Example of a more complex configuration:
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
68
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
69 [::SilverMirror::]
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
70 conflict.push = ClobberRemote
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
71 conflict.pull = ClobberLocal
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
72
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
73 Push
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
74
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
75 Push changes to remote resources. When resources are pushed, first
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
76 changes are pulled from each remote host in turn, conflicts between
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
77 local and remote changes are resolved (see Behavior on Conflicts),
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
78 then local modifications are pushed. This is done to keep the
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
79 resources in sync.
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
80
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
81 When new files are added to the resource they are automatically added
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
82 to the hg repository. When resource files are edited the changes are
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
83 pushed to the repository. When a conflict occurs between local
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
84 resources and remote resources, the conflict handler is used.
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
85
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
86 Pull
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
87
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
88 Get changes to the cloud filesystem resources. If no host is
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
89 specified, pull changes from all known + accessible hosts.
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
90
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
91 Namespaced Resources
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
92
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
93 It is possible to maintain versioning of a subdirectory within a
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
94 resource.
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
95
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
96 Example:
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
97
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
98 [docs]
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
99 directory = /path/to/docs
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
100
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
101 [docs:private]
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
102
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
103 This configuration snippet describes a resource, [docs:private],
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
104 namespaced within the [docs] resource. [docs:private] inherits
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
105 configuration and behavior from [docs] but may be dealt with
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
106 separately. For example, some computers in the cloud may not have
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
107 [docs:private] specified in their configuration and so will not get a
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
108 copy of it upon pulling. A common use case is specifying a
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
109 subdirectory to be omitted with the ignore option in the configuration
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
110 file, then, when this subdirectory needs to be shared between multiple
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
111 computers, removing it from the ignore values and including as a
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
112 namespaced resource.
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
113
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
114 In the above example, because the directory option was not specified
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
115 in the [docs:private] section, the path to [docs:private] is taken
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
116 from its namespace (private) and the directory of its parent resource.
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
117 So its base directory is /path/to/docs/private . If a relative path
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
118 was specified in the directory option of the [docs:private] section,
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
119 it would be joined with the base directory of [docs].
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
120
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
121 Behavior on Conflicts
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
122
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
123 Conflict handlers are set via setuptools entry points. Several
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
124 conflict handlers are provided with SilverMirror:
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
125
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
126 * ClobberLocal: replace local changes with changes from remote files
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
127
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
128 * ClobberRemote: replace remote file changes with changes from local
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
129 files
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
130
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
131 * Edit: invoke an editor (default: $EDITOR) to interactively resolve
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
132 the conflicts
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
133
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
134 The conflict handler may also be specified from the command line:
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
135
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
136 silvermirror push -d ClobberRemote
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
137
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
138 Command Line Usage
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
139
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
140 silvermirror [push|pull] [resource] [options]
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
141
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
142 In the simplest invocation, SilverMirror is used with no command line
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
143 arguments:
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
144
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
145 silvermirror
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
146
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
147 This pushes changes of the resource as determined by the current
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
148 working directory after pulling outstanding changes from all
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
149 applicable remote computers and invoking the conflict handler for
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
150 push. If the current working directory is not within a resource, all
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
151 resources will be pushed.
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
152
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
153 Finer control is obtained by specifying command line arguments:
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
154
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
155 [push|pull] : whether to use the push method (which includes pulling
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
156 for changes; see above) or the pull method. If not specified, the
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
157 resource is pushed.
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
158
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
159 [resource] : which resource to act upon. This can be the resource
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
160 name, as specified in the .ini file, or the path to the base directory
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
161 of the resource. Note that if a path is specified, it must be to the
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
162 base directory of the resource as SilverMirror has no notion of
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
163 disparate versioning within a resource. If the resource is not
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
164 specified, the resource that the current working directory is within
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
165 is used. If the current working directory is not in a resource path,
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
166 all resources are acted upon in turn. If the key word "--all" is used,
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
167 all resources will also be acted upon.
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
168
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
169 [options] : several command line switches are available to the
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
170 silvermirror program:
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
171
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
172 * -d <handler> : specify which conflict handler to use. <handler>
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
173 should be the name of the desired conflict handler. A list of all
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
174 conflict handlers is available with the "--conflict-handlers" option.
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
175
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
176 * -H <host>, --host=<host> : pull and/or push only to specified
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
177 hosts. If this option is used more than once, the hosts specified will
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
178 be acted upon.
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
179
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
180 * --conflict-handlers : list the name and description (if
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
181 specified) for all available conflict handlers.
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
182
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
183 * --help : displays help and usage information
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
184
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
185 Behavior Respecting Versioned Directories
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
186
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
187 SilverMirror does not desire to duplicate versioning on directories
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
188 already under version control (svn, bzr, hg). These resources are
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
189 automatically ignore. In a future implementation, these resources
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
190 would optionally be checked out or updated upon a pull.
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
191
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
192 Automatic Syncronization
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
193
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
194 SilverMirror includes a script that will automatically invoke
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
195 syncronizing the resources in a specified period of time. This daemon,
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
196 called silvermirrord, is invoked from the command line with options
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
197 parallel to the silvermirror program. One additional option, -s, tells
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
198 how many seconds between syncs. Upon invocation, this program puts
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
199 itself in the background and performs the desired sync every number of
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
200 seconds specified. It is important that the conflict handler specified
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
201 is noninteractive, otherwise the daemon will hang forever.
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
202
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
203 As an alternative, the silvermirror program may be invoked from a cron
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
204 job.
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
205
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
206 Future Work
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
207
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
208 SilverMirror implements a cloud filesystem which may be accessed
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
209 nearly transparently by an arbitrary number of computers. Several
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
210 improvements could extend SilverMirror to solve several deficiencies
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
211 of modern filesystem.
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
212
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
213 * tagging: in most filesystems, a file has a canonical location.
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
214 However, it may be desirable to have the file accesible via multiple
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
215 paths. In practice, this is achieved via symbolic links. However, this
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
216 requires manual maintaince of links vs the canonical location. Noting
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
217 that this problem is identical to tagging, a solution minimizing
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
218 manual intervention could be added to SilverMirror.
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
219
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
220 * update of web documents: modern computers deal heavily with
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
221 documents via URLs. It is noted that this includes files, the URL of a
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
222 file with path ${PATH} being file://${PATH} noted implicitly from
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
223 contexts. However, existing shells and operating systems have no
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
224 mechanism for indicating that a "file" is a web resource. Such
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
225 functionality could be added to SilverMirror so that up-to-date
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
226 versions of web resources could be maintained. This infrastructure
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
227 could also include notions for updating versioned resources (see
abb358e2434c initial commit of silvermirror, from http://my-svn.assembla.com/svn/arbez/silvermirror
k0s <k0scist@gmail.com>
parents:
diff changeset
228 Behavior Respecting Versioned Directories) with parallel notation.