On Thu, Dec 2, 2010 at 7:38 AM,  <[email protected]> wrote:
>
> [snip]
>
>> I dont understand.
>> I parse single request in single thread (for each request new thread)
>> and what can I do (other) with sessions?
>
> One scenario looks like this:
> - Request comes in (on whatever thread).
> - Determine session data (your form) for the request.
>  Session data is in a global list.
> - Find a thread to handle the request.
> - Pass session data to thread and let it handle request.
>
> Another way is
> - Connection is accepted.
> - An idle thread to handle request is found.
> - Thread looks up session data from data in request.
> - Thread handles request using found session data.

Now I understand the Michael's concept and looks like better for me.

One thread for each session is the easy way, no doubt, but an
application it have many, many, many users logged, the web server
would become very slow. Also, each thread will create a connection
with DB and we would have a lot of connections at the same time!


Marcos Douglas

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to