TOAST Haste
lastmod 2018-08-17created 2017-01-131 edits
TOAST Haste framework is a pure java implementation of asynchronous game server framework
About
TOAST Haste is an asynchronous game server framework. Developing with TOAST Haste gives you the following advantages.
- Multiple QoS levels
- Multiplexing
- Wi-Fi Cellular handover
- Selective encryption (using Diffie-Hellman algorithm, and AES)
Multiple QoS levels
UDP basically works on a best-effort basis. That is, it does nothing other than distinguish applications by port. So you have to implement packet ordering and retransmission yourself. TOAST Haste implements packet ordering and retransmission, and provides the following QoS levels.
- Reliable sequenced : Guarantees packet order and retransmits on loss.
- Unreliable sequenced : Does not guarantee retransmission on loss, but guarantees the order of the latest packets. Used when retransmission on packet loss is not needed but the latest data must be valid. (e.g. player position)
- Reliable fragmented : Splits data into MTU-sized pieces in advance before sending and receiving, to avoid fragmentation at the IP layer. Useful for sending and receiving large data.
TOAST Haste's QoS implementation was developed based on ENet (MIT License) and parts of the TCP implementation.
Multiplexing
TOAST Haste is designed so you can send and receive on a specified logical Channel. Because processing is done per Channel, you can split data into Channels appropriately by role when sending and receiving. Distributing across Channels appropriately can minimize the HOL blocking problem.
Reliable sequenced(혹은 Reliable fragmented) QoS로 송수신할 경우, 패킷 유실시 Channel 별로 HOL blocking 문제가 발생합니다.
따라서 도메인별로 적절한 채널 분배가 필요합니다.
Wi-Fi Cellular handover
Because TCP is connection-based, it identifies a connection using four pieces of information: Source IP, Source Port, Destination IP, and Destination Port. So when moving between Wi-Fi and Cellular, if the network changes and the IP changes, a new connection must be attempted. TOAST Haste manages connections with its own identification number, so the connection is kept without reconnecting even if the IP changes.
Selective encryption
Encrypting important data is essential not only in games but in every application. In games, however, encrypting every packet makes it hard to guarantee real-time behavior, so encryption should be done as needed. TOAST Haste exchanges preliminary encryption information when a connection is established. After that, the user can perform encryption whenever needed. For reference, TOAST Haste uses the Diffie-Hellman Algorithm for key exchange and AES256 for data encryption.