[Lazarus] GUI development for web UI
md at delfire.net
Thu Dec 2 13:46:32 CET 2010
On Thu, Dec 2, 2010 at 7:38 AM, <michael.vancanneyt at wisa.be> wrote:
>> 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!
More information about the Lazarus