Skip to content
This repository has been archived by the owner on Nov 27, 2020. It is now read-only.

Authentication

FreeYourSoul edited this page Apr 5, 2018 · 43 revisions

Authentication Documentation

Introduction

The Authentication channel of the Gateway is used by two sort of client,

  • Gamers : client that play the game and interact with the server in order to try to have fun

  • Servers : Internals servers (Database server + World servers)

Servers are registering themselves to the gateway, which acknowledge them (and notify other server of a new connected server) in order to forward them to the gamers.

The gateway ping the server on which it wants to forward a client, so if a node of a cluster is down, it remove it from its server register.

A Gamer authenticate on the Gateway, which select a Game server on which the gamer will connect (selection based on the spawning position of the player). It forward to him the IP /port address of the game server, and a token that will be used on the Game Server as authentication token.


Gateway > Server Selection

For WorldServers : Each server that connect on the Gateway give a positionId that will be used to know where the player is in the mmo universe. (Making multiple gateway sharing some world server would be possible)

An example below explain how a universe of 6000x12000 tiles could be managed by 9 differents servers connected to the Gateway.
In order to limit the lag during a transition, the instance of the player moving from one server to another should stay alive for some time (in order to not have to repopulate the data)

For ArenaServer (FightServer) : This server works as a classic cluster, the gateway take the role of load balancer and select the less jammed one.

Authentication

Authentication can also be called registering in case of a server connecting to the Gateway

Gamer authentication

PlantUML link

At Authentication, the DataServer generate a token that will be used for the communication.

Server authentication

PlantUML Link

Different Servers (game server, fight server..) are connected to the Gateway, the gateway forwards gamer's messages to them afterwards.
Servers send information to the gateway, in a specific channel (called the forward channel) to inform player.