-
Notifications
You must be signed in to change notification settings - Fork 310
Code Improvements (WIP) #178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…r into its own isolated components.
…er listner handler and user count listener handler. Setup Network.Smtp and Network.Http to also make way for future improvements
…n stopping tcp server.
|
Caution: This guy has a known history of intentionally adding malicious code into Mir3 projects. Review all changes with heightened scrutiny. |
|
Thanks for your input lil dude. Please review to your hearts desire, must be a lot of malicious code in the tcp logic.. 😄 |
…ogger classes based on individual function. Introduced Scheduler implementation to retain shared thread between logging functions (for resource efficiency)
Latest Changes & Improvements: LoggingNOTE: All existing user-facing functionality should be unchanged. If something looks off please let me know and i'll look into it. High Level TLDR:
Low Level TLDR:
Further considerations:
|
|
For disclosure I had a couple of attempts at refactoring the DB logic, moving its distributed logic & responsibility to a repository style pattern. Unfortunately taking the minimalistic refactoring approach with the DB logic rendered a convoluted and complex outcome I wasn't happy with so I've ditched those changes and decided to think about the components and their responsibilities a bit more before I attempt to take that challenge on again. It may be the case that a slight overhaul of those components is necessary. Initial Analysis
Thoughts:
Considerations:
To Be Considered:
|
Changes & Improvements PR
WORK IN PROGRESS
DISCLAIMER
This PR is a work in progress it is by no means finished yet. I will aim to always push my changes in a working state so that it's readily available from a merging perspective if at any point you wish to adopt these changes. A running change log is being posted when possible. Please review all changes carefully.
Context
This PR is here to raise awareness of the changes i'm making and to share the time and effort i'm actively putting into the source code right now. These improvements will hopefully make the code more clean, readable and consistent using industry standard coding practices & principles like SOLID and DRY. There is by NO means any expectation or commitment for this to be accepted by the community & maintainers of this source.
Any questions, comments or suggestions please feel free to post below. Please refrain from posting anything unrelated to the goal in this PR. I will not be taking on feature requests here.
High Level TLDR
TcpListenermoved fromSEnvirinto dedicatedTcpServer.SEnvirand into dedicatedIListenerHandlerimplementations based on their individual responsibility.TcpClient//UserConnectionpreviously known asSConnectionmoved out ofSEnvirand intoUserConnectionService. Several utility functions added to support this transition including a dedicated IpAddrManagementService, UserConnectionFactory, UserBroadcastService.LowLevel TLDR
TcpListener.TcpListenerbehaviours.ListenerHandlercurrently encapsulates a number of the existing Listeners lifecycle state. There are two implementations of this to maintain existing functionality.UserConnection(previously known asSConnections).UserConnectionFactory : AbstractConnectionFactorywas overengineered with the intention to re-use the Abstract on UserCount (which later was deemed unnecessary.Further Considerations: