> Each client thread

Frequently using threads result from a misconception about using TCP/IP,
specially with asynchronous component such as ICS. You don't need
multithreading to support a large number of concurrent users ! You _may_
need multithreading for your dataprocessing if it is blocking (a SQL request
is most of the time blocking).

> Would someone point me in the right direction as to where
> would be the best place to decompress/decrypt the data

Decompress/decrypt either on the fly in the OnDataAvailable event or
decompress/decrypt once you received the complete data, just before updating
your database. If you have a streaming decompression/decryption library,
then on the fly is easy. Otherwise, decompress once you get everything.

> and then instantiate the db connection.

It depends on the client behaviour and how many simultaneous clients you
have. You may connect to the DB when the client connect and disconnect when
the client disconnect. Or you may have a kind of connection pool and pick a
connection when you need it.

btw: Please use a subject with as much meaning as possible.

--
[EMAIL PROTECTED]
http://www.overbyte.be


----- Original Message ----- 
From: "Andy Law" <[EMAIL PROTECTED]>
To: <twsocket@elists.org>
Sent: Monday, March 28, 2005 4:28 PM
Subject: [twsocket] Newbie here


> Hi
>
> I'm looking to build a server application that will receive data from
multiple clients.
>
> Each client thread will send it's data encypted and compressed, the server
will process this and the post the information to a Firebird Database;
>
> I've been playing around with the ThrdSrv example, and created an db
connection class that I use to talk to the database using IBOjects.
>
> Would someone point me in the right direction as to where would be the
best place to decompress/decrypt the data and then instantiate the db
connection.
>
>
> many thanks
>
> Andy Law
> -- 
> 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
>


-- 
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