I'm using Indy (most definitely); There is this (very silly) proprietry protocol that sends SMS messages from subscribers to my server; all I want it to log them into a database; then the responsible program will do whatever it does with it.
It's got a pretty large subscriber base 2 mill pple; and u can imagine the traffic involved; plus if I don't acknowledge that I have received the message for processing the subscriber gets a message failed on his/her mobile phone then im in trouble. For the first few its fine; I take a couple of milliseconds to process a message, but when the 10000th message is processed it take him 10000 * x milliseconds and I do a couple of million in a very short time. So the millionth guy gets processed - say an hour after he has sent! Worse still im the client; I connect to the server and as soon as I do that the server literally FLOODS me with messages so I cant run multiple servers; plus the provider says I can only connect once. Thus the idea; when I connect; when a message comes; spawn a thread that posts into the db. Or rather spawn as many as my machine can handle. Each thread dies as soon as its done with the posting; The processing will be done by another application. Jangita. http://www.jangita.com mailto:[EMAIL PROTECTED] -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, August 16, 2005 11:04 AM To: [email protected] Subject: RE: [delphi-en] DLLs and Threads > The main reasons are > > The processing application receives these requests in a TCP connection; and > the sending application sends them at a rate of 500 per second. > > So I need to receive this request then go back and listen for the next one > as the request is processed by the dll; instead of receive > process > reply > > wait for next; because when I get to the "wait for next stage" the sending > application might have already send 1000 or so messages, most of which I > have already missed! There should be NO message, you miss! The protocols are responsable (is that spelled correctly???) for delivering messages. If it takes too much time to process each message, you have to build a fifo stack to cut down the peaks (which one of the 'normal' protocols already does). Are you using Indy? if not, USE INDY!!!! A small calculation shows, that your Connection will run with about 50 kB/s which is quite a lot. The wire is capable of that, so you could use several simultaneous connections at the same time from client to server which can reduce the bottleneck. And if that is not enough, you could use more than one server..... Bob ----------------------------------------------------- Home page: http://groups.yahoo.com/group/delphi-en/ To unsubscribe: [EMAIL PROTECTED] Yahoo! Groups Links ------------------------ Yahoo! Groups Sponsor --------------------~--> <font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12hdrc2nc/M=362329.6886308.7839368.1510227/D=groups/S=1705115362:TM/Y=YAHOO/EXP=1124189098/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992 ">Fair play? Video games influencing politics. Click and talk back!</a>.</font> --------------------------------------------------------------------~-> ----------------------------------------------------- Home page: http://groups.yahoo.com/group/delphi-en/ To unsubscribe: [EMAIL PROTECTED] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/delphi-en/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

