beyond-all-reason / teiserver

Middleware server for online gaming
https://www.beyondallreason.info/
MIT License
57 stars 53 forks source link

[Feature]: spring-protocol: message batching #360

Closed FIr3baL closed 1 month ago

FIr3baL commented 3 months ago

Describe the Feature

Spring protocol allows batching of commands by "\n". Gather servermessges for each client for a certain amount of time and send them concatenated to the client. E.G. 0,5 sec.

Expected Behavior

Overall reduction of network traffic. Less tcp-overhead compared to tcp-content. Less packages in total. On client-side one would see a little delay for server reactions to sent commands by clients.

Screenshots

No response

Additional context

A random log showed me between 3-15 servermessages per second, which came in as 1 package per message. The only exception to this behaviour, known by me, are all these thousand infos after a login success, which are already batched.

This idea came to my mind during analysis of client -> server communication. My knowledge is too limited to recommend this change,

L-e-x-o-n commented 1 month ago

While this is a good idea, I think it's not worth doing for Spring protocol which will be replaced with Tachyon.

FIr3baL commented 1 month ago

That's fine.