Photon server - is it right for my purposes?

Options
Hey folks, now it must have been a year since I asked some tosh question about integrating the Unreal engine with photon server etc. Anyway, after working heavily with a couple of game engines (notably Unity and the Unreal engine) I finally am starting a rather ambitious project along with a small team (which I believe is achievable).

So essentially I just have a couple of questions. I have done a fair share of research into Photon however havnt yet looked at everything in depth.

Would there be much benefit in me using Photon server for a login/authentication server over writing one from scratch?

How exactly does Photon handle and maintain player 'sessions'?

Thanks folks :)

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @wapted,

    Thank you for choosing Photon!

    For authentication and user management we recommend a web based service that communicates with Photon Cloud/Servers. We call this Custom Authentication.
  • wapted
    wapted
    edited February 2017
    Options
    Ok... so for example, instead of the 'Lobby' server or whatever you want to call it handling the login/authentication, you recommnd a seperate server for that?

    So it may be set out as in the image?
    https://dropbox.com/s/f14aw0947jge5mm/Capture.JPG?dl=0
  • chvetsov
    Options
    hi, wapted

    if you are going to use photon to write completely your own servers, then this scheme is fine. if you are going to use LoadBalancing project as starting point then it has slightly different structure, which you will not be able to change without deep modifications.

    Currently Loadbalancing project has two servers: Master and GameServer.

    In your claster can be only one master. it is responsible for authentication and match making. as @JohnTube said authentication should be performed by external service. Facebook for instance.
    when client passed authentication it may select game to play. Next step is connection to selected GameServer and playing.

    After passing authentication player gets encrypted token. this token contains some information related to session. for instance, sessionId, creation time and so one. this information is used by game server and by master server.

    i'm not sure about terms but we are working on splitting auth server from master server, so you will have 3 servers: so called NameServer, MasterServer and GameServer. NameServer will be responsible for authentication and some other features. Our public cloud already uses this structure.

    best,
    ilya
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited February 2017
    Options
    Hi @wapted,

    I just want to add something to what @chvetsov said.
    The architecture you are proposing is correct but you should take into consideration that in Photon, lobby and matchmaking server is the same thing which is what we call Master Server. Also Photon servers can be confifured to communicate with 2 web services (that can be different or the same):
    - one for authentication purposes
    - one for custom HTTP calls (WebRPCs) and in game (Game Server) webhooks.
  • wapted
    Options
    Ah ok, interesting. Over the next few weeks I will be doing some prototyping, but I suspect I will be using photon to completely write my own servers as to enable scalability I need the ability for multiple 'lobby servers' while still having a single match making server.

    Anyway, thanks folks, you have given me some things to think about. :smiley:

    (I'll be back)
  • @wapted By 'lobby server' do you mean Game Servers? Photon is already designed to do that. The Master Server manages and chooses which Game Server to put the players into.
  • wapted
    Options
    @johnny_tictoc Ok. So on the client side, the player once logged in can either be in the 'lobby area' which allows them to buy the in game items, research new items, select the 'thing' to play etc OR in a match(Simplified it all a bit).

    When the player is in the lobby, they can click 'Play' (The name of the button is irrelevant). When they click play there is server to server communication between a lobby server (the one the player is connected to) and the match making server, once a match is formed, all players in that match are connected to a 'game server'.

    The exact structure etc is still being finalised. However, thats the idea I have for the prototype.
  • chvetsov
    Options
    Photon supports WebRpc
    this means that you may send special operation to Master/GameServer it will be converted to http request to your server and response of your server will be converted to photon operation response.

    your lobby server can be web server behind photon, which is quite convinient and scalable
  • petergpls
    Options
    The lobby server (web server behind photon) - is this server connected to the master server and then to client such that communication is client<->master server<->web server (lobby)?

    If all transaction s are still going through MasterServer then the only real benefit (could be large) it would appear to get from this configuration is that some processing will be done on the backend web server but all resultant outcomes and request etc. still go through master server to client?

    Is the above scenario the recommended approach as I am currently using this scenario?

    Thanks could you answer this please?
  • chvetsov
    Options
    >The lobby server (web server behind photon) - is this server connected to the master server and then to client such that communication is client<->master server<->web server (lobby)?

    in case if you are using WebRPC , then there is no connection constant connection, you just perfrom Http requests and get http responses back

    the main benefit is uniform communication. there is no need for you to built in http client into your code and handle all http specifiec code.

    >Is the above scenario the recommended approach as I am currently using this scenario?
    it is difficult to recommend something when we do not know details of your project. All what i may say, that yes, this approach may help to achive your goals

    best,
    ilya