v1.0

Overview

Diarkis has finally released version 1.0, marking three years since its initial release!

Main Updates

  • The Field has been revamped

    • In the case of Field of Vision, it now synchronizes across grids.

    • Optimizations have been made to reduce server load.

    • Various bugs have been fixed.

    • IDiarkisField::SyncInit() has been deprecated, and IDiarkisField::Join() has been added.

    • The DiarkisField::Leave() command has been introduced.

  • A new Session module has been added.

Server

Compared to version 0.9, the internal communication efficiency has been improved, internal code refactoring has been conducted, testing scenarios have been strengthened for quality improvement, and performance has been enhanced.

  • Core

    • Added the DiarkisExec package to simplify server setup.

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

    • Changed the package names roomSupport and groupSupport to camel case: roomSupport, groupSupport.

    • Added an echo handler.

    • If the logging function's given struct implements the String() interface, it now outputs the return value of String().

    • Diarkis servers disable dual stack when retrieving their IP address.

    • Locked mesh transmission callbacks to prevent fatal issues.

    • Fixed concurrent iteration and map writing issues in vault to prevent fatal problems.

    • Added a context to notify timeouts for 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's data type from interface{} to []byte.

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

    • Fixed shutdown prevention issues in the Dive module.

    Field

    • Field algorithms have been modified, improving performance and availability.

    • Custom filters for fields now execute on front servers instead of storage servers.

    • Enhanced Field module performance.

    • Fixed an issue where the Leave command ID for Field was using the same command ID as room chat.

    • Added a Join command, enabling Sync, Disappear, Leave to function following Join.

    Group

    • Fixed issues concerning Join.

    MatchMaker

    • Added onMatchedTicketTimeout for handling member ticket timeouts.

    • Updated ticket properties.

    Mesh

    • Fixed issues with sharedData updates when keys are full.

    • Ensured announcers stop after termination tasks.

    Metrics

    • Fixed packet count metrics and added packet size metrics.

    Puffer

    • Added support for property comments and improved JSON parsing by supporting case differences.

    • Ensured protocol names are unique within each package.

    • Added constants Ver and Cmd to protocol codes.

    • Changed generated file permissions from 755 to 644.

    Room

    • Fixed an issue where rooms did not empty when a user unexpectedly disconnected and reconnected with the same user ID.

    • Prevented room ID duplication.

    • Changed UpdateProperties and IncrProperty to not update room TTL.

    • Resolved lock leaks with mutex.

    • Changed log levels for room message/announce.

    • Corrected parameter naming in SetOnMigrated callback.

    Session

    • Adjusted invitations in Session to not retain invite data per user.

    • Added session commands to retrieve member IDs and member count when specifying SessionType.

    • Prevented race conditions between setTypeByUser and removeTypeByUser.

    Go Client

    • Added a Debug command.

