Overview of Diarkis

Diarkis and Modules

Diarkis is a network middleware for servers and clients designed for online multiplayer games and other applications.

This middleware includes SDKs for both server and client sides (Server: Go, Client: C++ and C#).

For the client side, there are also plugins for Unreal Engine and an SDK for Unity Engine available.

Supported OS

  • Linux

  • Windows

  • MacOS

  • iOS

  • Android

Supported Platforms

  • PS4, PS5

  • Xbox One, Xbox Series X, Xbox Series S

  • Nintendo Switch

  • Steam

Server Architecture Principles

The design philosophy of Diarkis servers emphasizes decentralization and distribution.

Diarkis servers are designed to form a server cluster that operates as a single server. The servers are written 100% in Golang.

This design allows the server cluster to be fault-tolerant (if some servers in the cluster fail, the remaining servers in the cluster are unaffected, and game clients simply need to reconnect to continue) and horizontally scalable (adding or removing servers based on user traffic to scale in/out).

The following diagram shows how a Diarkis server cluster is structured:

  1. Pods are servers.

  2. All user clients with Diarkis clients communicate directly with UDP or TCP Pods.

  3. Diarkis supports both TCP and UDP network protocols.

  4. For UDP, Diarkis implements its own RUDP (Reliable UDP) with retransmission, packet order control, and MTU exceedance capabilities.

Comparison with Traditional Architectures

There are numerous ways to implement similar network server systems without using Diarkis.

Here, we compare one of the most common methods of such systems with Diarkis.

Server Maintenance - Traditional Method

In the traditional method, any changes to the server, such as adding or removing real-time servers, require manual maintenance and adjustments. This can lead to human errors and other potential issues.

On the other hand, Diarkis requires no manual maintenance at all. Everything is handled automatically.

Overall System Fault Tolerance

One of the very difficult problems to solve with the traditional method is the single point of failure in the overall system.

Central control is required to manage the entire system, which in this case would be a database.

The Diarkis server cluster is completely decentralized, with no central control system existing to manage the entire cluster of Diarkis servers. This effectively eliminates the single point of failure problem for the overall system.

Communication from Client to Server

Diarkis primarily uses server relay synchronization with remote clients.

This means that Diarkis servers function as a hub for clients to exchange data.

Communication Between Client and Server

Diarkis primarily uses server relay synchronization with remote clients.

This means that Diarkis servers function as a hub for data exchange between clients.

Another method of synchronization offered by Diarkis is peer-to-peer (P2P) communication.

Clients send and receive data directly peer-to-peer. Unlike the server relay, there is no server between clients. Diarkis functions as a discovery point for clients to communicate directly.

Peer-to-peer communication requires two steps. First, clients exchange their addresses and perform hole punching. Once hole punching succeeds, clients can send and receive packets directly.

Diarkis Client SDK

The Diarkis client is written in C++. There is also a C# interface available. The client SDK includes plugins for Unreal Engine and Unity Engine.

Diarkis Modules

Diarkis comes with built-in modules that game developers can use.

最終更新