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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tips on creating client/server application 3

Status
Not open for further replies.

matthewking

Programmer
Jul 15, 2002
75
ES
Hi,

Im looking to create a client/server c# application. I've been reading many articles on the subject, but the developers always seem to be arguing about the best practices after the article.

I was just wondering if anyone has any tips? to use synchronous or asynchronous, etc. Polling or Events etc?

I need to support upto 10 clients.

I've created a client/server app with Java before where (for the server) I created a thread to listen for connections, when a connection was made it passed the socket to a clientservice class and ran it in a new thread, then saved a pointer to the class in a vector array. Is this the same approach I should take with c#?

Thanks in advance,

Matt.
 
Well, C# has a lot of things you can use for a client/server application. It however, has my choice of ways to do it in remoting. This is a pretty simple way to do client/server things over an HTTP channel, or whatever else you want. There is lots of things you can read about using this, and you'll find it isn't very hard to use.

The weevil of doooooooooom
-The eagle may soar, but the weasel never gets sucked up by a jet engine (Anonymous)
 
Is this the same approach I should take with c#?

It's not a bad approach, and will work for a smallish-number of clients (less than 50, probably).

If you intend to scale beyond 50, then you'll probably want to think about a web-based architecture that can scale out to handle additional peak loads (by adding more web servers via a load-balancer)

Chip H.
 
i think for an internal project i would also utilize remoting. i have had discussions with various developers concerning web services on the same topic. is it a web services job to send notifications to the client concerning updates (if necessary) or should the service remain passive. i think in an internal environment (a controlled environment) i would definitely focus on an event drivin system, however if it was a matter of flexibility, a passive system in this instance wins (just my opinion).

joel konecny
global110.com
 
Thanks very much for your comments all, I got a socket server going and a client to connect, but then decided I didn't need it in my application. Oh well, good learning experience.

Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top