]> git.evergreen-ils.org Git - Evergreen.git/blob - OpenSRF/examples/opensrf.xml.example
move the moved call to the right place...
[Evergreen.git] / OpenSRF / examples / opensrf.xml.example
1 <?xml version='1.0'?>
2
3 <opensrf version='0.0.1'>
4
5                 <!-- 
6
7                 There is one <host> entry for each server on the network.  Settings for the
8                 'default' host are used for every setting that isn't overridden within a given 
9                 host's config.  
10
11                 To specify which applications a host is serving, list those applications
12                 within that host's config section.  If the defaults are acceptible, then
13                 that's all that needs to be added/changed.
14
15                 Any valid XML may be added to the <default> block and server components will have 
16                 acces to it.
17
18                 -->
19
20         <default>
21         
22                 <dirs>
23
24                         <!-- opensrf log files go in this directory -->
25                         <log>/path/to/log</log>
26
27                         <!-- opensrf unix domaind socket files go here -->
28                         <sock>/path/to/sock</sock>
29
30                         <!-- opensrf pids go here -->
31                         <pid>/path/to/pid</pid>
32
33                         <!-- global config directory -->
34                         <conf>/path/to/conf</conf>
35
36                 </dirs>
37
38                 <!-- prefork, simple. prefork is suggested -->
39                 <server_type>prefork</server_type>
40
41                 <!-- Default doesn't host any apps -->
42                 <activeapps/> 
43
44                 <cache>
45                         <global>
46                                 <servers>
47                                         <!-- memcached server ip:port -->
48                                         <server>127.0.0.1:10101</server>
49                                 </servers>
50                                 <!-- maximun time that anything may stay in the cache -->
51                                 <max_cache_time>86400</max_cache_time>
52                         </global>
53                 </cache>
54
55                 <!-- These are the defaults for every served app.  Each server should 
56                         duplicate the node layout for any nodes that need changing.
57                         Any settings that are overridden in the server specific section 
58                         will be used as the config values for that server.  Any settings that are
59                         not overridden will fall back on the defaults
60                         Note that overriding 'stateless' will break things -->
61
62                 <apps>
63
64                         <opensrf.persist>
65
66                                 <!-- How many seconds to wait between server 
67                                         requests before timing out a stateful server session. -->
68                                 <keepalive>1</keepalive>
69
70                                 <!-- if 1, then we support stateless sessions (no connect required), if
71                                                 0 then we don't -->
72                                 <stateless>1</stateless>
73
74                                 <!-- Tells the servers which language this implementation is coded in 
75                                         In this case non "perl" servers will not be able to load the module -->
76                                 <language>perl</language>
77
78                                 <!-- Module the implements this application -->
79                                 <implementation>OpenSRF::Application::Persist</implementation>
80
81                                 <!-- max stateful requests before a session automatically disconnects a client -->
82                                 <max_requests>97</max_requests>
83
84                                 <!-- settings for the backend application drones.  These are probably sane defaults -->
85
86                                 <unix_config>
87                                         <!-- unix socket file -->
88                                         <unix_sock>opensrf.persist_unix.sock</unix_sock>
89
90                                         <!-- pid file -->
91                                         <unix_pid>opensrf.persist_unix.pid</unix_pid>
92
93                                         <!-- max requests per process backend before a child is recycled -->
94                                         <max_requests>1000</max_requests>
95
96                                         <!-- log file for this application -->
97                                         <unix_log>opensrf.persist_unix.log</unix_log>
98
99                                         <!-- Number of children to pre-fork -->
100                                         <min_children>5</min_children>
101
102                                         <!-- maximun number of children to fork -->
103                                         <max_children>25</max_children>
104
105                                         <!-- minimun number of spare forked children -->
106                                         <min_spare_children>2</min_spare_children>
107
108                                         <!-- max number of spare forked children -->
109                                         <max_spare_children>5</max_spare_children>
110
111                                 </unix_config>
112
113                                 <!-- Any additional setting for a particular application go in the app_settings node -->
114                                 <app_settings>
115
116                                         <!-- sqlite database file -->
117                                         <dbfile>/path/to/dbfile/persist.db</dbfile>
118                                 </app_settings>
119
120                         </opensrf.persist>
121
122                         <opensrf.math>
123                                 <keepalive>3</keepalive>
124                                 <stateless>1</stateless>
125                                 <language>perl</language>
126                                 <implementation>OpenSRF::Application::Demo::Math</implementation>
127                                 <max_requests>97</max_requests>
128                                 <unix_config>
129                                         <unix_sock>opensrf.math_unix.sock</unix_sock>
130                                         <unix_pid>opensrf.math_unix.pid</unix_pid>
131                                         <max_requests>1000</max_requests>
132                                         <unix_log>opensrf.math_unix.log</unix_log>
133                                         <min_children>5</min_children>
134                                         <max_children>15</max_children>
135                                         <min_spare_children>2</min_spare_children>
136                                         <max_spare_children>5</max_spare_children>
137                                 </unix_config>
138                         </opensrf.math>
139                         
140                         <opensrf.dbmath> 
141                                 <keepalive>3</keepalive>
142                                 <stateless>1</stateless>
143                                 <language>perl</language>
144                                 <implementation>OpenSRF::Application::Demo::MathDB</implementation>
145                                 <max_requests>99</max_requests>
146                                 <unix_config>
147                                         <max_requests>1000</max_requests>
148                                         <unix_log>opensrf.dbmath_unix.log</unix_log>
149                                         <unix_sock>opensrf.dbmath_unix.sock</unix_sock>
150                                         <unix_pid>opensrf.dbmath_unix.pid</unix_pid>
151                                         <min_children>5</min_children>
152                                         <max_children>15</max_children>
153                                         <min_spare_children>2</min_spare_children> <max_spare_children>5</max_spare_children>
154                                 </unix_config>
155                         </opensrf.dbmath>
156
157                         <opensrf.settings>
158                                 <keepalive>1</keepalive>
159                                 <stateless>0</stateless>
160                                 <language>perl</language>
161                                 <implementation>OpenSRF::Application::Settings</implementation>
162                                 <max_requests>17</max_requests>
163                                 <unix_config>
164                                         <unix_sock>opensrf.settings_unix.sock</unix_sock>
165                                         <unix_pid>opoensrf.settings_unix.pid</unix_pid>
166                                         <max_requests>1000</max_requests>
167                                         <unix_log>opensrf.settings_unix.log</unix_log>
168                                         <min_children>5</min_children>
169                                         <max_children>15</max_children>
170                                         <min_spare_children>3</min_spare_children>
171                                         <max_spare_children>5</max_spare_children>
172                                 </unix_config>
173                         </opensrf.settings>
174
175                 </apps>
176
177         </default>
178
179         <hosts>
180
181                 <!-- Host specific settings. the name of the node (server)  must match the output of 'hostname -f' -->
182                 <myhost.mydomain.org>
183
184                         <!-- List all of the apps this server will be running -->
185                         <activeapps>
186                                 <appname>opensrf.persist</appname> 
187                                 <appname>opensrf.settings</appname> 
188                                 <appname>opensrf.math</appname> 
189                                 <appname>opensrf.dbmath</appname> 
190                         </activeapps>
191
192                         <apps> <!-- Example of an app-specific setting override -->
193                                 <opensrf.persist>
194                                         <app_settings>
195                                                 <dbfile>/different/path/to/dbfile/persist.db</dbfile>
196                                         </app_settings>
197                                 </opensrf.persist>
198                         </apps>
199
200                 </myhost.mydomain.org> 
201
202         </hosts>
203
204 </opensrf>