Open
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Malachi Thomas Simple Chat
Demo
Notes
This project was used as a learning opportunity of both the
tokioandratatuicrates as I have been meaning to try working with them. Using theratatuicrate helped to force separation between the frontend and the backend of the client which allowed for better integration testing.There are fewer integration and unit tests than I would like, but that results from my unfamiliarity with
tokioand the strategies that could be used to split out the non-IO functionality for more helpful unit tests. However, due to being a very IO-heavy application, it is expected that the unit tests would be relatively light.Selected Improvements
I am using the
anyhowcrate for error handling and there are a few instances where errors may cause the client or server to exit prematurely. Better error handling in general is needed, and a fewunwrap()calls were made in places where I was not sure about the mechanism I would like to use to handle the errors.Logging is also not a strong point of this and would have benefited from adding the
tracingcrate, but adding the trace information to async applications is another thing I would need to take time to learn and the basiceprintln!()got me some helpful logs for debugging.