Some questions regarding mmorpg server code architecture

Started by
43 comments, last by roookie 19 years, 12 months ago
1. Do i need to aim on UNIX family clusters for fast and reliable mmorpg servers? 2. On what OSes do the famous MMORPG servers run (DAoC, AO, Everquest, etc...)? 3. What socket handling strategy do i need to use for the best speed results? UNIX variants: a. kqueue and kevent b. aio_* family c. select() d. multithreading (posix threads), one thread per client e. synchronous socket i/o Windows variants: a. IOCP b. select() multiplexing c. asynchronous sockets d. synchronous sockets (sigh) e. multithreading Any other variants? 4. What is a common server hardware configuration for mmorpgs ? (clusters or single machines? clusters built on what?) 5. What protocol do i use? UDP (this means i have to manage connections and reliable delivery myself) or TCP (i''ll have to do something with its speed)? 6. How to packetize TCP streams correctly, when handling multiple connections (more than 1000 players online)? 7. Are there any opensource mmorpgs to download and learn from? 8. How should the logic of low-level networking code (receiving and sending packets + handling connections) should look like? thx in advance... if i get new questions, i''ll post them here...
Advertisement
http://www.kegel.com/c10k.html
C-Junkie, thx for the link, that is planty of interesting materials and docs, but it is oriented on servers providing common internet services (http and ftp)... Those services are based on the following scheme: connect-request-reply-disconnect. As for the games, the connection lifetime can vary a lot, and the amount of data sent and received by both sides is undetermined... I would be glad if you post links to similar analisys and reviews of popular networking paradigms concerning game servers...
Games that I know of and their OS''s for a fact:

Asherons Call - Windows 2000
Everquest - Windows NT
Anarchy Online - Windows 2000
Shadowbane - Windows 2000
Dark Age of Camelot - Linux / Windows 2000 mix
Ultima Online - Windows NT
EVE Online - Windows 2000
Asherons Call 2 - Windows 2000


I can''t really think of any other major MMORPGs at the moment. I spoke with the majority of these development teams at one point or another, which is how I learned what OS / database servers they use.
check out Planeshift (http://www.planeshift.it)
You know if any of them use IOCP?

-=[ Megahertz ]=-
-=[Megahertz]=-
thx, Imperil

And what about question #6 ? TCP is perfect for online games, because it already has reliable delivery and connection management, but one of the most significant problems that rise when using TCP is packetizing the stream (games usually treat incoming and utcoming data as packets (commands, states, etc...), not streams). When using TCP with its stream-based nature, how to properly handle multiple buffers and data pending to be sent/received through multiple connections?
quote:Original post by roookie
thx, Imperil

And what about question #6 ? TCP is perfect for online games, because it already has reliable delivery and connection management


It depends on the game. For turn based or non time critical things ( cards/checkers/etc ) TCP will be perfect. For games that require quick delivery, then TCP is evil. See this article on Gamasutra for some nice discussion about online protocols.




-------
Andrew
PlaneShift - A MMORPG in development.
acraig, mmorpgs are not first person shooters, there''s no fast action in there... Mmorpgs can afford lag of several hundreds milliseconds. All commercial mmorpgs i know use TCP. The question was not to point out advantages and disadvantages of certain protocols.. The question was: how to packetize the streams when serving multiple connections? (but still thx for answering)
Question #9
Does anybody know of any good complete step-by-step tutorials on IOCP?

This topic is closed to new replies.

Advertisement