v1.0

Overview

After three years since the initial release, Diarkis has finally released v1.0!

Major Updates

  • Field has been updated

    • Now synchronizes across Grids within the Field of Vision.

    • Optimized to reduce server load.

    • Fixed various bugs.

    • Deprecated IDiarkisField::SyncInit() and added IDiarkisField::Join().

    • Added DiarkisField::Leave() command.

  • Added a new Session module.

Server

Compared to v0.9, internal communication efficiency has been improved, internal code refactored, and test scenarios strengthened, resulting in enhanced performance.

  • Core

    • Added DiarkisExec package to simplify server setup.

    • Added a mechanism to cache MARS addresses in the mesh module for a certain period.

    • Changed package names of roomSupport and groupSupport to camel case.

    • Added an echo handler.

    • If provided structures for logging functions implement the String() interface, output the return value of String().

    • Diarkis server disables dual-stack when obtaining its own IP address.

    • Locked mesh transmission callbacks to prevent critical issues.

    • Fixed concurrent iteration and writing to vault maps to prevent critical issues.

    • Added context notification for timeouts on OnStop and OnTerminate.

  • Direct Message

    • Fixed disconnection of DM users to send disconnect messages with the correct version and command.

    Dive

    • Added IncrBy and IncrByEx.

    • Added OnReady.

    • Changed Dive data type from interface{} to []byte.

    • Fixed issue where Dive byte fixed size was too small.

    • Fixed issue preventing Dive module shutdown.

    Field

    • Improved performance and availability by changing Field algorithms.

    • Fixed Field custom filters to execute on front servers instead of storage servers.

    • Improved Field module performance.

    • Fixed issue where Leave command ID used the same command ID as room chat.

    • Added Join command, enabling Sync, Disappear, and Leave to function after Join.

    Group

    • Fixed issues related to Join.

    MatchMaker

    • Added onMatchedTicketTimeout to handle member ticket timeout.

    • Updated ticket properties.

    Mesh

    • Fixed issue with sharedData updates when keys are full.

    • Configured announcer to stop after termination tasks.

    Metrics

    • Fixed packet count metrics and added packet size metrics.

    Puffer

    • Added support for property comments and case sensitivity to improve JSON parsing.

    • Ensured protocol names are unique within each package.

    • Added constants Ver and Cmd to protocol code.

    • Changed file permissions from 755 to 644 for generated files.

    Room

    • Fixed issue where a room wouldn't empty upon unexpected user disconnection and reconnection with the same user ID.

    • Prevented room ID duplication.

    • Changed UpdateProperties and IncrProperty to not update room TTL.

    • Fixed lock leak issue with mutex.

    • Changed log level for room message/announce.

    • Fixed parameter names in SetOnMigrated callback.

    Session

    • Prevented sessions from retaining invite data per user.

    • Added session command to get member ID and member count when specifying SessionType.

    • Prevented race conditions with setTypeByUser and removeTypeByUser.

    Go Client

    • Added Debug command.

