Author Topic: Decentralizing the Server  (Read 1431 times)

tsharky87

  • Traveller
  • *
  • Posts: 16
    • View Profile
Decentralizing the Server
« on: August 27, 2009, 10:36:51 am »
Greetings!

I have been an enthusiastic supporter of PlaneShift for many years for several reasons (great story, great role playing, open source, etc), but I have never been able to really fully get into it. I have had many frustrations with PlaneShift that, despite the good things, have set me back from it time and again whenever I try to get back to it. Some of these frustrations are a result of game policies (e.g. the endurance factor when trying to travel places by running but have to stop every few minutes to "rest") but many others are a result of technical problems (e.g. my quest logs are completely gone when I uninstall and reinstall the game, rendering me completely unable to complete quests).

Sometimes I ponder as to why the game doesn't catch on more and grow in players and developers over time. It seems to be at a standstill in that regard, and I keep thinking about why that is and what can be done to improve that. It seems that new players who actually stick around a long time are rare; there are only a select few long-term committed members. When I say that the game has come to a standstill, I don't mean that I think there is something very wrong with the game, on the contrary I think you guys have done a great job so far.

It took me quite a long time to realize this, but I truly believe that, behind all of the small technical problems that plague the game consistently, there is a much bigger problem looming that is holding the entire game back from ever growing beyond what it is right now: BANDWIDTH. When I realized this, I then realized that because of free and open source nature of PlaneShift, the bandwidth problem is one that will never go away. Your server hosting was donated by somebody, and because you don't have any income to make the server or its bandwidth grow, it never will. This means that the game is stuck right now, and if you don't change anything, it will stay that way.



And now on to my point: Taking a big tip from extremely successful P2P networks like BitTorrent, the only way to get great and growing bandwidth is to decentralize. If you ever want PlaneShift to grow beyond what it is today without the aid of huge amounts of cashflow, the only way to do it is by decentralizing the game away from just the one server. In other words, every player's client has to act as both a client and a server to other clients. Also following the lead of BitTorrent, you would need to reward the players who give more upload bandwidth by giving them more download bandwidth.

I know this is a huge undertaking, as it will require a complete overhaul of the structure of the game. But once it is complete the game will take on a life of its own and grow beyond anything we've ever seen. To my knowledge this kind of project has never been done before. The closest thing I could find is this http://isotope.sourceforge.net/  but this game seems to have separate worlds for every player who offers themselves as a server. What you would need to accomplish is to somehow make everyone a server of the same world. This definitely seems to be a very tricky task, admittedly, but I truly believe it is possible.

Now don't get me wrong. I don't think a complete decentralization is really necessary, and I also don't think it's possible. That is, I think having a central server that serves some small purposes is the only way to accomplish the issue of having everyone a server for the same virtual world. So I believe the best solution is actually partial decentralization. The central server needs to stick around to make sure everything is running smoothly and to remember everything about the world (e.g. where all of the items are), and could also act as a sort of "policeman" to make sure no hackers are exploiting the world. Also, I'm sure one or more "central" servers would be needed to run all of the game's NPC's. But the fact is, the bulk of the bandwidth burden that the server currently bears needs to be relieved and given to the players.

I can think of many ways this task can be tackled, but I'm sure you guys, who have built the game, would be much better suited to confront that challenge than I. Nevertheless, here are some vague possible plans:
- Make every player a server of the entire world, with the same information about the world present on every player's memory
- Have every player be given a designated area of the world to "serve" out, and then have all of the players who move or make changes to the world in that area send information to that serving player about player movements and items, who would then serve that information to all players in the area.
- Instead of arbitrarily dividing the world and giving plots of it for players to serve out, just have players serve the areas that they currently occupy, and then possibly leave the vacant parts of the world for the central server to serve to the next person who enters it, who then becomes that area's server.
- Instead of making players the server of the area which they occupy, make them only the server of areas they don't occupy.

These are only a few possible plans, but I'm sure there are more. It seems to me the main goal of figuring out how to distribute the server is to duplicate information as little as possible, because the more duplication, the more bandwidth is required to keep the same information on all servers. This is why the first possible plan listed is by far the worst idea. If every player had the entire world's information, it would have to constantly update this information to everyone! Obviously, this would make for a very slow game.

But some duplication of information might be good though, because many clients will have very unpredictable Internet connections. So if one person serving out information about an area suddenly becomes unresponsive, there are a few other players who share that information who could be immediately redirected to. Also, duplication of information can act as a great way of checking for hacking or tampering of data by one person trying to change the world in their favor.

The reason I think it would be better to divide the world systematically as opposed to arbitrarily is because it leaves less room for error. The reason I think it would be better to make people serve parts of the world that they don't occupy is because it immediately leaves less of a possibility of easy exploitation of players' role as server to change things in their favor. One argument against this method is that doing so would make crowded areas of the world not served enough because everybody is in one place and cannot serve there. Another point which both supports and opposes the idea of serving a player's current area is that it provides for some duplication in crowded areas. Once again, the duplication can both act as a check of tampering and as a source of slow-downs.



Anyway, the bottom line is that this undertaking would indeed be very tricky, but I believe it to be completely necessary for making the world of PlaneShift grow. PlaneShift would become a great and revolutionary example of a brand new kind of MMO, breaking new ground by being the first of it's kind. In a sense, it would become an experiment in real-time distributed computing. It could also be called some kind of "P2P" MMORPG. But whatever it is called, decentralizing PlaneShift would result in much more growth of players, and that growth would actually make the game run faster, and then result in more people jumping on, and so on. Also, with the game growing in players, it will also grow in volunteers to help improve the game with bugfixes, new features, new art, and so on. Why, in a few years, I really believe PlaneShift could give World of Warcraft a run for it's money and become the most widely played MMORPG in existance!

