Author Topic: Current Planeshift server architecture  (Read 1154 times)

virajithj

  • Traveller
  • *
  • Posts: 17
    • View Profile
Current Planeshift server architecture
« on: October 25, 2010, 12:55:58 pm »
Hi,

I am new to Planeshift and was looking at some of the documents at http://planeshift.ezpcusa.com/pswiki/index.php?title=Engine_Document_Downloads which give a great description of the Planeshift architecture. However, I had a couple of questions which are addressed in these documents. I was hoping someone here can help me out with the following questions:

a) The docs at http://planeshift.ezpcusa.com/pswiki/index.php?title=Engine_Document_Downloads mention that Planeshift used a single server architecture. Is this still true? Is the current version of Planeshift using multiple servers which communicate to inter-operate?

b) I came to understand that Planeshift uses a modified mysql database for persistence. Does the database have to be on the same (physical) machine as the server? Is it possible to configure/make minor modifications to the code which allows the database to be hosted on a machine different from the actual game server?

I really appreciate any help I can get regarding these issues.

Thanks a lot in advance,
Virajith

weltall

  • Moderator
  • Veteran
  • *
  • Posts: 1671
    • View Profile
    • http://weltall.heliohost.org
Re: Current Planeshift server architecture
« Reply #1 on: October 25, 2010, 01:03:29 pm »
1) the server is split in the main an npcclient server. there can be more than one npcclient server. and they can be in separate machines (but they must be connected with fast connections)
2) no a standard mysql db. no it's not needed and it's how the internal private servers for development work. just edit the config file with the server ip.

Minks

  • Hydlaa Citizen
  • *
  • Posts: 443
    • View Profile
Re: Current Planeshift server architecture
« Reply #2 on: October 25, 2010, 01:04:55 pm »
Hi there, maybe this is also interesting for you. :)
http://www.youtube.com/watch?v=tKSYJYV_RGs  

virajithj

  • Traveller
  • *
  • Posts: 17
    • View Profile
Re: Current Planeshift server architecture
« Reply #3 on: October 25, 2010, 01:10:10 pm »
@weltall:
1) is there some documentation as to how I can do this? In general, is there a (detailed) documentation as to how the current architecture of Planeshift works.
2) you mean the internal private deployment of Planeshift works with the database and the server on different machines? I might have misunderstood your answer. again can you point me some documentation that deals with the config parameters of setting up a bunch of servers with databases.

Thanks a lot!

@Minks
yeah, I have seen that video. It was quite interesting and informative but it was from a couple of years ago. Thanks though!

weltall

  • Moderator
  • Veteran
  • *
  • Posts: 1671
    • View Profile
    • http://weltall.heliohost.org
Re: Current Planeshift server architecture
« Reply #4 on: October 25, 2010, 01:46:56 pm »
@weltall:
1) is there some documentation as to how I can do this? In general, is there a (detailed) documentation as to how the current architecture of Planeshift works.
2) you mean the internal private deployment of Planeshift works with the database and the server on different machines? I might have misunderstood your answer. again can you point me some documentation that deals with the config parameters of setting up a bunch of servers with databases.

Thanks a lot!

@Minks
yeah, I have seen that video. It was quite interesting and informative but it was from a couple of years ago. Thanks though!

1) not really but you need to duplicate some tables. the npcclient requires sc tables and some main server tables. in order to make npcclient manage different npc you just don't define those you don't want managed in the npc defnitions tables. to have them connect to another server you edit the psnpcclient.cfg database with password and username of an account with security level 99 iirc (npcclient level)
2)  yes right now we use that architecture (both within the same network yet, i've tried remotely using a db with a slow network (max 100KB/s) and the mysqlclient library crashed). just edit psserver.cfg there is an entry for database

virajithj

  • Traveller
  • *
  • Posts: 17
    • View Profile
Re: Current Planeshift server architecture
« Reply #5 on: October 25, 2010, 04:20:44 pm »
1) not really but you need to duplicate some tables. the npcclient requires sc tables and some main server tables. in order to make npcclient manage different npc you just don't define those you don't want managed in the npc defnitions tables. to have them connect to another server you edit the psnpcclient.cfg database with password and username of an account with security level 99 iirc (npcclient level)
2)  yes right now we use that architecture (both within the same network yet, i've tried remotely using a db with a slow network (max 100KB/s) and the mysqlclient library crashed). just edit psserver.cfg there is an entry for database

Thanks for the reply.
For 1), how much work this might take? Would it require me to hack the client?

On a related note, I was wondering how is the user-information distributed across the servers. Can a user connect to any of the game servers and play? Does the user info stay associated with just a single server or does it have to be distributed across multiple servers (before-hand or on-demand)? Does having multiple servers allow the game to scale better?


RlyDontKnow

  • Associate Developer
  • Hydlaa Citizen
  • *
  • Posts: 403
    • View Profile
Re: Current Planeshift server architecture
« Reply #6 on: October 25, 2010, 04:57:18 pm »
Thanks for the reply.
For 1), how much work this might take? Would it require me to hack the client?

On a related note, I was wondering how is the user-information distributed across the servers. Can a user connect to any of the game servers and play? Does the user info stay associated with just a single server or does it have to be distributed across multiple servers (before-hand or on-demand)? Does having multiple servers allow the game to scale better?

again for clarification: there's only exactly 1 main server (that's where all clients connect to - including the npc clients)
then there's the mysql server which may (but doesn't have to) be on the same machine as the main server
and finally there are the npc clients which connect to the main server and manage the NPCs in the world (e.g. scheduled walking along paths, reacting to users (e.g. attacking), growth of tribes and so on)

basically there simply wasn't any need for spreading the server app among multiple machines as it can handle many users fairly easily and it'd complicate things quite a bit if it was

as for configs: those are pretty straight forward, e.g. if you check npcclient.cfg you'll notice the server and database config on the bottom. just change those to your needs.

novacadian

  • Hydlaa Notable
  • *
  • Posts: 960
    • View Profile
Re: Current Planeshift server architecture
« Reply #7 on: February 02, 2012, 04:06:31 am »
Hi there, maybe this is also interesting for you. :)
http://www.youtube.com/watch?v=tKSYJYV_RGs 

This was incredibly interesting to me! It should be required viewing pre-registering to the game.  It certainly made quests bugs and syntax errors a lot easier to understand how they may come about and the difficulty in setting them right.  ;D

A very nice presentation! Thanks for the link Minks.

- Nova