Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

Client-Server architecture and Front-end server with LLAPI

Discussion in 'Multiplayer' started by Kichang-Kim, Jun 5, 2018.

  1. Kichang-Kim

    Kichang-Kim

    Joined:
    Oct 19, 2010
    Posts:
    979
    Hi, I have some questions about Unity oriented Client-Server architecture.

    I currently working on session-based multiplayer game with 10~ players.

    Here is my server structure plan:

    [CLIENT] <----> [FRONTEND SERVER] <---> [GAME SERVER]-(GAME INSTANCE)

    Game server has multiple game instance (process) in memory, and Frontend server has connections with multiple game servers. Only the frontend server has public ip for communicating with user clients. Also client and game instance is implemented by Unity engine.

    The question is how to implement frontend server, especially for Unity LLAPI connection?

    If I use my own protocol, it is easy by adding small header (like instance id) to packet and parsing it in frontend server, but LLAPI does not support any modification of protocol level.

    Any ideas or adivces is welcome. Thanks.
     
  2. aabramychev

    aabramychev

    Unity Technologies

    Joined:
    Jul 17, 2012
    Posts:
    574
    you need some sort of relay server :) Hence relay server binaries is not public. The easiest way to do this, just grab server.dll library and write small proxy by using this lib. When your connection received front end server, server will initialise connection to game server. So inside front-end server you will have 1:1 mapping between external and internal connection.
     
  3. Kichang-Kim

    Kichang-Kim

    Joined:
    Oct 19, 2010
    Posts:
    979
  4. aabramychev

    aabramychev

    Unity Technologies

    Joined:
    Jul 17, 2012
    Posts:
    574
    hmm, it should be license information inside the package :) Shortly, no it is not officially supported by unity. And no it is not hack, it is the same code as internal release but packing in separate dll.

    Hmm, what about this option: https://www.nginx.com/blog/announcing-udp-load-balancing/ ?
     
  5. Kichang-Kim

    Kichang-Kim

    Joined:
    Oct 19, 2010
    Posts:
    979
    Thanks for reply. I'll try server.dll as first option because I need application-level relaying.
     
  6. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
  7. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,168
    We have a working standalone relay, the only thing we are working on is a website for it. It's not easy when software engineers are trying to create a website. If anyone needs a standalone relay urgently, hit me up in PM and I will probably give you a early version. It's targeting .NET core and runs cross platform.