Author: rjung
Date: Sat Mar 21 18:27:44 2009
New Revision: 756983

URL: http://svn.apache.org/viewvc?rev=756983&view=rev
Log:
Add many TODOs.

Modified:
    tomcat/connectors/trunk/jk/native/TODO.txt

Modified: tomcat/connectors/trunk/jk/native/TODO.txt
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/TODO.txt?rev=756983&r1=756982&r2=756983&view=diff
==============================================================================
--- tomcat/connectors/trunk/jk/native/TODO.txt (original)
+++ tomcat/connectors/trunk/jk/native/TODO.txt Sat Mar 21 18:27:44 2009
@@ -24,6 +24,9 @@
 How to combine the sorting with the offset implementation (especially
 useful for strategy BUSYNESS under low load).
 
+Local error states and likely other features will also break in case
+we do naive reordering.
+
 2) Reduce number of string comparisons in most_suitable
 ========================================================
 
@@ -53,20 +56,7 @@
 Could we use hashes instead of string comparisons all the time?
 I'm not sure, if a good enough hash takes longer than a string comparison 
though.
 
-3) Optimization of JK_WORKER_USABLE
-====================================
-
-We use that one quite a lot. Since it is now a combination of four
-ANDs of negated values, we could also do
-
-#define JK_WORKER_USABLE(w)   (!((w)->in_error_state || ($w)->is_stopped || 
(w)->is_disabled || (w)->is_busy))
-
-I think it we should consider combining the flags into an additional
-is_usable (makes checks easier, but of course we would have to set it
-every time we change one of the four other flags). But in terms of
-performance that happens rarely.
-
-4) Code separation between factory, validate and init in lb
+3) Code separation between factory, validate and init in lb
 ============================================================
 
 The factory contains:
@@ -91,37 +81,48 @@
 
                 p->lb_workers[i].s->maintain_time = time(NULL);
 
-5) Refactor Logging
-====================
+4) Logging
+==========
 
-a) Use the same code files for the request logging functions in Apache 1.3 and 
2.0.
+a) Allow logging of request url or uuid in jk log to ease matching with access 
log.
 
-b) Use the same code files for piped logging in Apache 1.3 and 2.0.
+b) Implement log rotation for IIS.
 
-6) ajpget
-==========
+c) Allow adding of log notes for IIS like we do with Apache.
 
-Combine ajplib and Apache ab to an ajp13 commandline client ajpget.
+d) Add error type info to access log notes
+
+e) Refactor: Use the same code files for the request logging functions in 
Apache 1.3 and 2.0.
+
+f) Refactor: Use the same code files for piped logging in Apache 1.3 and 2.0.
 
-7) Manage lb method and locking via jk_status
-=============================================
+5) ajpget
+==========
 
-It's not yet contained in the shm.
+Combine ajplib and Apache ab to an ajp13 commandline client ajpget.
 
-8) Parsing workers.properties
+6) Parsing workers.properties
 =============================
 
 Parsing of workers.properties aditionally to just looking up attributes
 would help users to detect syntax errors in the file. At the moment
 no information will be logged, e.g. when attributes contain typos.
 
-9) Persisting workers.properties
+Example: worker.list vs. worker.lists.
+
+7) Persisting workers.properties
 ================================
 
 Make workers.properties persist from inside status worker.
 
-10) Reduce number of uses of time(NULL)
-=======================================
+Add additional properties file, that contains a journal of property changes 
done
+via the status worker. When initializing those overwrite the initial 
workers.properties.
+
+Update actions in the status worker will allow to optionally add a change to 
this journal.
+We can also add a comment with timestamp etc. to each journal line.
+
+8) Reduce number of uses of time(NULL)
+======================================
 
 We use time(NULL) a lot. Since it only has resolution of a second,
 I'm asking myself, if we could update the actual time in only a few
@@ -159,8 +160,8 @@
 The last two cases could again use the same time, which then would be needed
 to be generated at the end or directly after service.
 
