You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by br...@apache.org on 2008/11/02 20:05:12 UTC
svn commit: r709909 - in /httpd/mod_wombat/trunk: README
docs/running-developer-tests.txt mod_wombat.c test/test_httpd.conf
Author: brianm
Date: Sun Nov 2 11:05:12 2008
New Revision: 709909
URL: http://svn.apache.org/viewvc?rev=709909&view=rev
Log:
clean up docs, fix misconfiguration in test config, and add thoughts on how to better manage lua_State instances
Modified:
httpd/mod_wombat/trunk/README
httpd/mod_wombat/trunk/docs/running-developer-tests.txt
httpd/mod_wombat/trunk/mod_wombat.c
httpd/mod_wombat/trunk/test/test_httpd.conf
Modified: httpd/mod_wombat/trunk/README
URL: http://svn.apache.org/viewvc/httpd/mod_wombat/trunk/README?rev=709909&r1=709908&r2=709909&view=diff
==============================================================================
--- httpd/mod_wombat/trunk/README (original)
+++ httpd/mod_wombat/trunk/README Sun Nov 2 11:05:12 2008
@@ -1,49 +1,65 @@
-Requirements:
- lua 5.1 ( http://www.lua.org/ )
- libapreq2 ( http://httpd.apache.org/apreq/download.cgi )
- Apache HTTPD 2.2 ( http://httpd.apache.org/ )
-
-Building:
- For now, see docs/building-from-subversion.txt
-
-TODO:
- Change to controlling lifecycle by passing in a pool?
- Need to determine how to handle server scoped then!
-
- Provide means to get useful output from lua errors in response body
- Probably have to put it on the vm spec for pre-handler
- errors, as it is pre-handler, will prolly be on the request_config
- somewhere, but sometimes cannot put there, so... fun
-
- Filters
-
- Mapping in the server_rec
-
- Connection scoped vms
-
- Figure out how reentrancy works regarding filter chain stuff.
- Do we need new "threads"?
-
- Flesh out apw_*getvm for each flavor we allow
- Rework apw_sgtevm to use the create_vm stuff like apw_rgetvm
-
- apw_rgetvm needs to handle connection scoped vms
-
- options in server scoped vms (ie, min and max vm counts)
+-*- mode:org -*-
+* Requirements:
+** lua 5.1 ( http://www.lua.org/ )
+** libapreq2 ( http://httpd.apache.org/apreq/download.cgi )
+** Apache HTTPD 2.2 ( http://httpd.apache.org/ )
+
+
+* Documentation
+ See docs/README
+
+* Building
+ For now, see docs/building-from-subversion.txt
+
+* To Consider
+ Allow definition of lua_State instances associated with arbitrary
+ pool using the pool's user_data constuct. There would, here, be two
+ types, pooled and singleton. On the other hand, singleton would work
+ fine for almost all cases -- the exception being a process or server
+ pool, and then we could stay singleton anyway and lock around it.
+
+ The current "server scope" behavior could, instead, fall into
+ connection scope, for long-lived connections, really we want thread
+ scope (which Brian Akins knows how to do). Is there a pool
+ associated with a thread? Contention on the pool is a pain in a
+ highly concurrent environment.
+
+
+
+* Task List
+** TODO Use r->file to determine file, doing rewriting in translate_name
+** TODO Change to controlling lifecycle by passing in a pool?
+ Need to determine how to handle server scoped then!
+** TODO Provide means to get useful output from lua errors in response body
+ Probably have to put it on the vm spec for pre-handler errors, as
+ it is pre-handler, will prolly be on the request_config somewhere,
+ but sometimes cannot put there, so... fun
+** TODO Filters
+** TODO Mapping in the server_rec
+** TODO Connection scoped vms
+** TODO Figure out how reentrancy works regarding filter chain stuff.
+ Do we need new "threads"?
+** TODO Flesh out apw_*getvm for each flavor we allow
+** TODO Rework apw_sgetvm to use the create_vm stuff like apw_rgetvm
+** TODO apw_rgetvm needs to handle connection scoped vms
+** TODO options in server scoped vms (ie, min and max vm counts)
-License:
- Apache License, Version 2.0, http://www.apache.org/licenses/LICENSE-2.0
- See NOTICE file for more information
+* License
+ Apache License, Version 2.0,
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ See NOTICE file for more information
-Problems and Patches:
- Please use dev@httpd.apache.org for discussing mod_wombat development
- To subscribe send email to dev-subscribe@httpd.apache.org
- Note that this is for development discussion, not user support :-)
+* Problems and Patches:
+ Please use dev@httpd.apache.org for discussing mod_wombat development
+ To subscribe send email to dev-subscribe@httpd.apache.org
+ Note that this is for development discussion, not user support :-)
-Contributors Include:
- Brian McCallister
- Paul Querna
- Garrett Rooney
- Martin Traverso
- Brian Akins
- Justin Erenkrantz
+* Contributors Include
+** Brian McCallister
+** Paul Querna
+** Garrett Rooney
+** Martin Traverso
+** Brian Akins
+** Justin Erenkrantz
Modified: httpd/mod_wombat/trunk/docs/running-developer-tests.txt
URL: http://svn.apache.org/viewvc/httpd/mod_wombat/trunk/docs/running-developer-tests.txt?rev=709909&r1=709908&r2=709909&view=diff
==============================================================================
--- httpd/mod_wombat/trunk/docs/running-developer-tests.txt (original)
+++ httpd/mod_wombat/trunk/docs/running-developer-tests.txt Sun Nov 2 11:05:12 2008
@@ -1,15 +1,14 @@
-The first step is to build mod_wombat per the instructions in
-building-from-subversion.txt.
+-*- mode:org -*-
+* Building mod_wombat
+ The first step is to build mod_wombat per the instructions in
+ building-from-subversion.txt.
-Once built, replace apache's httpd.conf with test/test_httpd.conf
- You will need to customize the directories listed in test_httpd.conf
- to match your system.
-
-Build and install LuaSocket
+* Build and install LuaSocket
http://www.cs.princeton.edu/~diego/professional/luasocket/
-
-
-
-Finally, to run the tests, start apache and run:
- $ cd test
- $ lua ./test.lua
+
+* Running Tests
+ 1. Replace apache's httpd.conf with test/test_httpd.conf
+ 2. Customize the new httpd.conf to match your directories
+ 3. Finally, to run the tests, start apache and run:
+ $ cd test
+ $ lua ./test.lua
Modified: httpd/mod_wombat/trunk/mod_wombat.c
URL: http://svn.apache.org/viewvc/httpd/mod_wombat/trunk/mod_wombat.c?rev=709909&r1=709908&r2=709909&view=diff
==============================================================================
--- httpd/mod_wombat/trunk/mod_wombat.c (original)
+++ httpd/mod_wombat/trunk/mod_wombat.c Sun Nov 2 11:05:12 2008
@@ -103,9 +103,9 @@
d->spec = spec;
d->function_name = "handle";
}
- // ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "request details scope:%u, cache:%u",
- // d->spec->scope,
- // d->spec->code_cache_style);
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "request details scope:%u, cache:%u",
+ d->spec->scope,
+ d->spec->code_cache_style);
spec = d->spec;
lua_State *L = apw_rgetvm(r, spec);
if (!L) {
Modified: httpd/mod_wombat/trunk/test/test_httpd.conf
URL: http://svn.apache.org/viewvc/httpd/mod_wombat/trunk/test/test_httpd.conf?rev=709909&r1=709908&r2=709909&view=diff
==============================================================================
--- httpd/mod_wombat/trunk/test/test_httpd.conf (original)
+++ httpd/mod_wombat/trunk/test/test_httpd.conf Sun Nov 2 11:05:12 2008
@@ -12,11 +12,11 @@
AddHandler lua-script .lua
-LuaConfig httpd_config.lua configure
+#LuaConfig httpd_config.lua configure
-#MapLuaHandler /basic /Users/brianm/src/wombat/test/htdocs/test.lua
-#MapLuaHandler /filter/simple /Users/brianm/src/wombat/test/htdocs/filters.lua handle_simple
-#MapLuaHandler ^/(\w+)_(\w+)$ /Users/brianm/src/wombat/test/htdocs/$1.lua handle_$2
+MapLuaHandler /basic /Users/brianm/src/wombat/test/htdocs/test.lua
+MapLuaHandler /filter/simple /Users/brianm/src/wombat/test/htdocs/filters.lua handle_simple
+MapLuaHandler ^/(\w+)_(\w+)$ /Users/brianm/src/wombat/test/htdocs/$1.lua handle_$2
LuaHookTranslateName htdocs/hooks.lua translate_name
LuaHookTranslateName htdocs/hooks.lua translate_name2