v1.0
Overview
Diarkis has finally released version 1.0, marking three years since its initial release!
Main Updates
The Field has been revamped
Now supports syncing across Grids if it's within the Field of Vision.
Optimizations have been made to reduce server load.
Various bugs have been fixed.
IDiarkisField::SyncInit()
has been deprecated and replaced withIDiarkisField::Join()
.The
DiarkisField::Leave()
command has been added.
A new Session module has been introduced.
Server
Compared to v0.9, we've improved performance by optimizing internal communications, refactoring internal code, and strengthening test scenarios to enhance quality further.
Core
Added
DiarkisExec
package to simplify server setup.Added a mechanism to cache MARS addresses for a set period in the mesh module.
Changed package names from
roomSupport
andgroupSupport
to camel case:RoomSupport
,GroupSupport
.Added an echo handler.
If the struct given to the logging function implements the
String()
interface, it will output the return value ofString()
.Disabled dual-stack when the Diarkis server obtains its own IP address.
Locked mesh transmission callbacks to prevent fatal issues.
Fixed concurrent iteration and map writing in the vault to prevent fatal issues.
Added a context to notify timeouts for
OnStop
andOnTerminate
.
Direct Message
Fixed DM user disconnection to correctly send disconnection messages with the correct version and command.
Dive
Added
IncrBy
andIncrByEx
.Added
OnReady
.Changed Dive's data type from
interface{}
to[]byte
.Fixed an issue where Dive's byte fixed size was too small.
Fixed a problem preventing Dive module shutdown.
Field
Modified the Field algorithm to improve performance and availability.
Fixed custom field filters to be executed on the front server instead of the storage server.
Improved performance of the Field module.
Fixed an issue where the Leave command ID for Field used the same command ID as room chat.
Added a Join command, enabling Sync, Disappear, and Leave to function following Join.
Group
Fixed an issue related to Join.
MatchMaker
Added
onMatchedTicketTimeout
to handle member ticket timeouts.Updated ticket properties.
Mesh
Fixed an issue with
sharedData
updates when the key was full.Stopped the announcer after the termination task.
Metrics
Fixed packet count metrics and added packet size metrics.
Puffer
Added support for property comments and case sensitivity improvements for JSON parsing.
Ensured the protocol name is unique per package.
Added constants
Ver
andCmd
to protocol code.Changed creation file permissions from 755 to 644.
Room
Fixed an issue where a room would not empty if a user unexpectedly disconnected and reconnected with the same user ID.
Prevented duplicate room IDs.
Changed so that
UpdateProperties
andIncrProperty
do not update the room's TTL.Fixed lock leakage issues with mutex.
Changed log level of room message/announce.
Fixed parameter names for
SetOnMigrated
callback.
Session
Prevented sessions from retaining invite data per user.
Added session commands to obtain member ID and member count when specifying SessionType.
Prevented race conditions with
setTypeByUser
andremoveTypeByUser
.
Go Client
Added Debug command.
Client
Diarkis Runtime
General
Fixed an issue where, upon disconnecting from a UDP server, disconnection could occur without sending a Fin packet; now, a Fin packet is always sent upon disconnection.
Removed
OnReset()
from each module and replaced it withDestroy()
.Destroy()
is now called internally during the destructor of each module.Consequently, deleted UDP / TCP Reset events.
Added error code and error message as arguments in callbacks for error handling; retrieve error information with
GetErrorCode
andGetErrorMessage
on the instance passed as an argument.Added Trace log level.
Added a develop build library.
debug
debug build
develop
release build with log output enabled
release
release build with log output disabled, minimizing text data such as error messages.
Note the change in the library file placement path.
Modified not to use
std::cout
within the runtime.Fixed code that was pointed out as Container overflow exception by Address Sanitizer in Visual Studio.
Added Privacy Manifests file for IOS environment to package.
Located in
platforms/ios/PrivacyInfo.xcprivacy
.
Fixed a bug when deleting events within callback events.
UDP
Changed error handling for certain reliable send methods that allowed sending data exceeding 10,000 bytes.
Adjusted RUDP retransmission intervals to increase incrementally with attempts.
Fixed an issue where RUDP retransmissions could delay beyond the value set by
IDiarkisUdp::SetSendRetryInterval
.Corrected typo in
DiarkisConnectionEventArgs::GetReconnect
.Changed to recreate the socket before executing disconnection processing when send retry times out with socket recreation feature enabled.
MatchMaker
Deprecated
DiarkisMMHostEventArgs::GetPayload
.
P2P
Fixed disconnection-related errors.
Improved hole punching process.
Adjusted communication interval for hole punching to increase incrementally with attempts.
Changed default timeout for P2P connections from 10 seconds to 5 seconds.
Added explicit disconnection processing feature to P2P module.
Execute disconnection using
IDiarkisP2P::Disconnect
, and receive disconnection event notifications withIDiarkisP2P::GetDisconnectEvent
.
Added functionality to obtain the connection partner's UID upon successful or failed P2P connection.
Fixed bug in P2P with
bBuffering=false
and no encryption causing larger packets than sent payload.Fixed crash when a logger was not specified at P2P connection.
Group
Deprecated
DiarkisGroupEventArgs::GetPayload
.
Field
Deprecated
DiarkisField::SyncInit
and addedDiarkisField::Join
.Added
Field::Leave()
command.
DirectMessage
OnConnect
event has been deprecated.Fixed DirectMessage Disconnect to send the correct command.
Session
Added event for when kicked from Session.
Use
DiarkisSession::GetKickEvent
to set events.
Obtain information on currently joined Session by specifying
sessionType
. Request from the server withSession::SendGetSessionInfoBySessionType()
, and set the result callback withSession::GetSessionInfoEvent
.Obtain information on non-joined Sessions by specifying
sessionID
. Request from the server withSession::SendGetSessionInfoBySessionID()
, and set the result callback withSession::GetSessionInfoEvent
.Deprecated
Session::SendGetMemberIDs()
/Session::SendGetNumberOfMembers()
.Changed Invite/Accept specifications, modifying event callback to obtain session ID when an Invite is sent by another user. Session participation is now recommended using
Session::SendJoin
with session ID specified. This update changes the callback argument of the Invite event, andSession::SendAcceptInvite
is planned for deprecation.Added function to send arbitrary messages with invites using
Session::SendInvite
.Added functionality to retrieve participating members of current sessions. Request from the server with
Session::SendGetMemberIDs
, and set the result callback withSession::GetMemberIDSEvent
.Added functionality to retrieve the number of participating members in current sessions. Request from the server with
Session::SendGetNumberOfMembers
, and set the result callback withSession::GetNumberOfMembersEvent
.Added API to obtain server execution results of session-related commands. Capture results of execution in
On...Response
callbacks, allowing detection of errors such as exceeding the session's participant limit.Fixed an issue where
Session::GetSessionIDByType()
returned a UID instead of session ID after anOnJoin
event.
Diarkis Module
General
Added
DiarkisInit/DiarkisDestroy
functions to the Base class, modifyingDiarkisInit
to initialize the logger.Separated logger from
DiarkisInterfaceBase
and modified to manage multiple instances ofDiarkisInterfaceBase
.Added functionality to display the version of the Diarkis client in the log.
Added a mode to output log files to an arbitrary location in
DiarkisInterfaceBase
.Consolidated event processing threads to one runtime-wide thread instead of creating one per
DiarkisInterfaceBase
instance.Added types for using std containers with a custom allocator for the std library.
Includes
Diarkis::StdString
,Diarkis::StdVector
, etc., and uses these internal types for std containers within Diarkis.These types are primarily intended for internal library use, only visible from the app side where necessary.
Added functionality to set custom allocators to replace memory allocation processes within the Diarkis runtime.
Implement custom allocators inheriting
ICustomAllocator
and replace allocators withDiarkis::SetCustomAllocator()
.Sample implementation added to
main.cpp
ofroom_broadcast
sample.
Fixed a bug where events from
DiarkisTcp/Udp/P2P
might not be immediately notified to the event processing thread when multipleDiarkisInterfaceBase
instances exist.In fixing this bug, removed using
condition_variable
for automatically waking up threads on IDiarkisTcp/Udp/P2P event occurrences and changed to using WaitCondition for event addition waiting.The new implementation involves detecting event additions with
IDiarkisTcp/Udp/P2P::GetSchedulerAddNotifyEvent
, allowing the app side to control thread behavior.Refer to
DiarkisInterfaceBase::RuntimeLoop
implementations for details.
Unified endpoint retrieval function names to
GetEndpoint
, allowing server endpoint retrieval by passingserverType
.Enabled connection to a UDP server using server connection information obtained via external servers.
Fixed a bug where, even with server-side encryption disabled, attempts were made to communicate with encryption enabled.
Modified to reuse instances for encryption and decryption created in the constructor.
Fixed rare event handling delays in the event processing thread, sometimes surpassing the timing of event processing addition.
Moved code from
diarkis-module/Extension
to a new location.Moved used sample code in
diarkis-module/Extension
todiarkis-module-extension
under samples and clarified it as sample implementation.
Changed to use the
DIARKIS_DEBUG_FEATURES
macro for enabling/disabling debug features provided by Diarkis Module during builds.As Diarkis Module builds with the application, defining
DIARKIS_DEBUG_FEATURES
during the application's build enables debug features.
Added NAT type detection functionality.
When
DiarkisUdpBase::SendCheckNATType
is executed, obtain results withDiarkisUdpBase::OnCheckNATType
.
Cleaned up the coding style of the Diarkis module.
Following this, changed some variable names publicly exposed as
protected
in Diarkis Module.Generally switched to a style where an underscore is added to the end of variable names; modify variable names according to the coding style if build errors occur in the application.
Fixed a bug where
LogOutType::FILE_OUT_TO_SPECIFIC_PATH
inDiarkisInterfaceBase
attempted to create a log folder in an unintended path.Unified source code text format to UTF-8 with BOM(LF).
Modified not to use
std::cout
in Diarkis module.Fixed code where
new
was called.Note that in
httplib
used for HTTP access in the sample implementation,new
is called but is not allocator replacement compliant.
Changed deployment target for MacOS to 10.13.
Streamlined HTTP access implementations for iOS and Android.
Consolidated overlapping code and unified implementations.
Room
Fixed incorrect arguments passed to Room::Relay in
SendRelay()
, causing Relay to malfunction.Removed
SyncProperties
/ObjectSync
.
P2P
Added a debug feature to fail hole punching.
Modified
DiarkisP2PBase::ConnectClient
to do nothing for calls to an already initiateduid
.Added arguments specifying P2P timeout and buffering settings to
DiarkisP2PBase::ConnectClient
.
Session
DiarkisSessionBase::OnSessionCreate
was removed, andDiarkisSessionBase::OnSessionCreateResponse
was added.Allows checking if the session was successfully created by checking arguments in
DiarkisSessionBase::OnSessionCreateResponse
.
Supported adding events for when kicked from Session.
Process events with
DiarkisSessionBase::OnSessionKick
.
Support for TCP protocol.
Group
Added function to exit from all currently joined Groups.
Added function to send Broadcast specifying GroupID.
Field
Fixed a bug calling
sync()
duplicates whenSendFieldSync()
is called initially.Made the call to
Field::SyncInit
unnecessary, changing it not to be called withinDiarkisFieldBase
.
MatchMaker
Supported obtaining responses to IssueTicket with
OnIssueTicketResponse()
.Added
SendKick()
function.Added an event to process TicketBroadcast responses.
After executing
DiarkisMatchMakerBase::SendTicketBroadcast
, receivingDiarkisMatchMakerBase::OnTicketBroadcastResponse
allows confirmation of correct command processing.
DiarkisMatchMakerBase::OnTicketCancelResponse
is triggered if a match occurs on IssueTicket and the ticket is discarded due to server scale-in.DiarkisMatchMaker::OnCustomCommandTicketMemberLeave
is triggered if a user matched on IssueTicket leaves the ticket due to server scale-in.This is the implementation on the Diarkis Module Extension side, so add the same implementation on the app side if used.
Removed CatchOnReconnect function following changes in participation timing on server reconnections during joining room behind Host/Search.
RPC
Changed
RPCAll()
,RPCMany()
,RPCOne()
to virtual functions.
Samples
Added
session_simple
sampleIn the
session_simple
sample, 3333 client now waits for 4444 client to enter the session before broadcasting, fixing prior failure.
Added
directmessage_simple
sampleProvided sample code in
directmessage_simple
to obtain and set UDP server connection information via an external server.
Added Android sample
Added iOS sample
Last updated