Client

  • Diarkis Runtime

    • General

      • Ensured Fin packets are always sent during disconnections from a UDP server to prevent disconnecting without sending due to timing.

      • Removed OnReset() functions for each module and replaced them with Distroy() functions, which are internally called at module destruction.

        • Consequently removed UDP/TCP Reset events.

      • Added error codes and messages as arguments to callbacks for error handling. Retrieve error information using GetErrorCode and GetErrorMessage of the instance passed via arguments.

      • Added Trace log level.

      • Introduced develop build libraries.

        • debug

          • Debug builds.

        • develop

          • Release builds with log output enabled.

        • release

          • Release builds with log output disabled.

          • Reduced text data such as error messages in builds.

        • Note: Library file placement paths have changed.

      • Stopped using std::cout within runtime.

      • Fixed code pointed out by Visual Studio's Address Sanitizer causing container overflow exceptions.

      • Added iOS environment Privacy Manifests file to the package.

        • Located at platforms/ios/PrivacyInfo.xcprivacy.

      • Fixed flaws when deleting events inside callback events.

    • UDP

      • Changed certain Reliable transmission methods that allowed sending over 10,000 bytes to treat it as an error.

      • Changed RUDP retransmission interval to allow it to lengthen gradually based on trial counts.

      • Fixed an issue where RUDP retransmission processing was slower than the value set by IDiarkisUdp::SetSendRetryInterval.

      • Corrected typo in DiarkisConnectionEventArgs::GetReconnect.

      • Amended socket recreation with active send retry to conduct socket recreation before executing disconnection processes when timeout occurs.

    • MatchMaker

      • Deprecated DiarkisMMHostEventArgs::GetPayload.

    • P2P

      • Fixed bugs related to disconnection judgments.

      • Improved hole punching process.

      • Changed communication intervals for hole punching to lengthen based on trial counts.

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

      • Added explicit disconnection processing feature to P2P module.

        • Execute disconnection with IDiarkisP2P::Disconnect and receive event notifications on disconnection with IDiarkisP2P::GetDisconnectEvent.

      • Added feature to obtain UID of connected peers upon successful or failed P2P connection.

      • Fixed bug causing packets larger than sent Payload to be transmitted during Connect with P2P set as bBuffering=false x no encryption.

      • Fixed crash issue when no logger is specified for P2P connection.

    • Group

      • Deprecated DiarkisGroupEventArgs::GetPayload.

    • Field

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

      • Added Field::Leave() command.

    • Direct Message

      • Deprecated OnConnect event.

      • Fixed incorrect command with DirectMessage Disconnect.

    • Session

      • Added event upon being kicked from the Session.

        • Set events using DiarkisSession::GetKickEvent.

      • Retrieve information for currently participating Sessions by specifying sessionType. Send requests to the server using Session::SendGetSessionInfoBySessionType() and obtain results via callbacks set with Session::GetSessionInfoEvent.

      • Retrieve information for non-participating Sessions by specifying sessionID. Send requests to the server using Session::SendGetSessionInfoBySessionID() and obtain results via callbacks set with Session::GetSessionInfoEvent.

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

      • Changed Invite/Accept specifications. When receiving an Invite from another user, session ID can now be acquired via event callbacks. Instead of joining a Session with Accept following an Invite, specifying the session ID with Session::SendJoin to enter the Session is now recommended. Consequently, Invite event callback arguments have changed, and Session::SendAcceptInvite is planned for deprecation.

      • Added feature for sending arbitrary messages with invitations using Session::SendInvite.

      • Added feature to retrieve participating members of ongoing sessions. Send requests to the server using Session::SendGetMemberIDs and obtain results via callbacks set with Session::GetMemberIDSEvent.

      • Added feature to retrieve participant count of ongoing sessions. Send requests to the server using Session::SendGetNumberOfMembers and obtain results via callbacks set with Session::GetNumberOfMembersEvent.

      • Added API to obtain the execution result of server commands associated with Sessions. On...Response callbacks can receive execution results, allowing detection of errors such as inability to join due to session participant limits.

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

  • Diarkis Module

    • General

      • Added DiarkisInit/DiarkisDestroy functions to the Base class, initializing the logger via DiarkisInit.

      • Separated logger and DiarkisInterfaceBase, modifying so multiple instances of DiarkisInterfaceBase can be managed.

      • Configured to display Diarkis client versions in logs.

      • Added a mode in DiarkisInterfaceBase to output log files to arbitrary locations.

      • Changed implementation such that the event processing thread originally created for each DiarkisInterfaceBase instance becomes singular for the entire runtime.

      • Added types for std library used with custom allocators.

        • Includes Diarkis::StdString, Diarkis::StdVector, etc., used internally within Diarkis with std containers.

        • These types are generally meant for internal library use, visible to apps only when necessary.

      • Added feature to set custom allocators to replace memory allocation processing within Diarkis runtime.

        • Implement custom allocators by inheriting ICustomAllocator, and replace them via Diarkis::SetCustomAllocator().

        • Added sample implementation in main.cpp of the room_broadcast sample.

      • Fixed issues where events from DiarkisTcp/Udp/P2P were not immediately notified to the event processing thread under multiple instances of DiarkisInterfaceBase.

        • This fix involved changing the use of condition_variable for automatically waking threads upon event occurrence, using WaitCondition for event add wait, and altering specifications.

        • The new implementation detects event additions with GetSchedulerAddNotifyEvent on IDiarkisTcp/Udp/P2P, leaving thread behavior control to the app side.

        • Refer to DiarkisInterfaceBase::RuntimeLoop for further details.

      • Unified endpoint retrieval functions to GetEndpoint, allowing server Endpoint acquisition by passing serverType.

      • Enabled UDP server connections using connection information acquired via external servers.

      • Fixed issue where communication was attempted with encryption enabled even when it was disabled on the server-side.

      • Changed to reuse encryption and decryption instances created in constructors.

      • Fixed intermittent delays in event processing on the event processing thread relative to event addition.

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

        • Relocated code from diarkis-module/Extension used in samples to diarkis-module-extension under samples to clarify sample implementation.

      • Enabled the use of the DIARKIS_DEBUG_FEATURES macro to toggle the enablement of debug features provided by the Diarkis Module during builds.

        • As the Diarkis Module builds alongside applications, define DIARKIS_DEBUG_FEATURES during the application's build process to utilize debug features.

      • Added NAT type determination feature.

        • Results of executing DiarkisUdpBase::SendCheckNATType are obtainable via DiarkisUdpBase::OnCheckNATType.

      • Organized Diarkis module coding styles.

        • Consequently, part of the variables exposed as protected in the Diarkis Module had their names changed.

        • Generally, altered to a style adding an underscore "_" suffix to variable names, requiring code style-consistent name changes if build errors occur.

      • Fixed a bug in DiarkisInterfaceBase where undesired directories attempted to be created when specifying LogOutType::FILE_OUT_TO_SPECIFIC_PATH.

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

      • Avoided the use of std::cout within the Diarkis module.

      • Fixed code that invoked new in several places.

        • The new call within httplib used for HTTP access in sample implementations remains unsupported by allocator replacement.

      • Changed MacOS deployment target to 10.13.

      • Organized HTTP access implementations for iOS and Android.

        • Streamlined and unified implementations, removing duplicate code.

    • Room

      • Corrected argument passing to Room::Relay in SendRelay() to rectify replay malfunction.

      • Removed SyncProperties / ObjectSync.

    • P2P

      • Added debug feature to induce hole punch failure.

      • Modified DiarkisP2PBase::ConnectClient to do nothing for repeated calls on already ongoing connections to a uid.

      • Extended DiarkisP2PBase::ConnectClient with arguments to specify P2P timeout and buffering settings.

    • Session

      • Removed DiarkisSessionBase::OnSessionCreate and added DiarkisSessionBase::OnSessionCreateResponse.

        • Checking arguments for DiarkisSessionBase::OnSessionCreateResponse allows verification of successful session creation.

      • Supported the addition of events when kicked from Session.

        • Event processing is viable with DiarkisSessionBase::OnSessionKick.

      • Supported TCP protocol.

    • Group

      • Added function to exit from all joined Groups.

      • Added function to send Broadcast by specifying GroupID.

    • Field

      • Fixed over-calling sync() when calling SendFieldSync() at initialization.

      • Modified to omit Field::SyncInit calls within DiarkisFieldBase.

    • MatchMaker

      • Supported retrieving IssueTicket responses in OnIssueTicketResponse() function.

      • Added SendKick() function.

      • Added event for processing TicketBroadcast responses.

        • Executing DiarkisMatchMakerBase::SendTicketBroadcast and receiving DiarkisMatchMakerBase::OnTicketBroadcastResponse confirms correct command processing.

      • DiarkisMatchMakerbase::OnTicketCancelResponse is invoked if match-making occurs on IssueTicket and the server scales in, discarding the ticket.

      • DiarkisMatchMaker::OnCustomCommandTicketMemberLeave is called when a user matched on a server via IssueTicket departs due to server scale in.

        • This is part of the Diarkis Module Extension implementation; thus, adding the same implementation to the app side when using it is necessary.

      • Removed CatchOnReconnect function due to changes in participation timing upon server reconnection for joining after Host/Search.

    • RPC

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

  • Samples

    • Added session_simple sample.

      • Fixed session_simple sample ensuring Client 3333 waits for Client 4444 to enter the session before broadcasting to prevent failures.

    • Added directmessage_simple sample.

      • Prepared sample code in directmessage_simple sample for setting UDP server connection information acquired via external servers.

    • Added Android version sample.

    • Added iOS version sample.

Last updated

Was this helpful?