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