Server Architecture

Content and general development discussion, including maps, quests, and server code from the development team.
Post Reply
seoushi
Peon
Peon
Posts: 2
Joined: 30 Apr 2009, 05:58

Server Architecture

Post by seoushi » 30 Apr 2009, 06:09

I realize this is probably off-topic and only really applies to network devs if they are interested. Basically I'm working on designing out an MMO server architecture and I would like to get feedback considering TMW is open source and it works I figured this might be a good place to ask.

Right now I have two designs, the second (at the bottom under the first 2 images) being the better of the two imho.

http://seoushi.com/index.php/MMOServerA ... tureDesign

My purpose for making this is mostly for fun and just to get a better grasp of server design (what works and what doesn't). It is doubtful that this will turn into a fully playable game and I doubt I will need near the scalability or flexibility as I've described but then again this is for fun. As for my experience, I've been programming for almost a decade now and have been a profession programmer for five of those and am current a professional game programmer.
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: 25 Aug 2005, 17:08
Location: Germany

Re: Server Architecture

Post by Crush » 30 Apr 2009, 11:17

The design of TMWServ is a bit more simple.

We currently have one main server (called account server) and one or more game servers. Updates are handled by giving the client a http URL to download the updates from. There are already plenty of solutions for http loadbalancing and thus the whole update system is outside of scope of the server architecture.

The game servers handle the gameplay itself and the account server handles authentication, transfers of characters between game servers and currently also database requests.

The database management can be outsourced to an external mySQL or PostgreSQL server, but the requests themself always go through the account server which translates the requests from the game servers into SQL code and gives the game servers the parsed result.

My prediction is that the database abstraction by the account server will be the main bottleneck in the scaleability of the whole architecture. Thus it might be necessary to create a new server application for database abstraction which is accessed by the game servers directly and which can be distributed to multiple physical machines.

But at the moment it is too early to tell. Working in that direction would be premature optimization.
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
seoushi
Peon
Peon
Posts: 2
Joined: 30 Apr 2009, 05:58

Re: Server Architecture

Post by seoushi » 01 May 2009, 05:41

Thanks for that reply. I started a post on gamedev before I posted here and this is a slightly edited version of my recent update, I figure it will be the last major architecture design I make before I start designing out the protocols and such.


So I've done more research, watched a few video presentations and generally feel I have a good idea how big/commercial mmo servers work. From what I've seen few if not any implement a system like I've designed, not because it won't work but rather because you just don't need that much complexity.

I've changed up my design a bit in regards to this and have a built up a roadmap to the "end" design. I feel this will be easier to implement and get something working faster and I can see where the load is going at each stage, perhaps I'm over looking some process that takes too much time and needs to be extracted to it's on server type. You can view the road map here.

From what I've looked at the biggest thing that has impressed me so far is Eve Online. I knew it was a single world (no sharding) and that it had more peek concurrent users than any more users on a single server instance which is impressive by itself but what I didn't know is that it runs on (stackless) python. This made me rethink if I really want to use C++ as it can be error prone, tedious and slow to code efficiently and clearly express what you are doing (big statement however I would say a lot of people would agree python/C#/others are easier to develop in than c++). Threading can also be a hassle and fibers/tasklets/coroutines or whatever you want call them look very very interesting and a good solution. Servers are relatively cheap in the scheme of things and even tho python is slow throwing more servers at the problem obviously does work.

The other thing I've noticed that I didn't expect is the use of TCP/IP. Eve Online, World of Warcraft and several other big mmos use TCP/IP exclusively, this imho would make things simpler and not have to rely on ENet or another library which I have no idea if I will run into problems with. Not to mention I don't plan on a FPS MMO so real time movement is less important.

I'm going to look more into "stackless" languages and see which one I like better. I may just go the python route. Either way I think I have a solid route for development and expansion, feel free to criticize :) .
Post Reply