From: Stefano Zacchiroli Date: Thu, 29 May 2003 17:57:06 +0000 (+0000) Subject: thread handling reviewed X-Git-Tag: submitted~12 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=c297e3aefe31a67df3fc3df9805d0f64494d1ad9;p=helm.git thread handling reviewed --- diff --git a/helm/papers/calculemus-2003/hbugs-calculemus-2003.tex b/helm/papers/calculemus-2003/hbugs-calculemus-2003.tex index d8bfbc22a..9ebbc9403 100644 --- a/helm/papers/calculemus-2003/hbugs-calculemus-2003.tex +++ b/helm/papers/calculemus-2003/hbugs-calculemus-2003.tex @@ -424,18 +424,18 @@ the \hbugs{} architecture. Our current implementation is based on a multi threaded architecture exploiting the capabilities of the O'HTTP library. Each tutor is composed - by two thread always running plus + by one thread always running plus an additional thread for each running \musing{}. One thread is devoted to listening for incoming \ws{} request; upon correct receiving requests it - pass the control to the second always-running thread which handle the pool - of running \musings{}. When a new \musing{} is requested, a new thread is - spawned to work them out; when a request to interrupt an old \musing{} is - received, the thread actually running them is killed freeing its - resources.\ednote{CSC: A cosa dobbiamo questa architettura delirante? Se non - ricordo male al problema dell'uccisione dei thread. Ora o si spiega - il motivo di questa architettura o si glissa/bluffa. Zack: cosa ti sembra - delirante? che i thread vengono uccisi? ... non mi e' molto chiaro ... - CSC: la motivazione per avere due thread always running e non due} + 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. This architecture turns out to be scalable and allows the running threads to share the cache of loaded (and type-checked) theorems.