All Projects → BeRo1985 → Rnl

BeRo1985 / Rnl

Licence: zlib
RNL - Realtime Network Library - The opensource reliable UDP network library

Programming Languages

pascal
1382 projects
delphi
115 projects

Projects that are alternatives of or similar to Rnl

Gameproject3
游戏服务器框架,网络层分别用SocketAPI、Boost Asio、Libuv三种方式实现, 框架内使用共享内存,无锁队列,对象池,内存池来提高服务器性能。还包含一个不断完善的Unity 3D客户端,客户端含大量完整资源,坐骑,宠物,伙伴,装备, 这些均己实现上阵和穿戴, 并可进入副本战斗,多人玩法也己实现, 持续开发中。
Stars: ✭ 655 (+1010.17%)
Mutual labels:  games, game-server, server
Gophergameserver
🏆 Feature packed, easy-to-use game server API for Go back-ends and Javascript clients. Tutorials and examples included!
Stars: ✭ 61 (+3.39%)
Mutual labels:  game-server, server, real-time
Gun
An open source cybersecurity protocol for syncing decentralized graph data.
Stars: ✭ 15,172 (+25615.25%)
Mutual labels:  realtime, peer-to-peer, encryption
Pss
This is a based plug-in framework that provides cross-platform IO and logically separated plug-in services.
Stars: ✭ 219 (+271.19%)
Mutual labels:  game-server, server, udp
Laravel Parse
A Parse SDK bridge for Laravel 5
Stars: ✭ 116 (+96.61%)
Mutual labels:  server, real-time, realtime
Realtime Server
A realtime dedicated game server ( FPS / MOBA ). 一个实时的专用游戏服务器.
Stars: ✭ 358 (+506.78%)
Mutual labels:  game-server, real-time, realtime
Applozic Android Sdk
Android Real Time Chat & Messaging SDK
Stars: ✭ 611 (+935.59%)
Mutual labels:  real-time, realtime
Maskbook
The portal to the new, open internet. ([I:b])
Stars: ✭ 691 (+1071.19%)
Mutual labels:  peer-to-peer, encryption
Yolact edge
The first competitive instance segmentation approach that runs on small edge devices at real-time speeds.
Stars: ✭ 697 (+1081.36%)
Mutual labels:  real-time, realtime
Peergos
A p2p, secure file storage, social network and application protocol
Stars: ✭ 895 (+1416.95%)
Mutual labels:  peer-to-peer, encryption
Kbengine
A MMOG engine of server.
Stars: ✭ 4,714 (+7889.83%)
Mutual labels:  game-server, server
Cowyo
A feature-rich wiki webserver for minimalists 🐮 💬
Stars: ✭ 711 (+1105.08%)
Mutual labels:  server, encryption
Stl.fusion
Get real-time UI updates in Blazor apps and 10-1000x faster API responses with a novel approach to distributed reactive computing. Fusion brings computed observables and automatic dependency tracking from Knockout.js/MobX/Vue to the next level by enabling a single dependency graph span multiple servers and clients, including Blazor apps running in browser.
Stars: ✭ 858 (+1354.24%)
Mutual labels:  real-time, realtime
Libzt
ZeroTier Sockets - Put a network stack in your app
Stars: ✭ 486 (+723.73%)
Mutual labels:  udp, peer-to-peer
Glass Isc Dhcp
Glass - ISC DHCP Server Interface
Stars: ✭ 486 (+723.73%)
Mutual labels:  server, realtime
Nakama
Distributed server for social and realtime games and apps.
Stars: ✭ 5,293 (+8871.19%)
Mutual labels:  game-server, realtime
Orbit Db Http Api
A HTTP API Server for the OrbitDB distributed peer-to-peer database
Stars: ✭ 17 (-71.19%)
Mutual labels:  server, peer-to-peer
Realtime Newsapi
Financial News Aggregator - Real Time & Query API for Financial News
Stars: ✭ 34 (-42.37%)
Mutual labels:  real-time, realtime
Freertos Cell
FreeRTOS for Jailhouse Cells
Stars: ✭ 31 (-47.46%)
Mutual labels:  real-time, realtime
Rtb
Benchmarking tool to stress real-time protocols
Stars: ✭ 35 (-40.68%)
Mutual labels:  real-time, realtime

Warning

RNL including its cryptography code is non-audited so far, thus RNL is only intended for real-time games and multimedia applications without processing of any with critical data, but not for serious applications with critical data!

Description

RNL stands for "Realtime Network Library"

RNL is an UDP-based network library for real-time applications and games, inspired by ENet, yojimbo, libgren, and so on.

RNL is designed around common patterns used in real-time games, which are simulation bound, not I/O bound, and completely stateful, so async IO does not make a lot of sense. Thus the RNL core design is single-threaded, not multi-threaded. But you can use multiple TRNLHost instances inside multiple different threads (one to very few instances per one thread), so that you can host multiple network game matches at the same machine, as long as this one machine is strong and fast enough for hosting multiple network game matches at the same time.

And at game client side, the whole network stuff should run, if possible, in an own (also if possible, CPU-core-pinned) thread, for possible few interferences and other similiar problems. (offtopic: the same also applies to the audio thread, unless one likes possible audio buffer underrun issues and so on, when it did not get enough CPU time at the right time points. :-) )