-11) Access/Modification Time in shm
-===================================
+9) Access/Modification Time in shm
+==================================
 
 a) [Discussion] What will this generally be used for? At the moment,
 only jk_status "uses" it, but it only sets the values, it never asks for them.
@@ -178,16 +179,16 @@
 either set_workers_time and sync_access_time should be independently,
 or the second call in jk_status coulkd be removed.
 
-12) "Destroy" functionality
+10) "Destroy" functionality
 ===========================
 
 [Hint] Destroy on a worker never seems to free shm,
 but I think that was already a flaw without shm.
 
-13) Locks against shm
+11) Locks against shm
 =====================
 
-It might be an intersting experiment to implement an improved locking 
structure.
+It might be an interesting experiment to implement an improved locking 
structure.
 It looks like one would need in fact different types of locks.
 In shm we have as read/write information:
 
@@ -221,6 +222,44 @@
 
 By the way: at several places we don't check for errors on getting the lock.
 
+12) Global locks
+================
+
+We might want to make the lock technology choosable, like httpd does.
+E.g. on Solaris the default lock type if fcntl, and we can easily
+get an invalid EDEADLOCK for our jk_log_lock.
+
+The following pthread based non global locks are used:
+
+- one mutex for each AJP worker, synchronizing access to the connection
+pool, which exists per process
+
+- one mutex for each lb worker
+
+- a mutex used during dynamic update of uriworkermap.properties to
+prevent concurrent updates. Updates are done per process.
+
+- a mutex to prevent concurrent execution of the process local internal
+maintenance task
+
+- a mutex for access to the shared memory when changing or reading
+configuration parameters. That might be a little unsafe, because it
+actually should be a global mutex, not a process local, but those config
+changes are only done due to interaction with the status worker, so
+there's very little chance for unwanted concurrency here. All dynamic
+runtime data are already marked as being volatile.
+
+All except the last seem to be safe. The last might need some hybrid model
+using thread local mostly and process global when doing updates.
+
+See also: http://marc.info/?t=123394059800003&r=1&w=2
+
+13) Understand the exact behaviour of shm and restarts
+======================================================
+
+Furthermore: rotatelogs (?) and gzip (mod_mime_magic) seem to close
+the (non-existing) shm file. Maybe a problem on some platforms?
+
 14) What I didn't yet check
 ===========================
 
@@ -234,3 +273,63 @@
 
 d) How complete is mod_proxy_ajp/mod_proxy_balancer.
    Port changes from mod_jk to them.
+
+15) Status worker
+=================
+
+Allow managing pool and connection parameters. Add flags to
+pool and connections to signal workers and maintenance whether
+existing connections should be closed and renewed.
+
+Check completeness of attribute manageability for AJP workers.
+
+Check completeness of runtime data display, e.g.
+reset_time, recover_time, etc. Maybe also add "last error type".
+
+Work on a global display of process local data, e.g. state of the
+process local connection pools (sizes, num connected/idle).
+
+Rework the GUI:
+
+- Basic overview start page with links to the workers,
+  maybe a checkbox to decide whether you want to see config data too.
+- Detail view (what type of error was last and when etc.), detail view
+  for connection pools.
+
+16) URI mapping
+===============
+
+Add more extensions?
+
+17) Connection Pool
+===================
+
+How would a good global maximum count look like?
+Simply limit busyness? Soft limit (applies only to non-sticky requests)
+and a hard limit (applies to all requests)?
+
+18) IP V6
+=========
+
+There's a Bugzilla with a patch.
+
+19) IIS Chunked Encoding
+========================
+
+Move from alternative build to default.
+
+What about the other ifdef'd features?
+
+20) Add REMORE_PORT as a default JkEnvVar
+=========================================
+
+... and port to IIS to fix the getRemotePort() problem.
+
+21) Rework HowTo docs
+=====================
+
+22) Add better example config
+=============================
+
+23) Remove JNI worker
+=====================



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to