This document is about: SERVER 5
SWITCH TO

このページは編集中です。更新が保留になっている可能性があります。

Photon 5.0 Final

このページでは、Photon Server SDKバージョンv5.0 Finalの変更点をまとめています。 以前のv5 SDKをお使いのお客様は、このページを参考にしてください。

Photon 5の機能については、what's newページをご覧ください。

v5.0 Final 変更ログ

LoadBalancing

FIXED

  • PSCS-4360: fix getting even 226 on master and some unknown answer on GS even without authentication.

    • subscribing to app stats after authentication.
    • do not send init response object from gs any more.
  • PSCS-4453: Address performance issue on MS during big amount of users.

    • tracking amount of join game operations.
    • count how many tasks are in lobby's fiber from client and total.
    • moving out of lobby fiber sending and encryption.
  • PSCS-4464: Peer Leak on Master because of race condition during handling subscription to lobby.

    • fix for race codition that led to lobby subscription object being not cleaned up.
  • Do not return UserId from Master in case of Token authentication. It is already in token and should be known by client either from NS or from previous non token auth on master.

NEW

  • PSCS-4227: add Environment and command line configuration readers.
    • expanding of environment variables moved to ApplicationBase and we use it self hosted version of GS.
    • expanding of environment variables for Master and Nameserver.
    • removed expanding of env variables for PublicHostName we do this once during application settings loading.
  • PSCS-4263: Activate PeerCount controller.
    • WorkloadController - reads Photon Socket Server/Peers counter to feed PeerCount controller.
    • added setting MaxCcu that if != 0 turns on PeerCount controller, if == 0 than removes it from list.
  • PSCS-4343: Add InboundController setup to MasterServer.
    • setting up InboundController for master application.
  • PSCS-4409: Add lobby properties count and size limits.
    • limit settings for EventCache and Properties are moved to hive where we use them.
    • limiting ActorProperties and GameProperties parameters for Create- and Join- Game requests using InboundCotroller so that such requests will be stopped earlier.
    • added LobbyPropertiesValidator - object that performs validation of lobby properties size and count.
    • added implementations for IHiveLogContext for Hive and LoadBalancing projects.

CHANGED

  • PSCS-4222: Split game server connections shutdown on master between OnStopRequested and TearDown.

    • now master server finishes server connections shutdown before returning from TearDown method.
    • we start connection shutdown in OnStopRequested to speedup server shutdown process.
    • game server does not wait for leave response and wait for disconnect instead and does this in OnStopRequested.
    • Removed usage of BeginDisconnect method.
  • PSCS-4443: Replace usage of OperationRequest by Operation on master.

    • usage of descendants of Operation class to reduce code duplication in AppLobby when we create Operation objects based on OperationRequest once again.
  • Newtonsoft.JSON version updated to v13.0.1.

Hive

FIXED

  • PSCS-3859: Fix unexpected Game with 0 Actors still in cache messages in log.
    • ignoring CheckGame call if game was just created.
    • fixed race condition that leads to confusing log messages.
    • usage of Utc times for labels.
  • PSCS-4142: find reason why some clients can not work with new GS.
    • fixed check for DisconnectLogger. we log as Info and should check info.
  • PSCS-4345: Fix abusing AuthEvent using RaiseEvent.
    • AuthEvent moved to Hive/PhotonHive/Operations/EventCode.cs. it is used only there.
    • LastPhotonEvent is 220 now.

NEW

  • PSCS-4400: Add possibility to global ban users before they join games.

    • Added possibility for global ban during CreateGame.
  • PSCS-4441: Add check that SliceIndex is set when it is required because of cache operations.

    • added check that invalidates RaiseEvent operation during RaiseEventRequest construction.
    • added checking of ReceiverGroup to validation of RaiseEventRequest.
    • fixed validation for SliceIndex value.
    • fixed validation in general because it was skiped if internalWebFlags is not set.
  • added game name and stack trace to better see why we got 'Usage of SetProperties is prohibited...' message.

CHANGED

  • PSCS-4279: Improve error message in case of PluginManager initialization failure.
    • improved diagnostic message that we send to client in case if PluginManaged failed to initialize.
  • PSCS-4385: Fail early check for empty strings in ExpectedUsers array.
    • optimized usage of AddUsers array param in JoinGameRequest.
  • PSCS-4386: Update types of well known properties in ExpectedValues container.
    • now we update well-known properties in ExpectedValues like we do this for Properties.
  • PSCS-4409: Add lobby properties count and size limits.
    • limit settings for EventCache and Properties are moved to hive where we use them.
    • limits for SetProperties case are checked only before call to plugin.
    • updated implementation for IPluginHost.CustomGameProperties property.
    • another error code returning and disconnect in case of lobby limit violations.
    • collecting game stats on GS and reporting them to master.
    • publishing LobbyPropertiesCount and LobbyPropertiesSize to counter system.

Hive Plugins

NEW

  • PSCS-4169: Add missing Plugins API LeaveReason from ErrorCode values.
    • new LeaveReasons were added.
    • we got rid of ManagedDisconnect in case of different disconnect cases and pass disconnect error code to leave reason for plugin.

Photon Managed Core

FIXED

  • PSCS-2877: Add trace capability.
    • we suppress the native call to GetTraceStatus() since its not implanted and triggers a com exception.
  • PSCS-3977: fix the server limits in configs.
    • error logging in case of limits violations was replaced by warns.
  • PSCS-4211: Discarded reliable messages.
    • logging in OnDisconnect updated to log lastErrorCode.
    • setting LastErrorCode not only in Disconnect call but also during SendDisconnectMessage and ScheduleDisconnect.
  • PSCS-4224: Fix calculation of xml config path for managed applications.
    • Assembly.CodeBase replaced by Assebly.Location because CodeBase property will be not supported anymore and also it returns path without 'file://'.
  • PSCS-4382: fix (de)seriralization of custom type arrays on server.
    • we fixed (de)serializing of raw custom type arays so that it now understands client and client understands server.
    • we provided backward compatibility bug with serializing of custom type array.
    • added new security checks and new tests to cover cases related to reading array of custom types arrays and arrays of plain type arrays.
    • added abbility to see that we deserialize stuff for s2s connection.
  • PSCS-4435: Fix exception during parsing InitV2 protocol.
    • fixed exception in case if InitV2 contains wrong protocol id. added tests for this and similar cases.
  • PSCS-4438: Understand and fix memory leak that happens on different Game Servers.
  • PSCS-4448: null ref exception during deserialization if type code is 0xFF.
    • fixed null ref during usage of last element in deserialization delegates array.

NEW

  • PSCS-3043: Add support for disconnect message.
    • added disconect message support for TcpClient.
  • PSCS-4230: Support proxy TLS Termination.
    • added settings section for TlsProxyTermination.
    • added log guard to log about tls proxy termination check failures.
  • PSCS-4282: add to PeerBase methods SetupLogThreadContext/ClearLogThreadContext.
    • call to SetupLogThreadContext/ClearLogThreadContext for PeerBase in case if ManagedPeer logs warning.
  • PSCS-4354: add log context to PeerBase.
    • IManagedPeerBridge to set inboundController and log context from PeerBase to ManagedPeer.
    • ILogContext and DefaultLogContext - interface and its default implementation.
    • ManagedPeerBase class extracted to be used in WebSocketManagedPeer.
    • more code unified between ManagedPeer and WebSocketManagedPeer.

CHANGED

  • PSCS-3933: OnDisconnect's disconnect reason type should be replaced by int and we have to pass error codes through it.
    • TimeIntervalCounterLF replaced by RateCounter.
    • calculating max message size even if size is less than limit we set.
  • PSCS-4359: Unify http headers parsing between Protocol and ManagedRESTApiPeer.
    • usage of one method to parse http headers.
    • RestRequest usage of WebHttpCollection for http headers instead of Dictionary.
  • PSCS-4369: Split OnMessage and OnRawMessage handlers.
    • now in case of raw message we call PeerBase.OnRawMessage instead OnMessage in all the cases. tests are updated.
  • PSCS-4421: WebSocket Connection Loss Recovery.
    • added more usage of Disconnect logger to see when and why we disconnect peer.
    • more clear message when plugin removes client.
    • ValueToString - providing info for native log.
    • logging of disconnects from ManagedPeerBase.
  • PSCS-4434: Move different LogGuards to corresponding Log Contexts.
    • PeerBase log guards are moved to IPeerBaseLogContext.
    • ILogContext merged with IPeerBaseLogContext.

NameServer

NEW

  • PSCS-4231: CustomHttpHeaders with custom authentication.
  • PSCS-4233: Add support for Env variables in nameserver.json config.
  • Added RejectIfUnavailable and ForwardAsJSON to NameServer.xml.config (as reference).
  • PSCS-4368: Auth provider - Facebook Gaming.
    • new auth provider "Facebook Gaming" (same API as FB auth but different endpoint).

CHANGED

  • Unified AuthProviders for SDK. All supported providers use CustomAttributes.
  • Newtonsoft.JSON version updated to v13.0.1.

REMOVED

  • Photon.NameServer.Settings.AuthTimeout (using Photon.Common.Settings.Default.AuthTimeout instead).

Photon Native Core

FIXED

  • PSCS-2980: Framework updates.
    • Potential bug fix in framework code for missed buffer chain write on stream sockets.
  • PSCS-4207: Connect breaks when setting RateLimitKBSec='256'.
    • setting RateLimitKBSec="256" now works as expected. Note: default changed from 125KB/s to 256KB/s.
    • Adjust rate limit to make it easier to configure with higher rates.
  • PSCS-4211: Discarded reliable messages.
    • Added ENet rate limit/window limit debug.
    • Return async result if possible to allow sync sends to return the correct result immediately.
    • Don't allow sync success to cause async fail to be skipped.
    • Turn 'always on' debug into 'trace and verbose'.
    • Clear unreported async send failure result before we report "flow control all ok" otherwise next send will return buffer full...
  • PSCS-4244: HTTP - Bug in request parser (header length limit) results in infinite loop (100% CPU for one core).
  • PSCS-4357: Exception: CRandomByteProvider::AcquireCryptographicProvider() - Invalid provider type specified.
  • PSCS-4372: Investigate - ENet - UNEXPECTED - m_state = 2 and nothing to retransmit!.
  • PSCS-4374: HTTP - race condition between use of active request and inactivity timeout.
  • PSCS-4376: ENet - host - disconnect all peers fails due to AO 'don't execute here' changes.
    • Fix DisconnectAllPeers() and ResetAllPeers() to work with 'don't do peer operations on the calling thread' change...
  • PSCS-4418: Unexpected Ratelimit on Connect of Websocket
    • Delay switching from TCP level read timeout to HTTP level request based keep-alive until after SSL handshake completes.
    • Adjust rate limit debug.
  • PSCS-4445: Investigate - unexpected TLS connection drop 'after client hello'.
    • Fix limiter setup and 'initial' timestamp and prevent slow updates from pushing the available value out of range.
    • Reset flow control and write data queue members before pooling socket. Leaving the m_flowControlActive flag set means that a socket allocated from the pool will never allow a write to occur.
    • DumpState if async connector does not complete SSL handshake.
    • Disable 'incomplete ssl connection' socket state dump unless it's explicitly enabled with a #define.

NEW

  • PSCS-4037: Add 'fast path' sends for WS and other transports.
    • default of ENetS2S SendOnManagedThread to false, meaning we now default to "Fast Path enabled".
    • default of ENetListener SendOnManagedThread to false, meaning we now default to "Fast Path enabled".
  • PSCS-4285: Use new thread naming API.
    • Use SetThreadDescription if it's available on the platform.
  • PSCS-4299: NUMA - allow Photon Classic to lock all native threads to a specific NUMA node.
    • Added "LockToNativeToNumaNode" which, if true, means that the node specified in "LockToNumaNode" is used to lock all native threads rather than the whole process.
  • PSCS-4416: HTTP - Websocket timeouts.
    • Add WS route level config element "MaxOutstandingPings" which defaults to 5 and which provides a timeout on the connection that is managed by ping responses or data frames from the remote end. This should be set to something that results in a "PingEvery" * "MaxOutstandingPings" value that is less than the "InactivityTimeout" for the route; otherwise it does nothing. It allows a connection to have a longer "InactivityTimeout" for data frames reaching the managed layer and still have a shorter "connection liveness" timeout.

CHANGED

  • PSCS-4182: CWebSocketOutboundPeer::Send() - outbound message too big: 1014 bytes.
    • Store config object correctly as a copy rather than a ref.
  • PSCS-4260: UDP - queue expansion during shutdown.
    • Prevent datagram socket AO queue expansion during shutdown.
  • PSCS-4278: I/O Buffer contention monitoring is now enabled.
    • Disable I/O buffer contention counters.
  • PSCS-4304: Redesign 'multi-pool buffer allocator' concept.
    • Don't pool buffers that are allocated on non-framework threads - note needs tuning so that it only happens when we're NUMA node locked.
  • PSCS-4307: Make performance counters more NUMA aware.
    • Allow preferred NUMA node to be specified when counter data blocks are allocated in shared memory.
    • Turn off all buffer allocator perf counters.
  • PSCS-4312: Dump details of certificates on start up.
    • Dump certificate date and fail to start if dates are invalid.
  • PSCS-4314: Look for bottleneck on ENet thread pool side of inbound datagram processing.
    • Make peer lookup data cache-line friendly.
    • Make ENet thread pool dispatch path cache-line friendly...
  • PSCS-4315: ENet - performance - Consider turning off TRACK_ENET_PEERS_PENDING_DESTRUCTION.
  • PSCS-4318: ENet - performance - consider sequencing into datagrams into enet host.
  • PSCS-4323: Investigate Intel VTune.
  • PSCS-4328: Potential 'micro optimisations' that will benefit NUMA.
    • VTune inspired micro optimisation, create command references with one atomic operation rather than two.
    • VTune inspired micro optimisation, replace buffer chain (pointer following) with vector for enet peer write data queue...
    • VTune inspired micro optimisation, data layout for CActivatableObject, prevent objects split over cache lines.
    • VTune inspired micro optimisation, CBuffer cache-line changes.
    • VTune inspired micro optimisation, cache-line adjustments for updated AO.
    • VTune inspired micro optimisation, DatagramServerSocket now uses fixed sized buffer vector for buffer pool; next step is to enlarge the pool and/or make the vector resizable...
    • VTune inspired micro optimisation, remove indirection in accessing buffer sequence number.
    • VTune inspired micro optimisation, remove AO 'optimisation' that doesn't ever optimise with 90% of photon enet workloads.
  • PSCS-4332: ENet - performance - redesign retransmission system.
    • Implement ACK2.
    • Add journaling of higher level operations, send, resend, remove.
    • Add optional timestamps to journal. Allow a subset of peers to generate journals.
    • Add tree-based index for timeout for resend processing.
  • PSCS-4339: NUMA - compare object layout of P4/P5 ENetPeer.
    • Cache-line related object optimisation (shuffling things around).
  • PSCS-4340: Perf - Reference counts are not free - consider a design with reduced reference counting.
    • Create command references with a single atomic operation.
    • Reduce reference counting.
  • PSCS-4341: NUMA - things to turn back on once we get a good enough result.
    • Enable buffer allocator monitoring for deploy version.
  • PSCS-4352: NUMA - consider automatically locking to the node we are started on.
    • New service installation command line arg /lockNuma x where x is the node to set as the service's preferred NUMA node. This MAY mean that if we also lock native to the same node then there's less chance that the process will start on one node, load the exe and data segments into that node's memory and then lock itself to another node...
  • PSCS-4353: Name service dispatch thread.
    • Set affinity of service dispatch thread (if needed).
  • PSCS-4361: Setting UDP encryption in interop version.
    • Enable selection of ENet encryption type using presence of MAC secret as with Classic - note should adjust Interop interface to allow it to be explicitly set.
  • PSCS-4421: WebSocket Connection Loss Recovery.
    • TCP fast retransmit hack - send 3 pings once we've had a third of our 'max pings without response' unanswered.
    • Show first missed ping at VERBOSE level and subsequent at TRACE.
  • PSCS-4423: Investigate if we can route 'bytes in on socket' up to WS peer level.
    • Adjust timeout debug, all you need should now be:
      • <WebSocketInClearPeer Me="INFO"/>.
      • <WebSocketInClearHostReadTimeout Level="TRACE"/>.
      • <WebSocketInSecurePeer Me="INFO"/>.
      • <WebSocketInSecureHostReadTimeout Level="TRACE"/>.
  • PSCS-4428: Websockets - add TimeoutAbort reason.
    • Make disconnects and timeouts configurable separately; WebSocket[In/Out][Secure/Clear]HostDisconnects and WebSocket[In/Out][Secure/Clear]ReadTimeout

REMOVED

  • PSCS-4177: Remove legacy sockets dependencies.

PhotonControl

FIXED

  • LoadBalancing's GameServer's IP configuration shortcuts.
  • No hwid is displayed if there is no license present.
  • Free 100CCU license should not display expiration date.

CHANGED

  • Improved error message when PhotonControl is already open.
  • Auto detect if a license has been added after PhotonControl is launched.

REMOVED

  • Stardust test client settings cleanup.
  • Empty placeholder item under LoadBalancing (used to be startdust test client in v4).
Back to top