Changes between Version 19 and Version 20 of ModParrotArchitecture
- Timestamp:
- 11/30/08 19:16:58 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ModParrotArchitecture
v19 v20 31 31 === Configuration === 32 32 33 mod_parrot itself requires very little configuration, and most of it should be done from the HLL layer. Most tunables have corresponding Apache directives that you can use in httpd.conf. 34 35 '''Paths''' 36 37 '''Options''' 38 39 ||'''C Option'''||'''ParrotOptions equivalent'''||'''Default'''||'''Description'''|| 40 ||MP_OPT_ENABLE||Enable||On||Enables mod_parrot and HLL modules for the main server or virtual host|| 41 ||MP_OPT_PARENT||Parent||Off||Dedicates a separate context pool for a virtual host|| 42 ||MP_OPT_TRACEINIT||TraceInit ||Off||Trace mod_parrot initialization code (can be verbose)|| 43 44 33 45 === Contexts === 34 46 … … 61 73 Contexts are created at Apache startup during the configuration phase, when interpreters are needed to register various HLL modules and parse directives. An interpreter is always started when a context is created. 62 74 63 XXX Forking? 75 Child processes in forking MPMs inherit (via {{{fork()}}}) the context pools created at startup, saving both CPU cycles and memory. 64 76 65 77 To maintain state, the same context must be used for all phases of a request, as it contains a reference to the interpreter. When a context is needed, code should call {{{init_ctx(server_rec *s, conn_rec *c)}}}, which will return an available context from the pool. If {{{c}}} is non-null, {{{init_ctx}}} will either return the context bound to that connection, or bind and return an available context if none is already bound. Code in hooks that run before the pre-connection phase should pass a NULL connection.