Jump to content
  • Advertisement
Sign in to follow this  
Leep

Communication - What to use?

This topic is 2994 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've just spent two mentally exhausting days researching the best technologies to use to do communication between clients or between clients and a server (be it a game server or lobby). I'm a C# developer (been programming as hobby and the professionally since late 80s) and will probably use XNA to develop some basic Windows games (Card games, Battleship, etc) before I get into anything more serious [the next greatest MMORPG! Hey, it could happen... ;)]. I'm very interested in the client-client and client-server network communication and the best ways to do it. My research turned up a quite overwhelming amount of information, everything from XNA's Windows Live, Lidgren library, WCF, Web Service(s)...

Here's some points I'm concentrating on:

1. XNA's Windows Live is completely out. It requires everyone connecting to have a paid XNA Developers Club membership to do networking with Windows. It seems to be just to allow developers to test games that will be released for the Xbox, not to make networkable Windows Games. The XNA redist for Windows does not include the Windows Live libraries that include the game lobby, etc.

2. Web Service(s) - I could host Web Services in an IIS environment on one of the web hosting sites I use. That would give me a dedicated IP and could allow the clients to call methods such as Join, Leave, Chat, etc and the Web Service could implement the lobby, and even game logic. But how efficient would the communication be? Obviously, if I'm just sending "Client A fired at Client B at location C4" (not as text strings obviously) to the web service, and Client B connects to the web service to retrieve that message and tells the web service "Client B says Client A missed" and Client A connects to the web service and gets that message, a web service may do just fine. But if I'm implementing the next greatest MMORPG and sending MUCH more data back and forth, is a web service going to choke?

3. Would be nice if the communication could work without requiring the players of the game to configure their firewalls. This is really the biggest snag for me. How do you establish communication between two computers "somewhere out there on the Internet" when some may only allow http port 80 traffic? How do big games (like WoW) handle that? Do they use some transport means that goes over http?

4. There needs to be some way for users to find and connect to each other (ultimately). If I have a lobby server running on a dedicated IP, that would obviously help. I have some hosted web space (with SQL server, don't know what else). I have my own server at home with a no-ip.org url I COULD use (at least for development and testing with friends scenarios), but that would violate my ISP's rules. I'd rather not spend any money on setting up a dedicated server [$0.12/hour ($90/month) per process on MS Azure Cloud for dedicated VM... ;)] when I'm just learning/development/testing.

5. MS Azure's Service Bus (part of AppFabric) would be great. It allows connections between systems through firewalls/NAT... If I understand it correctly, it first connects the two systems via port 80 (both connected to the Azure AppFabric service), but tries to eventually find a more direct path for the two to communicate. Unfortunately, Azure Service Bus costs $4/month per connection (max connections used at once in a day, prorated... so if you use 10 connection one day, and only 2 connection the rest of the 30 days, you get billed (4*10/30*1 + 4*2/30*29, or $9.07). Not much, I know, but for development/learning, not doing this for profit now, it's a bit.

Ideas? Pointers? Detailed map on how to work through this overwhelming maze of communication over the Internet? Suggested libraries (that would work in .NET/XNA)? :)

BTW, I just noticed the FAQ in this forum and apologize if anything (or all) of what I brought up in this post is covered in that FAQ or other sites it references. I'm looking through it now.
-----
Lee

Share this post


Link to post
Share on other sites
Advertisement
Quote:
How do big games (like WoW) handle that? Do they use some transport means that goes over http?
Everything happens on a central server hosted in their headquarters - clients are just dumb terminals, like web browser.

Quote:
If I have a lobby server running on a dedicated IP, that would obviously help. I have some hosted web space (with SQL server, don't know what else).
Free web hosts don't work for this type of traffic patterns, so dedicated host or VPS of sorts.

Quote:
5. MS Azure's Service Bus (part of AppFabric) would be great. It allows connections between systems through firewalls/NAT...
These are not systems aimed at real-time communication, at least not for really low latency and jitter.


Simple answer - anything that is not REST with 1-15 minute update rate and mostly cached static content will require dedicated host. $90 is fairly cheap.

There exist dedicated enterprise grade messaging busses, but they begin a 7 digits.

Share this post


Link to post
Share on other sites
Quote:
Everything happens on a central server hosted in their headquarters - clients are just dumb terminals, like web browser.
I realized that after I posted, games like WoW are all client-server based.

Quote:
Free web hosts don't work for this type of traffic patterns, so dedicated host or VPS of sorts.
The web host I have isn't a free host, I pay monthly for it and it's through a friends hosting company so I may be able to get more direct access to (possibly virtual) box, I have to look further into it. Even if I can only host an ASP.NET web service with access to a SQL server, it should suffice for at least a lobby, if not the NAT-Punchthrough (which after a lot more reading, looks like it requires the clients to establish a UDP connection to the server, so TCP connection to a Web Service wouldn't work).

Quote:
These are not systems aimed at real-time communication, at least not for really low latency and jitter.
I realize they aren't well suited to real-time communication, but for turn-based communication they COULD suffice. To be honest, I just attended a two-day Windows Azure Boot Camp so I had Azure on the brain when I posted that. LOL! :) At least now that I've done a lot of reading on NAT hole punching, I understand how Azure Service Bus (probably) tries to establish a more direct connection between the two clients.

BTW, Peer-to-Peer Communication Across Network Address Translators by Bryan Ford, Pyda Srisuresh, and Dan Kegel is a great article I found on NAT hole punching. Very easy to understand.

-----
Lee

Share this post


Link to post
Share on other sites
You can get a dedicated hosting server with dual-core 1.6 GHz CPU, 120 GB hard disk, Linux, and 2 TB of traffic per month for $39/month. This is from interserver.net. A friend has had that plan for a year, and likes it, so it seems legit.

There are links about hole punching, and server hosting, and pretty much everything else you ask about in the Forum FAQ. It's worth a scan-through once in a while for anyone doing network programming.

It's also interesting to note that Azure, Google, Cloudera, Salesforce, and the other service-based cloud hosts all provide a cloud with assumed web-like clients and HTTP-like traffic patterns. The two "clouds" I know about that give you enough low-level access to run game-style configurations are Amazon's ECC and Rackspace. On Amazon, you can set up a single host for $75/month, plus traffic. Don't know what Rackspace costs on the lower end. Both of them are virtualization based, though.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!