And for larger games with masses of clients in a single game world, you should use several subdivided TRNLHost instances, so that each TRNLHost must handle only few connected clients, in multiple threads and that in turn on multiple physical dedicated servers, which also in turn may communicate with each other to mimic the impression of a single very large game world. At least a single TRNLHost instance is rather designed for typical low client numbers, as these are the typical case for egoshooters, racing games, and so forth. Or in other words for large game worlds with masses of clients: Divide and conquer (for example with partially sector-border overlapping game world sectors for just as an example of an divide-and-conquer concept idea)

Support me

Support me at Patreon

Features

  • Mostly fully object oriented code design
  • IPv6 support
  • Cross platform
    • Windows (with FreePascal and Delphi)
    • Linux (with FreePascal)
    • *BSD (with FreePascal)
    • Android (with FreePascal and Delphi)
    • Darwin (MacOS(X) and iOS) (with FreePascal and Delphi)
  • UDP-based protocol
  • Sequencing
  • Channels
    • With following possible free configurable channel types:
      • Reliable ordered
      • Reliable unordered
      • Unreliable ordered
      • Unreliable unordered
  • Reliability
  • Fragmentation and reassembly
  • Aggregation
  • Adaptability
  • Portability
  • Possibility of using a peer-to-peer model or even a mixed peer-to-peer and client/server hybrid model instead only a pure client/server model, and of course also of a classic client/server model
  • Cryptographically secure pseudo-random number generator (CSPRNG)
    • Based on arc4random but with ChaCha20 instead RC4 as the basic building block
    • Multiple sources of entropy (because you should never trust a single source of entropy, as it may have a backdoor)
      • Including usage of the rdseed/rdrand instructions on newer x86 processors as an optional additional quasi-hardware-based entropy source, if these instructions are supported by the current running processor
  • Mutual authentication
    • Based on a Station-to-Station (STS) like protocol, which assumes that the parties have signature keys, which are used to sign messages, thereby providing minification security against man-in-the-middle attacks, unlike the basic plain Diffie-Hellman method without any so such extensions.
    • Long-term private/public keys are ED25519 keys and are used only for signing purposes
  • Forward secrecy using elliptic curve ephemeral Diffie-Hellman (curve 25519)
    • The consequence of this along other facts is that each connection always has new different private and public short-term keys on both sides and therefore also new shared secret short-term keys
    • Short-term private/public keys are X25519 keys and the short-term shared secret key is using only for AEAD-based ciphering purposes
  • Authenticated Encryption with Associated Data (AEAD) packet encryption
    • Based on ChaCha20 as cipher and Poly1305 as cryptographic message authentication code
  • Replay protection of application packet data
    • Based on various protection mechanisms at the connection establishment phase and encrypted packet sequence numbers
  • Delayed connection establishment mechanism as an additional attack surface minification mechanism
  • Connection and authentication tokens (as an optional option, where you should have a separate out-of-band communication channel, for example a HTTPS-based master backend for to generate and handle this stuff) as an additional attack surface minification mechanism against DDoS amplification attacks
    • Connection token are transferred in clear text, so that they are checked in a fast way at the first ever data packet from a connection attempt, without the need to decrypt the connection token first before it is possible to check the token, so in order to save CPU time in this point. This option is primarily for use in against DDoS amplification attacks, which means that the server will not respond straight away if the connection token does not match at the first ever data packet from a connection attempt, and thus DDoS amplification attacks would simply go into the nothing. Consequently, these tokens should only be valid for a short period of time, which also applies to the master backend side of your infrastructure.
    • Authentication tokens are transferred encrypted, after the private/public key exchange, shared secret key generation, etc. were successfully processed. Authentication tokens, in contrast to the connection token, are NOT a countermeasure against DDoS-category attacks, but rather authentication tokens are, as the name suggests, only for separate out-of-band communication channel authentication purposes, in other words, as additional protection against unauthorized connections, where you can check it in more detail on your master backend side of your infrastructure, before the "client" can connect to the real server, where all the real action happens.
  • Connection attempt rate limiter
    • Configurable with two constants, burst and period
  • Configurable bandwidth rate limiter
  • Optional virtual network feature (for example for fast network-API-less local loopback solution for singleplayer game matches, which should be still server/client concept based)
  • Network interference simulator (for example for testcases and so on)
    • Configurable simulated packet loss probability (each for incoming and outgoing packets)
    • Configurable simulated latency (each for incoming and outgoing packets)
    • Configurable simulated jitter (each for incoming and outgoing packets)
    • Configurable simulated duplicate packet probability (each for incoming and outgoing packets)
  • Dynamic connection challenge request response difficulty adjustment mechanism
    • Configurable with a factor value
    • Based on history-smoothing-frames-per-second-style determination mechanism, but just instead frames per second, connection attempts per second
  • More compression algorithms as choices
    • Deflate (a zlib bit-stream compatible LZ77 and canonical Huffman hybrid, only fixed-static-canonical-huffman in this implementation here on compressor side, but the decompressor side is full featured)
    • LZBRRC (a LZ77-style compressor together with an entropy range coder backend)
    • BRRC (a pure order 0 entropy range coder)
  • CRC32C instead CRC32 (without C at the end)
  • And a lot of more stuff . . .

Planned features (a.k.a Todo) in random order of priorities

  • TODO

General guidelines for code contributors

General guidelines for code contributors

License

zlib License

IRC channel

IRC channel #rnl on Freenode

Thanks

  • Thanks to Lee Salzman for ENet as inspiration for the base API design implementation ideas
  • Thanks to Glenn Fiedler for inspiration for security-oriented implementation ideas
  • Thanks to Sergey Ignatchenko ("No Bugs" Hare) for inspiration also for security-oriented implementation ideas
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].