Client

  • Diarkis Runtime

    • General

      • Fixed issue where Fin packets were not sent upon disconnection from UDP servers.

      • Removed OnReset() functions and modified Distroy() functions to call internally during destructor.

        • Removed Reset events for UDP/TCP accordingly.

      • Added error codes and error messages to callback arguments of each module for error handling. Error information can be obtained via GetErrorCode and GetErrorMessage of the instance passed as an argument.

      • Added Trace log level.

      • Added library builds for development.

        • debug

          • Debug build

        • develop

          • Release build with log output enabled

        • release

          • Release build with log output disabled, reduced text data such as error messages

        • Changed library file paths

      • Stopped using std::cout within the runtime.

      • Fixed code flagged by Address Sanitizer in Visual Studio for container overflow exception.

      • Added Privacy Manifests file for iOS environment.

        • Located at platforms/ios/PrivacyInfo.xcprivacy

      • Fixed issue with deleting events within callback events.

    • UDP

      • Addressed issue where some reliable transmission methods allowed sending data exceeding 10,000 bytes as an error.

      • Changed RUDP retransmission intervals to incrementally increase per retry attempts.

      • Fixed issue where RUDP retransmission process lagged behind IDiarkisUdp::SetSendRetryInterval.

      • Corrected DiarkisConnectionEventArgs::GetRecconect typo.

      • Changed to re-create socket before executing disconnect procedure if send retry times out while socket re-creation feature is enabled.

    • MatchMaker

      • Deprecated DiarkisMMHostEventArgs::GetPayload.

    • P2P

      • Fixed issues related to disconnection judgments.

      • Improved hole-punching procedures.

      • Changed communication intervals for hole-punching to incrementally increase per retry attempts.

      • Changed default P2P connection timeout from 10 seconds to 5 seconds.

      • Added explicit disconnect feature for P2P module.

        • Execute disconnect with IDiarkisP2P::Disconnect and receive event notification with IDiarkisP2P::GetDisconnectEvent.

      • Added feature to get the UID of the connection partner upon successful or failed P2P connection.

      • Fixed bug where larger packets than the sent payload were transmitted during P2P connect when bBuffering=false and no encryption.

      • Fixed crash issue when logger is not specified in P2P connection.

    • Group

      • Deprecated DiarkisGroupEventArgs::GetPayload.

    • Field

      • Deprecated DiarkisField::SyncInit and added DiarkisField::Join.

      • Added Field::Leave() command.

    • DirectMessage

      • Deprecated OnConnect event.

      • Fixed incorrect command sent by DirectMessage Disconnect.

    • Session

      • Added event for when kicked from session.

        • Use DiarkisSession::GetKickEvent to set event.

      • Retrieve information of current sessions by specifying sessionType with Session::SendGetSessionInfoBySessionType() sending request to server, and receiving result with Session::GetSessionInfoEvent.

      • Retrieve information of non-participated sessions by specifying sessionID with Session::SendGetSessionInfoBySessionID() send request to server, and receiving result with Session::GetSessionInfoEvent.

      • Deprecated Session::SendGetMemberIDs() and Session::SendGetNumberOfMembers().

      • Changed Invite/Accept specifications. When a user receives an Invite, the session ID can be obtained through the event callback. Previously, joining followed by Accept was the flow, but the recommended method is to join the session by specifying the session ID with Session::SendJoin. Due to this change, the callback arguments of the Invite event have been changed, and Session::SendAcceptInvite is scheduled for deprecation.

      • Added functionality to send arbitrary messages simultaneously with invites to Session::SendInvite.

      • Added functionality to retrieve participating session members. Send request to server with Session::SendGetMemberIDs and receive results with Session::GetMemberIDSEvent.

      • Added functionality to retrieve the number of participating session members. Send request to server with Session::SendGetNumberOfMembers and receive results with Session::GetNumberOfMembersEvent.

      • Added API to obtain execution results of session-related commands on the server. Execution results can be received via On...Response type callbacks, allowing detection of errors like reaching session participation limits.

      • Fixed issue where UID was returned instead of session ID with Session::GetSessionIDByType() after OnJoin event.

  • Diarkis Module

    • General

      • Added DiarkisInit/DiarkisDestroy functions to the Base class to initialize the logger in DiarkisInit.

      • Separated the logger from DiarkisInterfaceBase and modified to manage multiple instances of DiarkisInterfaceBase.

      • Made client version visible in logs.

      • Added mode to output log files to any desired location in DiarkisInterfaceBase.

      • Changed to a single event processing thread across all instances of DiarkisInterfaceBase.

      • Added custom allocator types for the std library used within Diarkis.

        • Includes types like Diarkis::StdString and Diarkis::StdVector, used internally within Diarkis.

        • These types are generally meant for internal use within the library but can be visible to the application where necessary.

      • Added feature to set a custom allocator to replace memory allocation processes in Diarkis runtime.

        • Implement a custom allocator by inheriting ICustomAllocator and replace it with Diarkis::SetCustomAllocator().

        • Provided a sample implementation in main.cpp of the room_broadcast sample.

      • Fixed issue where events from DiarkisTcp/Udp/P2P were not immediately notified to the event processing thread when multiple DiarkisInterfaceBase instances exist.

        • Addressed this by changing GetSchedulerAddNotifyEvent in IDiarkisTcp/Udp/P2P to detect event addition, allowing application control over thread behavior.

        • Refer to the implementation around DiarkisInterfaceBase::RuntimeLoop for details.

      • Unified endpoint retrieval function to GetEndpoint, allowing server endpoint retrieval by passing serverType.

      • Enabled UDP server connection using connection information obtained via external server.

      • Fixed issue where encryption-enabled communication was attempted despite encryption being disabled on the server.

      • Changed to reuse encryption/decryption instances created in the constructor.

      • Fixed issue where event processing added during event processing threads could be delayed.

      • Moved the code in diarkis-module/Extension to a new location.

        • Clarified sample implementation by relocating diarkis-module/Extension code under diarkis-module-extension in the sample.

      • Changed to use DIARKIS_DEBUG_FEATURES macro for enabling/disabling debug features provided by Diarkis Module during build.

        • Since Diarkis Module is built together with the application, DIARKIS_DEBUG_FEATURES should be defined during application build if debug features are desired.

      • Added NAT type judgment feature.

        • Result of executing DiarkisUdpBase::SendCheckNATType can be obtained via DiarkisUdpBase::OnCheckNATType.

      • Organized coding style of Diarkis modules.

        • Changed to append an underscore (_) at the end of protected variable names in Diarkis Module. Update variable names per coding style if a build error occurs.

      • Fixed unintended log folder creation with LogOutType::FILE_OUT_TO_SPECIFIC_PATH in DiarkisInterfaceBase.

      • Unified source code text format to UTF-8 with BOM(LF).

      • Eliminated std::cout usage in Diarkis module.

      • Fixed several codes calling new.

        • Note that new is called inside httplib used for HTTP access in the sample implementation, which does not support allocator replacement.

      • Changed macOS deployment target to 10.13.

      • Organized HTTP access implementation for iOS and Android.

        • Streamlined implementation by organizing duplicate code.

    • Room

      • Fixed issue where arguments passed to Room::Relay in SendRelay() were incorrect, preventing proper replay function.

      • Removed SyncProperties and ObjectSync.

    • P2P

      • Added a debug feature to force hole-punch failure.

      • Modified DiarkisP2PBase::ConnectClient to do nothing if called on a uid for which connection processing has already started.

      • Added arguments to specify P2P timeout and buffering settings in DiarkisP2PBase::ConnectClient.

    • Session

      • Added DiarkisSessionBase::OnSessionCreateResponse, replacing DiarkisSessionBase::OnSessionCreate.

        • Can check whether a session was successfully created by checking arguments of DiarkisSessionBase::OnSessionCreateResponse.

      • Added support for session kick events.

        • Processable with DiarkisSessionBase::OnSessionKick.

      • Supported TCP protocol.

    • Group

      • Added a function to leave all groups.

      • Added a function to send broadcasts specifying GroupID.

    • Field

      • Fixed issue of duplicate sync() call when SendFieldSync() is called initially.

      • Changed to not call Field::SyncInit within DiarkisFieldBase as its call is no longer necessary.

    • MatchMaker

      • Supported issue ticket response in OnIssueTicketResponse().

      • Added SendKick() function.

      • Added event to handle TicketBroadcast response.

        • After executing DiarkisMatchMakerBase::SendTicketBroadcast, confirm proper handling of the send command by receiving DiarkisMatchMakerBase::OnTicketBroadcastResponse.

      • DiarkisMatchMakerBase::OnTicketCancelResponse is called if matching on IssueTicket and the ticket is discarded due to server scale-in.

      • DiarkisMatchMaker::OnCustomCommandTicketMemberLeave is called if a user matched on IssueTicket leaves the ticket due to server scale-in.

        • This is implemented on the Diarkis Module Extension side, so the same implementation needs to be added to the application side if used.

      • Removed CatchOnReconnect function as timing for joining the room after Host/Search has changed for server reconnect timing.

    • RPC

      • Changed RPCAll() / RPCMany() / RPCOne() to virtual functions.

  • Sample

    • Added session_simple sample.

      • Fixed to wait for 4444 clients to join before broadcasting in session_simple sample where 3333 clients failed to broadcast before 4444 clients joined.

    • Added directmessage_simple sample.

      • Provided sample code in directmessage_simple sample to set connection information to UDP server obtained via external server.

    • Added Android sample.

    • Added iOS sample.

最終更新