By using AWS re:Post, you agree to the Terms of Use
/RealTime Servers and Reliable UDP/

RealTime Servers and Reliable UDP

0

Hi there,

https://docs.aws.amazon.com/gamelift/latest/developerguide/realtime-howitworks.html

The RealTime Servers documentation said

Communication between a Realtime server and connected game clients uses two channels: a TCP connection for reliable delivery and a UDP channel for fast delivery. When creating messages, game clients choose which protocol to use depending on the nature of the message. Message delivery is set to UDP by default. If a UDP channel is not set up or not available, all messages are sent using TCP as a fallback.

It didn't mention if the UDP is a Reliable UDP implementation or not. If not, is there a plan to introduce a RUDP protocol in the future?

asked 8 months ago11 views
8 Answers
0

No, RTS doesn't use Reliable UDP. It uses dgram provided by NodeJS (https://nodejs.org/api/dgram.html).

Could you help me understand your use case for this? Do you have any data to show that TCP or UDP are insufficient for what you are trying to do? With these info, I can work with the product team and send in a feature request.

answered 8 months ago
0

Well, any genre that is latency-sensitive. For example, the real-time strategy genre.

I'm from a Unity background that almost every popular network solutions offer RUDP as the preferred network protocol. I'd like to borrow the concept of Ruffles (a reliable UDP library of Unity):

  • Reliable : All messages are guaranteed to be delivered, the order is not guaranteed, duplicates are dropped. Uses a fixed sliding window.
  • ReliableSequenced : All messages are guaranteed to be delivered with the order also being guaranteed, duplicates are dropped. Uses a fixed sliding window.
  • Unreliable : Delivery is not guaranteed, nor is the order. Duplicates are dropped.
  • UnreliableSequenced : Delivery is not guaranteed but the order is. Older packets and duplicate packets are dropped.

The most useful one is the first "reliable" type.

The problem is RUDP is just a layer on top of UDP. So there's no gold standard or dominated cross-platform solution there.

answered 8 months ago
0

Thanks for the details @REDACTEDUSER

Currently we are using DTLS to provide encryption in-flight over UDP. Do you know if RUDP has something similar? Could you recommend some popular RUDP libraries that are tried-and-true? Could you also share examples of your aforementioned network solutions which use RUDP?

GLIFT-15961

answered 8 months ago
0

Low-level RUDP Libraries

NameLanguageEncryption
RufflesC#n/a
LiteNetLibC#AES or XOR
Lidgren.NetworkC#AES
Hazel-Networking forkC#DTLS
ENetCn/a
ENet-CSharpC#n/a
KCPCn/a

Ruffles - https://github.com/MidLevel/Ruffles

LiteNetLib - https://github.com/RevenantX/LiteNetLib

Lidgren.Network (maintain mode) - https://github.com/lidgren/lidgren-network-gen3

Hazel-Networking (fork) - https://github.com/willardf/Hazel-Networking

ENet - https://github.com/lsalzman/enet

ENet-CSharp - https://github.com/nxrighthere/ENet-CSharp

KCP

High-Level Network Solution that supports RUDP

NameRUDPRUDP Library
MLAPIYvia Ruffles
UNET/Mirror NetworkingYvia Ignorance (an ENet wrapper)
DarkRift 2non-officialvia EnetListener
PhotonYadopt from an early version of ENet

Well, asymmetric cryptography is not the focus of these RUDP libraries, very few implemented DTLS.

For reputation

  • ENET is the well-used one but lacks documentation.
  • KCP seems promising in the Chinese community.
  • Hazel-Networking (fork) is maintained by the author of Among Us (and the game uses it).
answered 8 months ago
0

Thanks for the detailed list! Those are definitely convincing.

If we pull in this feature, we would probably add one of the C# libraries in the C# RTS client; however, on the server side, we'd have to use NodeJS. It's shame that there is no widely used or actively maintained RUDP NodeJS library as far as I see. I found these 2: https://github.com/shovon/node-rudp, https://github.com/Raulmsm/RUDP. The former is slightly more promising and could be looked into.

Last question that could help greatly in prioritization, is there any research that shows concrete numbers on how much improvements RUDP brings over UDP and TCP, e.g. in areas like throughput / packet loss rate? (No big deal if you don't know, we'll do this research ourselves, but it seems like you are an expert in this so doesn't hurt to ask :) )

answered 8 months ago
0

For benchmark

For cross-platform, since RUDP is just a custom layer on top of UDP, different implementations are not compatible with each other. To get a cross-platform solution you may have to port one implementation to node, vice versa.

  • ENET is written in C, so it can be used anywhere with a wrapper layer.
  • KCP is also written in C and has both C# port and node wrapper.
  • Another idea is to use edge.js to integrate .NET DLL with node, then both server and client can stick with the same managed .NET solution.

Not really an expert, hope this information help.

answered 8 months ago
0

Actually there is a RUDP lib for Nodejs. Please check out geckos.io: https://github.com/geckosio/geckos.io

From the Geckosio page: Version 2 has huge performance improvements. I switched from wrtc to node-datachannel, which is much lighter and faster compared to wrtc.

answered 7 months ago
0

I think GameLift Realtime Server is looking for a cross-platform solution.

answered 7 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions