MiniGod / node-gbxremote

JavaScript port of GbxRemote to communicate with ManiaPlanet / TrackMania servers with Node.js.
MIT License
11 stars 4 forks source link

Pipelining #1

Closed MiniGod closed 8 years ago

MiniGod commented 11 years ago

ManiaPlanet Server does not support pipelining. Ie: The server will close the connection (no errors) if a query is sent before the response for the previous query is received. Sending too many queries (too fast) will therefore not work.

Solution? Stack up queries. Then on process.nextTick(), do a system.multicall, and empty the stack. If it's only one query in the stack, do a normal query (to minimize overhead).

EDIT: That solution will only work if the response for the previous query is received. After this, you can still use the stack, but instead of doing the multicall and emptying of the stack on nextTick, it has to be on data. (all data loaded, or just something?)

EDIT 01.04.2013: I think I was wrong about ManiaPlanet not supporting pipelining. However, stacking up queries, and sending them on next tick with system.multicall would most likely improve performance. @gissues:{"order":50,"status":"backlog"}

MiniGod commented 8 years ago

Why have I not closed this yet, lol. The server clearly supports pipelining already.