A generic application server is capable of simultaneously receiving requests,
processing
requested work, and returning results using multiple, conceptual thread pools.
In addition, functions are programmable as state machines. While executing such
a function, when a worker thread encounters a potentially blocking condition, the
thread issues an asynchronous request for data, a state transition is performed,
and the thread is released to do other work. After the blocking condition is relieved,
another worker thread is scheduled to advance to the next function state and continue
the function. Multiple priority work queues are used to facilitate completion of
functions already in progress. In addition, lower-priority complex logic threads
can be invoked to process computationally intense logic that may be necessitated
by a request. Throttling functions are also implemented, which control the quantity
of work accepted into the server and server response time.