Hi everyone,

i've an application to write, a client and a server.
i've choosen to use the HTTP protocol to enable communication through them.
Hence, i'll use the THttpServer as my server front-end.

my question is the following :
some requests may use some database stuff (SQLite). It shouldn't be the case, 
but,
in case the SQL stuff may need long duration (long>10 secs) i prefer to use 
threads to get DB data, as there may be several 
clients connecting at the same time.

Am i right to implement such requests as this :
Form.OnGetDocument :
        Create a Thread with the HttpConnection attached and 
FreeOnTerminate:=True;
        Assign a OnThreadTerminate
        Run the thread
        Set Flags to hgWillSendMySelf

Form.OnThreadTerminate
        AttachedHttpConnection.AnswerString/AnswerStream/AnswerWhatever

Does this design seem good ?
i mean will i be able to serve several connections at the same time 
(independantly of DB concurrential access that i'll manage 
within thread context) ?

Thanks in advance for your help !

Regards,


-- 

Guillaume MAISON - [EMAIL PROTECTED]
83, Cours Victor Hugo
47000 AGEN
Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50
e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to