You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 13, 2021. It is now read-only.
Currently we connect the client and server with a websocket using the warp crate. While this works, it requires us to effectively build our own RPC layer on top of the websockets API, which results in a lot of boilerplate and cumbersome code. It's especially painful right now because the client is using a C# websocket implementation, which means there's a lot of boilerplate around passing messages between Rust and C#.
Instead, we should move the client/server connection code fully into Rust and use tarpc as our RPC layer. This would greatly simplify client/server communication, and would allow us to remove the gross websocket package we're currently using.
The text was updated successfully, but these errors were encountered:
Right now tarpc doesn't support two-way communication between client and server: The client can send the server requests, but the server can't send the client requests/messages. This is a potential problem for us, since the match flow requires the server be able to send match updates to the client. I'd like to avoid using something like long polling to accomplish this, and in the long-run we're going to want our network framework to support proper server-sent events in some for or another.
As such, I'm tweaking the focus of this ticket to primarily be about moving the communication layer into the shared Rust code. Doing this with tarpc would be ideal, but even if we keep using websockets it will still be better to do so from Rust than from C#.
Currently we connect the client and server with a websocket using the warp crate. While this works, it requires us to effectively build our own RPC layer on top of the websockets API, which results in a lot of boilerplate and cumbersome code. It's especially painful right now because the client is using a C# websocket implementation, which means there's a lot of boilerplate around passing messages between Rust and C#.
Instead, we should move the client/server connection code fully into Rust and use tarpc as our RPC layer. This would greatly simplify client/server communication, and would allow us to remove the gross websocket package we're currently using.
The text was updated successfully, but these errors were encountered: