This document is about: SERVER 5
SWITCH TO

5.0 BETAから5.0 RC1へのアップデートガイド

主要な変更点の概要

このガイドは、V5.0 BETAから5.0 RC1へのアップデートに関するものです。 CounterPublisher (App, Project, DLL)が非推奨となり、SDKから削除されたこと以外に、設定の変更があります。

PhotonServer.config の変更点

  • サーバ・アプリケーション・インスタンスを定義するための新しい構文の使用を推奨します。 次の代わりに:

    XML

    <Configuration>
      <LoadBalancing>
      </LoadBalancing>
    </Configuration>
    

    次を行います:

    XML

    <Configuration>
      <Instance Name="LoadBalancing">
      </Instance>
    </Configuration>
    

HTTPリスナー

WebSocketListeners(およびその他のHTTPリスナー)の構文が変更されました。

以前(v5 BETA)は:

XML

    <WebSocketListeners>
      <WebSocketListener
        IPAddress="0.0.0.0"
        Port="9090"
        DisableNagle="true"
        InactivityTimeout="10000"
        OverrideApplication="Master">
      </WebSocketListener>
      <WebSocketListener
        IPAddress="0.0.0.0"
        Port="9091"
        DisableNagle="true"
        InactivityTimeout="10000"
        OverrideApplication="Game">
      </WebSocketListener>
    </WebSocketListeners>

変更後 (v5):

XML

    <HTTPListeners>
      <HTTPListener
        Name="*:[PORT]::Master"
        IPAddress="0.0.0.0"
        Port="9090"
        DisableNagle="true"
        InactivityTimeout="10000">
        <Routing>
          <Route
            Url="/+"
            OverrideApplication="Master"
            PeerType="WebSocket"
            Counters="false" />
          <Route Url="/photon/m" Ping="true" Counters="false"/>
        </Routing>
      </HTTPListener>
      <HTTPListener
        Name="*:[PORT]::Game"
        IPAddress="0.0.0.0"
        Port="9091"
        DisableNagle="true"
        InactivityTimeout="10000"
        AppDataInactivityTimeout="15000">
        <Routing>
          <Route
            Url="/+"
            OverrideApplication="Game"
            PingEvery="2000"
            PeerType="WebSocket"
            Counters="false" />
          <Route Url="/photon/g" Ping="true" Counters="false"/>
        </Routing>
      </HTTPListener>
      <HTTPListener
        Name="*:[PORT]::NameServer"
        IPAddress="0.0.0.0"
        Port="9093"
        DisableNagle="true"
        InactivityTimeout="10000"
        AppDataInactivityTimeout="15000">
        <Routing>
          <Route
            Url="/+"
            OverrideApplication="NameServer"
            PeerType="WebSocket"
            Counters="false" />
          <Route Url="/photon/n" Ping="true" Counters="false"/>
        </Routing>
      </HTTPListener>
    </HTTPListeners>

ロードバランシング設定の変更

ファイル名の変更

まず、最も注目すべき点は、各サーバーアプリケーションが独自の設定ファイルを持ち、そのファイル名が以下の形式になったことです。"{application_name}.xml.config"です。 これは特にMasterおよびGameServerアプリケーションにとって重要で、これまではデフォルトで "Photon.LoadBalancing.dll.config "という同じファイル名と内容を共有していました。 このファイルの内容は2つのファイルに分割されています。

  • "deploy\LoadBalancing\Master\bin\Master.xml.config"
  • "deploy\LoadBalancing\GameServer\bin\GameServer.xml.config" 設定ファイルの一覧は以下のとおりです。

マスター

以前(v5 BETA):

"deploy˶LoadBalancing˶LoadBalancing.dll.config"

変更後(v5):

"deploy\LoadBalancing\MasterMaster.xml.config"

GameServer

以前(v5 BETA):

"deploy\LoadBalancing\GameServer\Photon.LoadBalancing.dll.config"

変更後(v5):

"deploy\LoadBalancing\GameServer\bin\GameServer.xml.config"

NameServer

以前(v5 BETA):

"deploy\NameServer\bin\Photon.NameServer.dll.config"

変更後(v5):

"deploy\NameServer\bin\NameServer.xml.config"

構造の変更

2つ目の重要な変更点は、設定ファイルの構造が変更されたことです。

従来のファイル構造:

XML

<?xml version="1.0"?>
<configuration>
  <configSections>
    <!-- sections defined here -->
  </configSections>
  <applicationSettings>
     <!-- app settings -->
  </applicationSettings>
  <!-- other settings -->
  <startup>
  </startup>
</configuration>

新しいファイル構造:

XML

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <Photon>
    <!-- all settings here -->
  </Photon>
</configuration>

ルートの <Photon> 要素に注目してください。

古い設定セクション(XML要素)のいくつかは、もう必要ありません。

  • <configSections>
  • <applicationSettings>
  • <startup>
  • <runtime>
  • <CounterPublisher>

一部の要素は名称が変更されています。

  • <Photon.LoadBalancing.Common.CommonSettings><LoadBalacing>になりました
  • <Photon.Common.Authentication.Settings><Authentication>になりました
  • <Photon.LoadBalancing.MasterServer.MasterServerSettings><Master>になりました
  • <Photon.LoadBalancing.GameServer.GameServerSettings><GameServer>になりました
  • <Photon.NameServer.Settings><NameServer>になりました
  • <WebRpcSettings><WebRpc>になりました
  • <AuthSettings><CustomAuth>になりました

また、各設定ノードは、従来の一般的な形式ではなく、設定にマッチしたカスタムの名前を持つようになりました。 これは <WebRPC> (以前の <WebRpcSettings>) と <CustomAuth> (以前の <AuthSettings) を除くすべての要素に適用され、変更はありません。

旧設定ノードのフォーマット:

XML

<setting name="SettingName" serializeAs="String">
    <value>SettingValue</value>
</setting>

新設定ノードのフォーマット:

XML

<SettingName>SettingValue</SettingName>

ファイルごとの変更点をより詳しくご紹介します:

マスター

古いファイル構造:

XML

<?xml version="1.0"?>
<configuration>
  <configSections>
    <!-- sections defined here -->
  </configSections>
  <applicationSettings>
    <Photon.LoadBalancing.Common.CommonSettings>
    </Photon.LoadBalancing.Common.CommonSettings>
    <Photon.Common.Authentication.Settings>
    </Photon.Common.Authentication.Settings>
    <Photon.LoadBalancing.MasterServer.MasterServerSettings>
    </Photon.LoadBalancing.MasterServer.MasterServerSettings>
  </applicationSettings>
  <Photon>
    <CounterPublisher>
    </CounterPublisher>
  </Photon>
  <WebRpcSettings>
  </WebRpcSettings>
  <startup>
  </startup>
</configuration>

新しいファイル構造:

XML

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <Photon>
    <LoadBalancing>
    </LoadBalancing>
    <Authentication>
    </Authentication>
    <Master>
    </Master>
    <WebRpc>
    </WebRpc>
  </Photon>
</configuration>

GameServer

古いファイル構造:

XML

<?xml version="1.0"?>
<configuration>
  <configSections>
    <!-- sections defined here -->
  </configSections>
  <applicationSettings>
    <Photon.LoadBalancing.Common.CommonSettings>
    </Photon.LoadBalancing.Common.CommonSettings>
    <Photon.Common.Authentication.Settings>
    </Photon.Common.Authentication.Settings>
    <Photon.LoadBalancing.MasterServer.GameServerSettings>
    </Photon.LoadBalancing.MasterServer.GameServerSettings>
  </applicationSettings>
  <Photon>
    <CounterPublisher>
    </CounterPublisher>
  </Photon>
  <WebRpcSettings>
  </WebRpcSettings>
  <startup>
  </startup>
</configuration>

新しいファイル構造:

XML

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <Photon>
    <LoadBalancing>
    </LoadBalancing>
    <Authentication>
    </Authentication>
    <GameServer>
    </GameServer>
    <WebRpc>
    </WebRpc>
  </Photon>
</configuration>

NameServer

同じ属性/プロパティの値を維持したまま、<AuthSettings>ノードを<CustomAuth>に変更(Rename / Replace)します。

古いファイル構造:

XML

<?xml version="1.0"?>
<configuration>
  <configSections>
    <!-- sections defined here -->
  </configSections>
  <applicationSettings>
    <Photon.NameServer.Settings>
    </Photon.NameServer.Settings>
    <Photon.Common.Authentication.Settings>
    </Photon.Common.Authentication.Settings>
  </applicationSettings>
  <AuthSettings>
  </AuthSettings>
  <startup>
  </startup>
  <runtime>
  </runtime>
</configuration>

新しいファイル構造:

XML

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <Photon>
    <NameServer>
    </NameServer>
    <Authentication>
    </Authentication>
    <CustomAuth>
    </CustomAuth>
  </Photon>
</configuration>

プラグイン

以下のように、<Configuration></Configuration>を囲むラッパー要素を追加します。

XML

<Configuration>
  <PluginSettings Enabled="True">
    <Plugins>
      <!-- custom plugin settings here -->
    </Plugins>
  </PluginSettings>
</Configuration>

ロードバランサーとワークロードの設定変更

ワークロード構成の変更

古い構成:

XML

<?xml version="1.0" encoding="utf-8" ?>
<FeedbackControlSystem>
  <FeedbackControllers>
      <!-- one or more controllers setup -->
  </FeedbackControllers>
</FeedbackControlSystem>

新しい構成(ラッパー <Configuration></Configuration> 要素/ノード追加):

XML

<?xml version="1.0" encoding="utf-8" ?>
<Configuration>
  <FeedbackControlSystem>
    <FeedbackControllers>
      <!-- one or more controllers setup -->
    </FeedbackControllers>
  </FeedbackControlSystem>
</Configuration>

ロードバランサーの設定変更

LoadBalancer の設定ファイルは "deploy˶LoadBalancer.config" です。

XML

<?xml version="1.0" encoding="utf-8" ?>
  <LoadBalancer ReserveRatio="{ReserveRatio}" ValueUp="{ValueUp}">
    <LoadBalancerWeights>
      <Level name="0" Level="Level0" Value="{Value0}" />
      <Level name="1" Level="Level1" Value="{Value1}"/>
      <Level name="2" Level="Level2" Value="{Value2}"/>
      <Level name="3" Level="Level3" Value="{Value3}"/>
      <Level name="4" Level="Level4" Value="{Value4}"/>
      <Level name="5" Level="Level5" Value="{Value5}"/>
      <Level name="6" Level="Level6" Value="{Value6}"/>
      <Level name="7" Level="Level7" Value="{Value7}"/>
      <Level name="8" Level="Level8" Value="{Value8}"/>
      <Level name="9" Level="Level9" Value="{Value9}"/>
    </LoadBalancerWeights>
  </LoadBalancer>

新しい構成 (ラッパー <Configuration></Configuration> 要素/ノード追加):

XML

<?xml version="1.0" encoding="utf-8" ?>
<Configuration>
  <LoadBalancer ReserveRatio="{ReserveRatio}" ValueUp="{ValueUp}">
    <LoadBalancerWeights>
      <Level name="0" Level="Level0" Value="{Value0}" />
      <Level name="1" Level="Level1" Value="{Value1}"/>
      <Level name="2" Level="Level2" Value="{Value2}"/>
      <Level name="3" Level="Level3" Value="{Value3}"/>
      <Level name="4" Level="Level4" Value="{Value4}"/>
      <Level name="5" Level="Level5" Value="{Value5}"/>
      <Level name="6" Level="Level6" Value="{Value6}"/>
      <Level name="7" Level="Level7" Value="{Value7}"/>
      <Level name="8" Level="Level8" Value="{Value8}"/>
      <Level name="9" Level="Level9" Value="{Value9}"/>
    </LoadBalancerWeights>
  </LoadBalancer>
</Configuration>
Back to top