]> git.evergreen-ils.org Git - Evergreen.git/blob - OpenSRF/examples/opensrf.xml.example
adding support for alternate APR header dirs
[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                                 <!-- Module the implements this application -->
75                                 <implementation>OpenSRF::Application::Persist</implementation>
76
77                                 <!-- max stateful requests before a session automatically disconnects a client -->
78                                 <max_requests>97</max_requests>
79
80                                 <!-- settings for the backend application drones.  These are probably sane defaults -->
81
82                                 <unix_config>
83                                         <!-- unix socket file -->
84                                         <unix_sock>opensrf.persist_unix.sock</unix_sock>
85
86                                         <!-- pid file -->
87                                         <unix_pid>opensrf.persist_unix.pid</unix_pid>
88
89                                         <!-- max requests per process backend before a child is recycled -->
90                                         <max_requests>1000</max_requests>
91
92                                         <!-- log file for this application -->
93                                         <unix_log>opensrf.persist_unix.log</unix_log>
94
95                                         <!-- Number of children to pre-fork -->
96                                         <min_children>5</min_children>
97
98                                         <!-- maximun number of children to fork -->
99                                         <max_children>25</max_children>
100
101                                         <!-- minimun number of spare forked children -->
102                                         <min_spare_children>2</min_spare_children>
103
104                                         <!-- max number of spare forked children -->
105                                         <max_spare_children>5</max_spare_children>
106
107                                 </unix_config>
108
109                                 <!-- Any additional setting for a particular application go in the app_settings node -->
110                                 <app_settings>
111
112                                         <!-- sqlite database file -->
113                                         <dbfile>/path/to/dbfile/persist.db</dbfile>
114                                 </app_settings>
115
116                         </opensrf.persist>
117
118                         <opensrf.math>
119                                 <keepalive>3</keepalive>
120                                 <stateless>1</stateless>
121                                 <implementation>OpenSRF::Application::Demo::Math</implementation>
122                                 <max_requests>97</max_requests>
123                                 <unix_config>
124                                         <unix_sock>opensrf.math_unix.sock</unix_sock>
125                                         <unix_pid>opensrf.math_unix.pid</unix_pid>
126                                         <max_requests>1000</max_requests>
127                                         <unix_log>opensrf.math_unix.log</unix_log>
128                                         <min_children>5</min_children>
129                                         <max_children>15</max_children>
130                                         <min_spare_children>2</min_spare_children>
131                                         <max_spare_children>5</max_spare_children>
132                                 </unix_config>
133                         </opensrf.math>
134                         
135                         <opensrf.dbmath> 
136                                 <keepalive>3</keepalive>
137                                 <stateless>1</stateless>
138                                 <implementation>OpenSRF::Application::Demo::MathDB</implementation>
139                                 <max_requests>99</max_requests>
140                                 <unix_config>
141                                         <max_requests>1000</max_requests>
142                                         <unix_log>opensrf.dbmath_unix.log</unix_log>
143                                         <unix_sock>opensrf.dbmath_unix.sock</unix_sock>
144                                         <unix_pid>opensrf.dbmath_unix.pid</unix_pid>
145                                         <min_children>5</min_children>
146                                         <max_children>15</max_children>
147                                         <min_spare_children>2</min_spare_children> <max_spare_children>5</max_spare_children>
148                                 </unix_config>
149                         </opensrf.dbmath>
150
151                         <opensrf.settings>
152                                 <keepalive>1</keepalive>
153                                 <stateless>0</stateless>
154                                 <implementation>OpenSRF::Application::Settings</implementation>
155                                 <max_requests>17</max_requests>
156                                 <unix_config>
157                                         <unix_sock>opensrf.settings_unix.sock</unix_sock>
158                                         <unix_pid>opoensrf.settings_unix.pid</unix_pid>
159                                         <max_requests>1000</max_requests>
160                                         <unix_log>opensrf.settings_unix.log</unix_log>
161                                         <min_children>5</min_children>
162                                         <max_children>15</max_children>
163                                         <min_spare_children>3</min_spare_children>
164                                         <max_spare_children>5</max_spare_children>
165                                 </unix_config>
166                         </opensrf.settings>
167
168                 </apps>
169
170         </default>
171
172         <hosts>
173
174                 <!-- Host specific settings. the name of the node (server)  must match the output of 'hostname -f' -->
175                 <myhost.mydomain.org>
176
177                         <!-- List all of the apps this server will be running -->
178                         <activeapps>
179                                 <appname>opensrf.persist</appname> 
180                                 <appname>opensrf.settings</appname> 
181                                 <appname>opensrf.math</appname> 
182                                 <appname>opensrf.dbmath</appname> 
183                         </activeapps>
184
185                         <apps> <!-- Example of an app-specific setting override -->
186                                 <opensrf.persist>
187                                         <app_settings>
188                                                 <dbfile>/different/path/to/dbfile/persist.db</dbfile>
189                                         </app_settings>
190                                 </opensrf.persist>
191                         </apps>
192
193                 </myhost.mydomain.org> 
194
195         </hosts>
196
197 </opensrf>