This repository has been archived by the owner on Nov 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Rust Concurrent Cross-Platform TCP Server #1
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Restyle Working experimental tcp
Restyle Remove cxx dependency
Restyle Remove cxx dependency
Remove cxx dependency
Restyle Cross platfotm concurrent tcp
Cross platfotm concurrent tcp
AOx0
changed the title
Working experimental tcp
Rust Concurrent Cross-Platfirm TCP Server
Sep 23, 2022
AOx0
changed the title
Rust Concurrent Cross-Platfirm TCP Server
Rust Concurrent Cross-Platform TCP Server
Sep 23, 2022
Restyle Rust Concurrent Cross-Platform TCP Server
Restyle Rust Concurrent Cross-Platform TCP Server
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have a working Rust-based TCP server that communicates all data to C++ Runtime for processing.
With this PR we get a pretty clean interface to communicate with any inbound TCP connection. Thus, emulating how a real DB works.
Is as simple as reading with
string TcpServer::recv()
, prepare a response and send it withvoid TcpServer::send(string)
The response time does not matter, the Rust TCP server "asynchronicity" makes all waiting messages to eventually arrive, although we could improve the Rust and C++ to make it concurrent, time will say.
This makes it easy for us to access from a terminal to the database or even add more layers like an HTTP server.
The following is an example of a query:
A more in-depth diagram of what happens would look like follows: