This document is about: SERVER 5
SWITCH TO

Photon 5.0 - Beta

This page enumerates changes in the first publicly released version of Photon 5. Enterprise customers who had early access to the pre-release versions may find it useful.

If you are interested to discover what's under the hood in Photon 5, visit the what's new page.

v5.0.1.21359 Beta Change Log

LoadBalancing

FIXED

  • PSCS-1995: if MasterServerSettings.Default.PersistentGameExpiryMinute is set to null, games are removed from lobby even if they(games) are configured to stay in the lobby
  • PSCS-2382: added checking on master validity of expected user list during game creation
    • master server returns ErrorCode.InvalidOperation instead of InvalidServerError
  • PSCS-2469: if we failed to pass any checks after GameState creation, we remove the game from GameApplication and from lobby lists
  • PSCS-2587: added new error code SlotError. GS and Master code are updated. also, tests are updated
  • PSCS-2636: fixed mem leak because of GameList
    • fixed null ref in AppLobby.HandleRemovePeer
    • GameSubscriptionBase base class for game list subscriptions
    • Subscription removal code executed from Lobby fiber
    • IGameListSubscription got new method Dispose
    • IGameList - removed method RemoveSubscription
  • PSCS-2861: added new test to check how expected users behave
    • GameState - removed too often updates of PlayerCount (we do it once during game state update)
    • updated response to Debug Operation
  • PSCS-2917: NullRef during in OnStopRequested
  • PSCS-3128: Fixed ResultCode deserialization - custom converter for values like ""1.0"" which was previously tolerated by newtonsoft.json 6.0.8
  • PSCS-3130: Actors are never removed from room
  • PSCS-3427: fixed way how we do set GameListLimit for lobby
    • we limit the pre-allocation size
    • IGameListSubscription derived from IDisposable
    • GameSubscriptionBase - fixed usage of IDisposable pattern
    • GameChannel/GameListBase.Subscribtion - updated after changing GameSubscriptionBase
    • added disconnection of peers after sending of successful Create/Join/JoinRandom game responses and tests for this
    • added disconnection of the peer if it sends to many concurrent JoinGame requests

NEW

  • PSCS-2250: GameDataBase.cs - FindMatch can skip first N results. this is useful for consequent tries to find the game
    • SqlGameList - check whether the found game is joinable if not repeats DB search
  • PSCS-2661: SessionId is updated every time when we connect to Master:
    • updating token TTL when it is close to being expired
    • Added event AuthEvent which we will send in case of different AuthEvents. for now, we will use when the token is almost expired
    • AuthTokenFactory SessionId is built new as Guid + current time
    • MasterClientPeer - UserId is set to GUID if it is empty or null
    • MasterClientPeer - for auth without token we send back user id if it was set by the server every time when we connect to Master
  • PSCS-2687: New app layer for establishing of encrypted connection (AuthOnce, Udp Encryption)
    • SettingsRequest request which helps to change different settings
    • added handling of this request on MasterClientPeer
    • we use new token binary format if authOnceUsed flag is set
    • DecryptAuthenticationToken tries to decrypt first v2 and after that v1 version
    • configs are updated to provide HMACTokenKey
    • SettingsRequest request which helps to change different settings
    • added handling of this request on MasterClientPeer
  • PSCS-2697: GameServer and MasterServer send token as string or as byte[] depending on client
    • GameServer also may decrypt token
    • automatic setup of encryption using InitV3
  • PSCS-2742: Introduced LoadBalancerPriority for game servers
    • added setting to setup Load Prediction Factor on GS
    • LoadBalancer got more FeedbackLevel's
    • now in the config, we set values for level when to switch to next level up and down
    • updated configs
    • LoadPrediction.cs - class which tries to predict load basing on peer count
    • getting prediction values from GameServer
    • Added setting UseLoadPrediction to Common/CommonSettings.cs
    • Level values updated to start from 0 to 9
  • PSCS-2832: Encrypted Enet: support random initial sequence numbers
  • PSCS-2859: Enable AuthOnce for self hosted Realtime
  • PSCS-3094: added new counters for HttpErrors and Http Timeouts
    • errors, HTTP errors and HTTP timeouts custom auth are reported on per provider basis
  • PSCS-3128: added ExpireAt to custom auth result
  • PSCS-3176: added Facebook, Steam, and Occulus. By default, custom auth service is used (add setting Photon.Common.Authentication.UseCustomAuthService = false to use the new feature)
    • force Occulus custom auth to use POST (empty post data, but POST is required)
  • PSCS-3218: added ReserveRatio in order to split servers with same priority on normal and reserve
  • PSCS-3336: added arbitrary filtering for servers returned by LoadBalancer
    • TryCreateGame accepts now JoinGameRequest instead just Operation. this reduces amount of parameters
    • get supported protocols from settings and sending them from gs to master
  • GetGameList operation and SqlListLobby
  • PSCS-3340: SQL matchmaking with stored procedures, don't allow SQL queries from client, set protected values only from AuthCookie
    • SQL matchmaking with funnels, placeholders and stored procedures
  • PSCS-3343: added Viveport custom authentication
    • Viveport custom authentication, use v2 API
  • PSCS-3459: allow multiple queries with a single JoinRandom call
  • PSCS-3483: added CreateIfNotExist to opJoinRandomRoom
  • PSCS-3596: Oculus auth provider - support two different Oculus apps

CHANGED

  • PSCS-2511: refactored updating of GameState for GameChannelList
    • during GameState reinitialization we set an event to GameState.CreateRequest
    • AppLobby - removed the useless assignment
  • PSCS-2524: Made sure that BeforeAfterExecutor is used where applicable
  • PSCS-2562: warn logs in case of disconnect of IncomingGameServerPeer
    • explicit logging from Setup, OnStopRequested and TearDown on MasterServer
  • PSCS-2698: Null Ref in JoinRandomGame constructor.
    • added exception handler so for OnOperationRequest, so that we do not lose exceptions
  • PSCS-2732: Added timer which checks whether we got auth request or not
    • added counter which shows how many peers did not call Authenticate within some period of time
  • PSCS-2771: improve logging in case we failed to deserialize data
  • PSCS-2817: updated timeouts for different http queues for realtime
  • PSCS-2827: AuthCache.cs is removed and what was related to it
    • IGameServerApplication interface also removed because it is not used
    • AuthenticateUpdateEvent.cs - removed because AuthCache.cs is removed
    • removed all code related to AuthCache.cs
  • PSCS-2828: Add GameServer context and use it instead of peers
  • PSCS-2908: Add counter to see amount of GS, their states and amount of GS contexts
    • added GameServerLeave event which is used to say good bye to master server
    • in order to destroy context master server waits for leave event from GS or destroys it by timeout after GS disconnect
  • PSCS-2911: Error "Master is not registered" (We do not start replication till the moment of registration)
  • PSCS-2951: CustomAuthentication/ClientAuthenticationQueue.cs - introduced interface IClientAuthenticationQueue to help in testing of CustomAuthHandler stuff
    • CustomAuthHandler refactored and added support for Dictionary<string, object>
    • CustomAuthHandler - ForwardAsJSON might be set per custom auth provider
  • PSCS-2976: LoadBalancer - added event OnServerListChanged and possibility to store oor/offline servers.
    • LoadBalancer - TryUpdateServer() - now if the server was removed from available due to ServerStatus change - TryUpdateServer will add it back if state changes to normal
    • HttpQueuePerformanceCounters - updated comments
    • IHttpRequestQueueCounters returned back HttpResponseIncrement
  • PSCS-2986: Disconnect players if they do not show any activity.
  • PSCS-2990: Do not warn about reinitialization if ActorsCount == 0 and EmtpyRoomTTL is set
  • PSCS-3003: we update token issuer on every token encryption
  • PSCS-3025: Resetting context of old peer through attaching new peer to context
    • more strict check during detaching of a peer from context, that peer still belongs to the context
  • PSCS-3041: RTT QoS Monitoring
  • PSCS-3081: added global limit to lobbies count (currently 1000K)
    • added settings MasterSettings.LobbiesCountLimit
  • PSCS-3139: Batching of messages for s2s communication
  • PSCS-3213: We do not send notification about removing of invisible games
  • PSCS-3282: Read performance counters data from '_Total' instance
  • PSCS-3317: default lobby and SQL lobby GameList(+update) events can be limited (disabled in case of SQL lobby). Default settings keep prior lobby behavior. lobby gamelist (+updates) limits can be set per application"
  • PSCS-3394: Added deferring of JoinGame response in case of JoinOnly and if the game is not created on GS yet
  • PSCS-3396: added options to FindFriends so that now we may return only games either Created On GS or Visible or Open or combination of that three
  • PSCS-3462: CustomAuthHandler - introduced method OnCustomAuthenticationError to reduce amount copy-pasted code
    • IAuthOnceRequest.ClientAuthenticationType converted to byte? so that we can see whether it was set by client or not
    • ICustomAuthPeer.OnCustomAuthenticationError - removed unused parameter state
    • depending on setting Photon.Common.Settings.Default.AllowReturnErrorIfCAIsNotSetup we either send error or log in case if custom auth is requested but not setup
    • ClientAuthenticationQueue - the processing of response data even in case of error code response
    • CustomAuthHandler - handles the response body even in case of the error response

Photon Hive Plugins

FIXED

  • PSCS-3395: NullReference Exception in PluginBase.AppId call
    • added generation of exception in case if PluginHost set to null

NEW

  • PSCS-2534: Add AsyncPaused mode for execution of Http Requests

  • PSCS-2758: IPluginHost.CreateLogger

  • PSCS-2767: Added ExecuteCacheOperation to IPluginHost

    • added class CacheOp
  • PSCS-2858: Introducing bit flags to manage for different aspects of Room Behaviour (IJoingGameRequest got a new property)

  • PSCS-2874: Add http headers to IHttpResponse (Plugin)

  • PSCS-2978: Support of new delivery modes

  • PSCS-3061: Return ICallInfo.Status property

  • PSCS-3141: Implement IPluginFiber & IFactoryHost for Realtime

    • IPluginHost.GetRoomFiber
    • PluginFactoryBase is derived from IPluginFactory2
    • PluginFactoryBase got a reference to IPluginHost and method to set it
  • PSCS-3240: Realtime - move plugin config to separate file and add watch for changes

  • PSCS-3266: Add setting of Restricted headers through properties

  • PSCS-3340: SQL matchmaking with funnels, placeholders and stored procedures

  • PSCS-3355: Add support for PUT request method to IPluginHost.HttpRequest

  • PSCS-3418: Global ban (block token)

  • PSCS-3643: HttpRequest - Add support for client certificates

  • IPluginHost.Enqueue(Action action)

CHANGED

  • PSCS-2771: improve logging in case we failed to deserialize data
  • PSCS-2900: Allow setting PlayerTTL and EmptyRoomTTL after the room creation (PlayerTTL was added to IJoingGameRequest)
  • PSCS-3456: CAS error messages are misleading
  • PSCS-3475: HiveHostGame does not allow SetProperties call during game creation
    • added limitation for EmptyRootTTL which is set during BeforeCloseGame call
    • small fixes to the plugin interfaces

Photon Hive

FIXED

  • PSCS-2578: Empty Rooms being left in Lobby
  • PSCS-2594: Peers and Games leaks on GameServer
  • PSCS-2615: fixed NullRef in ForwardPlugin.OnLeave
  • PSCS-2631: fix which does not allow create game in case if joinMode == RejoinOrJoin and IsPersistent == false
  • PSCS-2640: the correct disposing of the previous instance of LobbyStatsPublisher.
    • LobbyStatsPublisher got finalizer
  • PSCS-2689: nicknames don't work with Photon Server
  • PSCS-2692: Timeout Interval HttpQueue - made sure that we do not pass timeout less than -1
  • PSCS-2696: System.ArgumentException: The 'Content-Type' header must be modified using the appropriate property or method
  • PSCS-2697: OnLeave call finished with Fail. Details: 'System.NullReferenceException: Object reference not set to an instance of an object
  • PSCS-2753: removing of duplicates of dashboard(config) keys in the client query string
  • PSCS-2782: incorrect error response message in case of plugin mismatch
  • PSCS-2853: GameServer "A" may remove game which is created on GameServer "B"
  • PSCS-2857: Properties on clients might get out of sync, when they are set concurrently
  • PSCS-2885: Interest Groups can only be subscribed once. Fix ChangeGroups (OpCode = 248).
  • PSCS-2918: Kick message does not reach the client (now we give some time to message to reach the client)
  • PSCS-2965: NullRef during handling null ref exception in timer action
  • PSCS-3012: Exception in method InternalSetEncryption()
  • PSCS-3034: ExpectedUsers not restored when loading room state
  • PSCS-3071: Master server wrong values in expected users list set through properties
    • PropertyBag got Clear method
  • PSCS-3153: Fix "Can not find actor in inactive collection"
  • PSCS-3186: Investigate and fix ExpectedUsers + UserId > MaxPlayers bug
  • PSCS-3198: OnProperties changed event comes earlier then OnJoined
  • PSCS-3209: Fixed NullRef during HttpResponseCreation
  • PSCS-3216: Can not join room after using ExpectedUsers
  • PSCS-3217: Fix WebRPC error codes and error messages
  • PSCS-3284: setting the expectedUsers when joining a room does not work as expected
  • PSCS-3285: setting the expectedUsers roomProperty from inside the room does only work when it has already been set by a client on entering the room
  • PSCS-3301: Fix race condition with Peer's JoinState
  • PSCS-3626: Failure in PluginManager.OnAssemblyResolve if assembly name does not contain ','

NEW

  • PSCS-2080: added counting of http request execution time

  • PSCS-2386: Add parameter PublishUserId for JoinGameRequest

  • PSCS-2447: Add use of IsPersistent and AsyncJoin flag

    • if IsPersistent flag is false, then we do not check AsyncJoin setting. we set it also to False
    • if IsPersistent is true, then we check setting for AsyncJoin. we take configured value if it is found, or we set it to true if there is nothing in config
  • PSCS-2534: Add AsyncPaused mode for execution of Http Requests

  • PSCS-2767: Add ExecuteCacheOperation to IPluginHost

  • PSCS-2801: Force LoadBalancing to use only NameServer authentication

  • PSCS-2856: Implement "Delete Null Props" for Op CreateRoom

  • PSCS-2858: Introducing bit flags to manage for different aspects of Room Behaviour

  • PSCS-2874: Add http headers to IHttpResponse (Plugin)

  • PSCS-2947: Add compatibility layer for old plugins

  • PSCS-2978: Adding support for new delivery modes (reliable unsequenced and unreliable unsequenced)

  • PSCS-3070: Nameserver Overload protection

  • PSCS-3141: Implement IPluginFiber & IFactoryHost for Realtime

  • PSCS-3240: Realtime - move plugin config to separate file and add watch for changes

  • PSCS-3266: Add setting of Restricted headers through properties

  • PSCS-3340: SQL matchmaking with funnels, placeholders and stored procedures

  • PSCS-3355: Add support for PUT request method to IPluginHost.HttpRequest

  • PSCS-3418: Global ban (block token)

  • PSCS-3643: Http Queue - Add support for client certificates

  • GetGameList operation can be used with SqlLobby (was SqlListLobby only), removed SqlListLobby type (4)

CHANGED

  • PSCS-2077: Allow PluginManager to load different versions of same assembly.
  • PSCS-2617: Add Remove Reason to remove game event
  • PSCS-2622: Invalidating of RaiseEventRequest if WebFlags type is not bool or byte
  • PSCS-2658: GS checks limits for WebRPC operations
  • PSCS-2678: overloading of http queue for WebRpc
  • PSCS-2703: Add check that RaiseEventRequest.Actors is not too long and does not contain repeats
  • PSCS-2764: Block RaiseEvent operations which use photon event codes
  • PSCS-2796: Send reinitialize game message if we get too many Game full errors
  • PSCS-2797: Plugin Http KeepAlive failures are auto-retried now
  • PSCS-2807: Reduced the amount of game updates between Master and client and Master and GameServer
  • PSCS-2816: PluginHost GetActiveActorsByNumbers returns empty enumerator if first id does not exist
  • PSCS-2892: Allow set properties to inactive actor (Plugin)
  • PSCS-2900: Allow setting PlayerTTL and EmptyRoomTTL after the room creation
  • PSCS-2910: SetPropertiesRequest validation
  • PSCS-2945: Add limits to control the amount of slices and messages in event cache (see PSCS-3040)
  • PSCS-3040: Limiting amount of cached events (see PSCS-2945)
  • PSCS-3088: master frontend
  • PSCS-3092: Refactored process of games replication from gs to ms
  • PSCS-3183: Improved memory management for http request objecst:
    • AsyncHttpRequest - implementation of IDisposable
    • Disposing of AsyncHttpRequest after usage
    • Method AsyncHttpRequest.Cleanup does not close WebResponse object
  • PSCS-3221: Guarding and counting plugin log messages
  • PSCS-3623: Allow to pass null instead of ICallInfo to IPluginHost.HttpRequest
  • PSCS-3628: Do not allow rejoining if events cache was discarded

PhotonSocketServer

