Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Client Server Interaction using sockets

Status
Not open for further replies.

Webrookie

Programmer
May 18, 2000
112
US
Alright....basically I have a server project and a client project each with a socket control.

I can successfully perform all tasks with one client. So everything is fine in that respect.

When I have someone else connect (2 clients) to the server, everything is good, but when I have both clients download a file...the server kind of sits for about 15 - 30 seconds to transfer the files, which it does transfer simultaneously.

Now my question probably goes out to anyone who has dabbed in multiple clients interacting with a server. It lies in what happens if I have 15 clients or 30, ect...I am incapable of testing right now, and was hoping I could get a good estimate of whether time to hook up requests would increase exponentially, or what?

I have been pointed in the direction of pooling...and am looking at the MSDN sample as I type this....and I think all that code is unnecessary for my application. Linked Lists and what not...well, maybe the best word is "hoping."

My application basically mimics an ftp session and yes I've tried using the Inet control.....but that had problems I didn't like that.

Help?
 
Your application is probablly single threaded so your applicaiton will be time sharing its resources with each client that is connected to it. The load that is placed on the server will depend on how intensive the operation is that each client program is requesting. It also depends on how speedy the machine is that the server is running on. Also what kind of resources are available on the server machine. To do load ballancing, you might experiment with 8-10 clients per server application and then running multiple instances of the server application. The only problem with this is that you can't use the same port on the two applications. The problem grows more complex from here, however there are two approaches that you can take.

1. Assign X clients to connect to port P1 and Y clients to connect to P2. This is the simplest approach.

2. Have a 2nd server application that directs incoming requests on a common port to alternate ports on different instances. This is by far the more tricky one, but not out of the realm of VB.

Good Luck! Snaggs
tribesaddict@swbell.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top