Jump to content

  • Log In with Google      Sign In   
  • Create Account

Calling all IT Pros from Canada and Australia.. we need your help! Support our site by taking a quick sponsored surveyand win a chance at a $50 Amazon gift card. Click here to get started!


cross-realm function for a existing server architecture


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 bearaway   Members   -  Reputation: 100

Like
0Likes
Like

Posted 01 April 2012 - 09:45 PM

Hello,evevrybody.
We have a mmorpg that developed for more than 4 years named "weapons of the god". in the last few month, we keep developping the version 2.0 of this game, and we want to add WoW like cross-realm functions to it.i have some thought that i want to shared with you and get your suggestions.
first, i want to talk about the existing server architecture. for every server group, threre is(are):
1. one ws (world server): a intenal server for other servers in the group to connect, provide world-scope game logics(guild, team, world-chat...)
2.several cs(cell server):each cs servers a set of map instances. most of the game logic run on cs, like skill,buff,quest,ai...
3.one dp(db proxy):every other server send dp database request to load and save object data.
4.one db: a mysql server
5.one ls(login server):provide login checks.
6.two fep(front end proxy)s:accept client connections, provide some secure to these connectins.one fep connects to ws, CSs connect to each fep, so feps transfer client packets to desired server(ws,cs,or ls).it is ws`s job to determine which cs fep should transfer a client session`s packets to.

one big server group contains several such server groups. server groups in the same big group share a common account database, and each server group has a diffrent character database.

our desired cross-realm function means:
1.players in the same big group(possibly in diffrent server groups) can be transfered to the same cross-realm server group.
2.they do PVP there, uses items and skills to make some achievements(get new items,buffs,titles...)
3.players are thransfered back to their original server group. and all the achievements they got in the cross-ream server group are still valid.

i have to plans to implement this, every plan use a new gait server.
there is only only one gait server in a big group, it accepts connections from WSs in every server group(including the cross-realm group). when each ws-gait connection is established, ws send some information to gait, including:
1.db connection information
2.server group id

then gait connect every db in server groups, its major fuction is to transfer data for players between character databases. after player data are thransfered:
plan A:client closes connection to the original group`s fep and then re-establish connection to the cross-realm group`s fep.this plan maybe is easy to implement but we must have a strong solution to ensure that connections to the cross-realm are legal. after data transfer, we can generate some visa like object, including a serial id, hash it to db and give the client the unhashed serial id. another problem is the cross-realm process is not seamless. re-establish connection is maybe not client friendly.

plan B:there is no fep in the cross-realm group, every cs in it connect other group`s feps.and every other group`s fep connect to the cross-realm group`s WS. when datatransfer is finished, the original client-fep connection is still alive, just mark it a cross-ream flag.
problem with this plan is the cs in the cross-ream group now must connect a lot of feps, bottleneck.

now you guys have experience in cross-relm implement? i like your suggestions, thanks a lot.

Sponsor:

#2 ApochPiQ   Moderators   -  Reputation: 18102

Like
0Likes
Like

Posted 02 April 2012 - 02:05 AM

As far as I know the usual way to implement this is to physically move the player's records from one database into another. There may be alternatives but they are increasingly complicated for decreasing benefit.

Are you interested in "permanent transfers" between servers, or more of a "visiting/guesting" feature? Guesting is a totally different matter than permanent transfers. I must confess I found it really hard to follow your description with all the abbreviations, sorry...

#3 hplus0603   Moderators   -  Reputation: 7839

Like
0Likes
Like

Posted 02 April 2012 - 12:16 PM

What I would do would be to augment the "player id" concept, and have it contain "home world" as part of the ID.
Then you can have a "id to database server" resolver which runs a transaction for a particular user ID on the right database.
If visiting is "rare" then you can have something like a single proxy server where "non-local" requests are sent to, and that proxy connects to all databases.
If visiting is common, then connect to each database from each server. At some point, that will run out of database connections, but I doubt you're at that scale :-)

Also: once you have the id -> database mapping, you can easily shard/partition by ID for horizontal scalability. However, transactions that include multiple players become a lot harder; you have to put all the items into escrow first, and then use worker items in a reliable work queue to complete the transaction. Unless you pay big bucks for a cross-database transaction monitor system, like DB/2 Enterprise.
enum Bool { True, False, FileNotFound };

#4 bearaway   Members   -  Reputation: 100

Like
0Likes
Like

Posted 03 April 2012 - 03:36 AM

As far as I know the usual way to implement this is to physically move the player's records from one database into another. There may be alternatives but they are increasingly complicated for decreasing benefit.

Are you interested in "permanent transfers" between servers, or more of a "visiting/guesting" feature? Guesting is a totally different matter than permanent transfers. I must confess I found it really hard to follow your description with all the abbreviations, sorry...


i am interested in a "visiting/guesting" feature. players from all common server groups can visit one cross-realm group (with some total number restrictions), this is our current requirement.

let "home world" ID be part of the player ID is a greate concept, l like it.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS