Load Balancer with multiple assemblies
Options
The PhotonServer.config supports an assembly property for each LoadBalancing Application, however, the example config and every other config I have seen contains both the MasterApplication and GameApplication in the same assembly.
I am wondering if this is a technical constraint. I am trying to run a Load Balancing application with separate assemblies for the master and game. There are probably not great advantages in doing this but it saves some code being distributed to both the master and game servers that they do not care about.
When I try to run a setup like this the Master Server seems to start correctly but the Game Server crashes. Bizarrely the error received is:
It almost appears as if the MasterServer class (extends from MasterApplication) is being invoked on the Game Server, but it does not exist in that assembly, by design.
Am I making some other error in the configuration or assemblies? Or is this an undocumented constraint?
I am wondering if this is a technical constraint. I am trying to run a Load Balancing application with separate assemblies for the master and game. There are probably not great advantages in doing this but it saves some code being distributed to both the master and game servers that they do not care about.
When I try to run a setup like this the Master Server seems to start correctly but the Game Server crashes. Bizarrely the error received is:
6112: 16:20:59.804 - Application: "DemoMaster" started in app domain: 2 6112: 16:20:59.804 - About to load application: DemoGame from DemoGameServer 6112: 16:20:59.804 - Auto restart is enabled for application, existing connections will be terminated during restart 6112: 16:20:59.804 - Application will restart 1000ms after the last change detected 6112: 16:20:59.804 - Application will restart if files matching the following are changed: "dll;config" 6112: 16:20:59.804 - Application will NOT restart if files matching the following are changed: "log4net.config" 6112: 16:20:59.882 - Taking reference on default app domain 6112: 16:20:59.960 - Application: "DemoGame" started in app domain: 3 6112: 16:20:59.960 - CService::OnException() - Exception: CCLRApplicationCollection::SetDefaultApplication() - Unknown application: "MasterServer" 6112: 16:20:59.960 - Server shutting down...
It almost appears as if the MasterServer class (extends from MasterApplication) is being invoked on the Game Server, but it does not exist in that assembly, by design.
<Applications Default="MasterServer"> <Application Name="DemoMaster" BaseDirectory="Demo\MasterServer" Assembly="DemoMasterServer" Type="DemoServer.MasterServer" ForceAutoRestart="true" WatchFiles="dll;config" ExcludeFiles="log4net.config" > </Application> <Application Name="DemoGame" BaseDirectory="Demo\GameServer" Assembly="DemoGameServer" Type="DemoServer.GameServer" ForceAutoRestart="true" WatchFiles="dll;config" ExcludeFiles="log4net.config"> </Application> </Applications>
Am I making some other error in the configuration or assemblies? Or is this an undocumented constraint?
0
Comments
-
Found the problem; all OverrideApplication properties and Default attributes must have matching names to the Name property in the application definition.0