I really believe this task is possible, and I wish I had the experience with PlaneShift's code to generate a prototype example of the possibility.

Please respond with your questions or comments. Thank you for your time.

-Jeff

ThomPhoenix

  • Testers
  • Forum Addict
  • *
  • Posts: 2678
  • A Phoenix, what'd you expect?
    • View Profile
Re: Decentralizing the Server
« Reply #1 on: August 28, 2009, 11:29:08 pm »
In a perfect world, where brilliant and fresh developers arrive each day by the dozens, perhaps...

I also don't believe PlaneShift's problem is bandwith, we could easily serve much more players with the current infrastructure. PlaneShift's problem is developers, we need more. Always more.

Quote
I really believe this task is possible, and I wish I had the experience with PlaneShift's code to generate a prototype example of the possibility.
Experience takes time, take your time, please, and take on this task when you are ready.

Quote
Why, in a few years, I really believe PlaneShift could give World of Warcraft a run for it's money and become the most widely played MMORPG in existance!
Why, you are enthusiastic :D
« Last Edit: August 28, 2009, 11:34:30 pm by ThomPhoenix »
We're not evil. We're simply amazing.

tsharky87

  • Traveller
  • *
  • Posts: 16
    • View Profile
Re: Decentralizing the Server
« Reply #2 on: August 29, 2009, 06:10:45 am »
Quote
I also don't believe PlaneShift's problem is bandwith, we could easily serve much more players with the current infrastructure. PlaneShift's problem is developers, we need more. Always more.

But this is exactly what I mean though. I agree PlaneShift needs way more developers, but I believe having a richer and growing infrastructure is exactly what will draw in more players, and in turn more developers. The list of reasons why we may not be getting more developers is long and varied, but I believe the entire list is a very indirect consequence of a stagnant server situation. The main reason why I believe that bandwidth is limiting us is because Keith Fulton said so in http://www.youtube.com/watch?v=tKSYJYV_RGs.

Thinking in a very broad and long-term sense, consider this: Can you conceive of any point in the future when the PlaneShift server will be somehow magically granted funding and more bandwidth just from pure donation? I cannot. So when I say that bandwidth is limiting PlaneShift, I don't really just mean now on the day-to-day basis in which playing is slightly slower, I'm talking about the future. The fact that our server cannot grow is why I think PlaneShift cannot grow. Perhaps our current infrastructure could manage more players. But can it do it well? And think of the fact that there were probably some times when enough players showed up so that the actual current bandwidth was the primary limiting factor. I'm sure that caused almost all of the players involved to get fed up and leave. If that situation occurred under the supervision of the infrastructure I am suggesting, many less people would have left because the game would have performed better as a result of the increase in players.

And by the way, yes I suppose I am rather enthusiastic.   :whistling:

P.S. I apologize for the length of the original post, but I believe most of it is worth reading.

verden

  • Hydlaa Notable
  • *
  • Posts: 716
    • View Profile
Re: Decentralizing the Server
« Reply #3 on: August 29, 2009, 07:16:55 am »
To do what you are talking about would require a total rewrite from the ground up of the software. It would also mean coding custom versions of many pieces of software that are simply used as components at this time. Serious developmental effort that this project simply cannot handle. It would also imply that the proprietary information that comprises the game would be mirrored onto every node. That isn't going to happen. You are talking about a completely different beast from what we have here. The best thing to do would be to study the structure of the existing project and understand why I said this.

weltall

  • Associate Developer
  • Veteran
  • *
  • Posts: 1671
    • View Profile
    • http://weltall.heliohost.org
Re: Decentralizing the Server
« Reply #4 on: August 29, 2009, 07:28:05 am »
there are also problems with a p2p based system which you can see in many commercial softwares: that's why p2p multiplayer is done only for games with a limited amount of concurrent players like max 16.
The problem is easy if someone with a high delay connection connects it's most probably going to increase the ping of everyone making the situation even worse (for example a 56k) it can be seen easily when you try some of those games for ps2 ps3 or psp which use this infrastructure, various people still use 56k with them and when you get in the same group of someone with that latency and low bandwidth everyone will get serious lag. in fps games usually only an host server or host client/gues clients infrastructure is done because of latency issues of this solution

kaerli2

  • Hydlaa Resident
  • *
  • Posts: 163
    • View Profile
Re: Decentralizing the Server
« Reply #5 on: August 30, 2009, 05:27:30 am »
However, would it be feasible to have multiple servers jointly managing a single realm/shard? (a la IRC...)  That would help with both bandwidth and latency issues...kind of killing two birds with one stone.

verden

  • Hydlaa Notable
  • *
  • Posts: 716
    • View Profile
Re: Decentralizing the Server
« Reply #6 on: August 30, 2009, 05:55:43 am »
Yes. If connection to one server went down, then it would switch to another. I noticed when EZ-PC was brought up that the NPC server appeared more reliable over there. Restarting when it crashed in a timely manner. This adaptation would be brilliant.

weltall

  • Associate Developer
  • Veteran
  • *
  • Posts: 1671
    • View Profile
    • http://weltall.heliohost.org
Re: Decentralizing the Server
« Reply #7 on: August 30, 2009, 08:05:40 am »
more server to avoid latency need also a really good infrastructure or keeping the servers in the same data center in order to reduce latency of transmissions between the server (which would make more latency for two players in different servers) if they were linked.

Yes. If connection to one server went down, then it would switch to another. I noticed when EZ-PC was brought up that the NPC server appeared more reliable over there. Restarting when it crashed in a timely manner. This adaptation would be brilliant.

because more team members have access to that machine so more can fix the troubles which require manual intervention... except if the machine is remotely unreachable