]> granicus.if.org Git - apache/blob - modules/lua/README
c614b3e2ce4244f57ea0b640ecab8c306e60d5f9
[apache] / modules / lua / README
1 -*- mode:org -*-
2 * Requirements:
3 ** lua 5.1 ( http://www.lua.org/ )
4 ** Apache HTTPD 2.2 ( http://httpd.apache.org/ ) or Apache HTTPD 2.3
5
6 * Documentation
7   See docs/README
8
9 * Building
10   For now, see docs/building-from-subversion.txt
11
12 * To Consider
13   Allow definition of lua_State instances associated with arbitrary
14   pool using the pool's user_data constuct. There would, here, be two
15   types, pooled and singleton. On the other hand, singleton would work
16   fine for almost all cases -- the exception being a process or server
17   pool, and then we could stay singleton anyway and lock around it.
18
19   The current "server scope" behavior could, instead, fall into
20   connection scope, for long-lived connections, really we want thread
21   scope (which Brian Akins knows how to do). Is there a pool
22   associated with a thread? Contention on the pool is a pain in a
23   highly concurrent environment.
24
25   Could use apr_thread_data_(get|set) if I can find a way to hook into
26   thread destruction. Looks like apr threads let you use the standard
27   APR_POOL_DECLARE_ACCESSOR(thread); defined method, just need to look
28   up what form that takes. -- apr_thread_pool_get -- just attach to
29   that pool.
30
31   Given that, we can associate a hash of lua_State instances with
32   arbitrary pools, such as the request pool, thread pool, server pool,
33   etc. We then use the file as key into the hash. Users, able to
34   specify the handler function, can then make use of the same file
35   with different handlers to reuse states.
36
37   
38
39 * Task List
40 ** TODO Use r->file to determine file, doing rewriting in translate_name   
41 ** TODO Change to controlling lifecycle by passing in a pool?
42    Need to determine how to handle server scoped then!
43 ** TODO Provide means to get useful output from lua errors in response body
44    Probably have to put it on the vm spec for pre-handler errors, as
45    it is pre-handler, will prolly be on the request_config somewhere,
46    but sometimes cannot put there, so... fun
47 ** TODO Filters
48 ** TODO Mapping in the server_rec
49 ** TODO Connection scoped vms
50 ** TODO Figure out how reentrancy works regarding filter chain stuff. 
51    Do we need new "threads"?
52 ** TODO Flesh out apw_*getvm for each flavor we allow
53 ** TODO Rework apw_sgetvm to use the create_vm stuff like apw_rgetvm
54 ** TODO apw_rgetvm needs to handle connection scoped vms     
55 ** TODO options in server scoped vms (ie, min and max vm counts)
56 ** TODO provide means to implement authn and authz providers
57 ** TODO: Flatten LuaHook* to LuaHook phase file fn ?
58 ** TODO: Lua and ap_expr integration in one or both directions
59 ** TODO: document or remove block sections
60 ** TODO: test per-dir behavior of block sections
61 ** TODO: Catch-up documentation on r: methods
62 ** TODO: 500 errors instead of 404 with AddHandler lua-script
63 ** TODO: Suppress internal details (fs path to scripts, etc) in error responses
64     
65 * License
66   Apache License, Version 2.0,
67   
68   http://www.apache.org/licenses/LICENSE-2.0 
69
70   See NOTICE file for more information
71         
72 * Problems and Patches:
73   Please use dev@httpd.apache.org for discussing mod_lua development
74   To subscribe send email to dev-subscribe@httpd.apache.org  
75   Note that this is for development discussion, not user support :-)
76    
77 * Contributors Include
78 ** Brian McCallister
79 ** Paul Querna
80 ** Garrett Rooney
81 ** Martin Traverso
82 ** Brian Akins
83 ** Justin Erenkrantz
84 ** Philip M. Gollucci