FIXED

  • peerType detection for OutboundS2SPeer
  • PSCS-2316: fixed initialization of windowsCounter so that it should not spam with warnings
    • PerfCounterManagerBase.isInitialized marked as public
    • PerfCounterManagerBase some members marked as public API to get rid of warnings from Resharper
    • PerfCounterManagerBase - now counters can be initialized as read-only if the user is in performance logging group
  • PSCS-2787: reading of arrays and strings - added one more check of byteCount to read
  • PSCS-2802: now AsyncHttpRequest.SetException is called only once
    • make sure that user callback is called only once
  • PSCS-2815: concurrency issue in the TimeIntervalCounter.Increment method.
  • PSCS-2828: Fixed offline test sdk to handle better disconnection:
    • PhotonApplicationProxy - fixed method names
    • PhotonApplicationProxy - if a connection is broken, it is not possible to connect to this server and this server can not establish connections
    • PhotonPeerProxy: fixed typo in OnDisconnect method name
    • PhotonPeerProxy: refactored disconnection process for offline peers

NEW

  • PSCS-2198: PhotonCounter.cs removed completely

    • CounterPublisher initialization and configuration updated
    • class Operation got two virtual methods OnStarted/OnCompleted to implement custom performance measurements
  • PSCS-2681: OutboundS2SPeer added support for s2s udp encryption

  • PSCS-2697: InitV3 implementation

    • added DecryptAuthToken to decrypt token in InitV3 request
    • IRpcProtocol and implementations - Token for InitV3 expected to be a byte[]
    • OutboundS2SPeer - takes token as byte[]
  • PSCS-2788: as part of Protocol 1.8 implementation, we introduced custom type compression and CustomTypeCache got an array of types instead of a dictionary

    • added depth check for recursive data types and dictionary type definition
    • writing directly to the memory stream (speeds ups the thing)
    • added support for in-place encryption/decryption (ICryptoProvider and RijndaelCryptoProvider got new methods for that)
    • Protocol 1.6: fixed serialization/deserialization of Dictionary<any type, array>
    • Protocol 1.6: removed typeof calls
    • Protocol 1.6: improved error messages
    • the server may accept the connection with protocol 1.8
  • PSCS-2940: Add support for unsequenced into the managed core

    • Added DeliveryMode enumeration to set DeliveryMode for messages
  • PSCS-3070: ApplicationBase - added manager and setter for max enqueued tasks to its queue

    • Added one method for initialization of all perf counters from managed core
    • Counters initialization replaced by one call to InitCorePerfromaceCounters
  • PSCS-3080: CpuUsageCounterReader uses {ProcessName} instance or {ProcessName}_{ProcessId} instance

  • PSCS-3174: added support for Tls, Tls1.1 and Tls1.2 when we connect to some http server using https protocol

  • PSCS-3367: added two new methods BroadcastMessage and BroadcastRawMessage

    • PeerBase.SendRawMessage was made public
  • Implementation of tracing in ClientPeer

  • added Trace() and GetTraceStatus() to PeerBase

CHANGED

  • PSCS-2649: we filter out all peers which are not connected during event broadcasting. If we filtered out peer during BroadCastEvent, we call OnSendFailed for it

  • PSCS-2687: added ClientUsingDebugLib to InitRequest

    • added new handshake error codes
    • added a way how to reject peer and postpone response to it
    • Unknown peer type has value '-1'
    • PeerBase got methods SendXXXAndDisconnect(...) and ScheduleDisconnect
    • PeerBase sets up encryption using encryption data from InitRequest
    • PeerBase exposes a new method to setup payload encryption
    • RtsInitMessage converted to a struct to eliminate its allocation on the heap
    • RtsInitMessage updated implementation to be compatible with old language versions
    • OutboundS2SPeer.ConnectToServerUdp added a check that num of channels and initialSeqNums have corresponding lengths
    • int[] converted to uint[]
    • OutboundS2SPeer got new Connect* methods which accept auth token
  • PSCS-2735: PeerBase.OnReceive split so, that error of deserialization are not mixed with errors from user code

    • fixed logging: we log once if there is an exception
  • PSCS-2760: ApplicationBase - added support for HTTPListener

    • Protocol added parsing of http header
    • InitRequest - got property HttpHeaders
    • Versions - added version for http peer
    • added new NetworkProtocolType - 'PlainHttp' for REST Api
  • PSCS-2771: improve logging in case we failed to deserialize data

  • S2SPeerBase logs warning messages in case of any parse data error

Back to top