views:

499

answers:

2

Hi All,

My first question so go easy on me :)

I've been developing for years and have written WAY too many apps (mostly web apps) using web services - I'm happy with SOAP/WSDL/etc... I also used to write TCP/IP client-server apps back in the day using good old winsock.

I'm a bit bored and looking for a new project to expand my skills so decided to have a go at doing either a game or some sort of server monitoring and remote control application

I haven't decided which and the answer to this question will hopefully inform my decision.

What I'd like is some advice as to which methods I should be looking to handle the communication.

Let's assume I'm doing thew game for the moment - I want 2-way communication with low latency and the ability to handle as many simultaneous connections as possible.

I've considered web services but it seems like a lot of overhead - especially as I'd need the client to expose one as well.

TCP/IP would do the job but seems like it's a little low-level and I lsoe a lot of the advantages like definitions. Presumably I'd need to formulate a new protocol for the communications etc... I'm also unsure how I'd have one client use multiple channels for concurrent information - eg a chat and updating location information. I could attempt to multiplex this in some way but my initial ideas re: the queuing seem quite messy

.Net remoting - I've not really touched this much at all. Seems to have low overhead and more flexibility than webservices but I don't know enough to evaluate properly.

I'd really appreciate any input you can provide (and a link to a tutorial would be fantastic)

Thanks in advance for your help

EDIT: I've had an answer which points me at a UDP library. Is UDP appropriate for this? For location information/similar which requires no history, I can see how this is advantageous but for a chat, a lost packet could be an issue - or do I manually send back an acknowledgment of receipt? If so, aren't I duplicating TCP/IP functionality for limited advantage?

Apologies if this is an incorrect way to expand on the question - guidance for that appreciated too :)

+1  A: 

Take a look at something like Lidgren and see how that work's. Its written in c# so its able to be used with VB.Net

Lidgren is a socket wrapper, Ive used it in a few small scale multiplayer games, ( mainly by using a header stating packet type. ie first byte represents packet type,

Lidgren

Fusspawn
Thanks for the quick response - I'm looking at it now. I'd also like to expand my question which I'm going to do by editing it (to include question about UDP). I hope this is the right way to do it...
Basiclife
Yup, Far as i know im no SO expert either :P
Fusspawn
Both of you can _become_ SO experts by starting with the http://stackoverflow.com/faq.
John Saunders
+1  A: 

If you're up to date on .NET 3.5 SP1, then you should use WCF. You say you don't want to use web services, and I assume from that you mean you don't want to use SOAP over HTTP. WCF does a lot more than SOAP over HTTP. In particular, it can do binary over TCP/IP using the same infrastructure. It also has support for peer-to-peer.

John Saunders
Thanks, I've touched on WCF but only acting as a SOAP webservice - I'll look into the P2P aspects. This may well be what i'm looking for - thanks.
Basiclife
Just remember that the vast majority of the way you'd build a WCF SOAP service is exactly what you'd use to access the service using binary and TCP/IP. In fact, a single service can handle both SOAP and TCP/IP and any number of other transports, and will largely not even notice.
John Saunders
Thanks - This definitely looks promising and I like the flexibility.
Basiclife