BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Is it necessary to extra organization for multible sending t

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock
View previous topic :: View next topic  
Author Message
Mustafa Korkmaz
Guest





PostPosted: Thu Feb 19, 2004 3:31 pm    Post subject: Is it necessary to extra organization for multible sending t Reply with quote



Is it necessary to extra organization for multible sending to clients?
There will be alot of clients these are connected to my Server program.
Alot of clients will want to send message to each other over Server.
For example this is a chat application..
I have not used any extra thread at Server side. I only use TidTCPSErver and
TidThreadMgrPool.
if the Server want to send a message to any client it use this method:
AThread.Connection.WriteBuffer (...);
Server knows Athreads of the clients.
What happens when 100 clients want to send message to other clients in the same time?
All necessary organizations is being done by TidTCPSErver and TidThreadMgrPool components?
Is there any wrong thing in this description?
All necessary multi threading operations is being done by Indy for Server side.
I will not create any extra thread.And I will not think for any buffer confliction.

I want to be sure.
Thanks

Mustafa
Back to top
Martin James
Guest





PostPosted: Thu Feb 19, 2004 4:10 pm    Post subject: Re: Is it necessary to extra organization for multible sendi Reply with quote




"Mustafa Korkmaz" <mkorkmaz42 (AT) hotmail (DOT) com> wrote

Quote:

Is it necessary to extra organization for multible sending to clients?

To be sure, and to enable any practical debugging, add extra organisation.

To start with, I would add one thread that does all management & post all
requests to it. This would be the only place where the client List would be
accessed. No client thread would be permitted to close without permission
from this thread. No client would be allowed to log on without notification
to this thread. All writes would be done, or at least triggered, from this
thread.

Without debuggable organisation, I would not approach anything like a chat
server.

Only after the management worked with no AVs or other problems would I
attempt optimisations for performance.

The thought of hundreds of threads asynchronously attempting to lock &
unlock a threadList while clients are busy trying to connect & disconnect
fills me with dread.

Rgds,
Martin





Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.