pass the control to a second thread, created on the fly, to handle the
incoming request following the classical one-thread-per-request approach in
web servers design.
- If the received request is a Start\_musing one a new thread is spawned to
- handle it and the thread in duty to handle the HTTP request returns an HTTP
- response containing an identifier of the just started musing.
- Otherwise, if the received request is a Stop\_musing one, it should carry a
- musing identifier used to identify the thread responsible for a musing. Once
- identified that thread gets killed and an HTTP response could be returned.
+ If the received request is \texttt{Start\_musing}, a new thread is
+ spawned to handle it and the thread in duty to handle the HTTP request
+ returns an HTTP response containing an identifier of the just started
+ musing. Otherwise, if the received request is \texttt{Stop\_musing},
+ it carries a \texttt{musing} identifier used to identify the thread
+ responsible for a \texttt{musing}; that thread gets killed and an HTTP
+ response is returned.
This architecture turns out to be scalable and allows the running threads
to share the cache of loaded (and type-checked) theorems.