-
Notifications
You must be signed in to change notification settings - Fork 63
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
[WIP] Refactor app management and routing logic. #310
Closed
Closed
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
…ture/manager-app-endpoints
- Split app module into /internal/appnet and /pkg/app. - Renamed app-management components for better readability. - Simplified app-init process: now using sub-commands from app instead of InitFrame. - Added another pair of unix pipes between app and it's host.
- encoding/gob is now used instead of json to improve performance. - refactored 'appnet.Protocol' to have more consistent naming. - updated tests for '/pkg/app'.
- Updated tests in '/internal/appnet', '/pkg/app' and '/pkg/router' modules. - Fixed bug where (appnet.Protocol).Call() hangs when the associated appnet.HandlerFunc responds with error.
- Merge branch 'mainnet' into 'feature/manager-app-endpoints'. - Updated tests to accommodate changes from merging.
- Fixed race condition in /pkg/apps tests. - Removed 'version' field in node.AppConfig (version is now obtained from App's exec). - Updated some tests.
- Introduced router.AppManager which replaces: router.loopList, router.portList, router.portManager, node.osExecutor - Merged router.routeManger into router.Router - Renamed router.managedRoutingTable to router.routingTableManager and introduced some logic originally from router.routeManager and router.Router - Simplified router.Router and node.Node - Added Start/Stop/Call logic to app.Host (originally spread across node.osExecutor and node.Node)
- Commented code and made 'make lint' pass. - App now receives host's public key via env. - Added 'router.AppInfo' structure to provide more complete app info. - Improved sync.RWMutex management in 'router.AppsManager' - Simplified '(*router.Router).Setup()' loop. - Temporarily commented out tests that no longer pass due to changes.
- Renamed 'router.AppsManager' to 'router.ProcManager'. - Introduced the 'ProcID' concept to 'router.ProcManager'. - Renamed 'app.Host' to 'app.Executor'. - Separated 'app.NewExecutor()' into 'app.ObtainMeta()' and 'app.NewExecutor()'. - Temporary: commented out parts of the codebase that needs updating due to changes.
Introduces the 'apptest' module and makes 'app.Executor' an interface.
Fix merge conflicts.
Fix panic on confirm loop.
…-262 Implement module for obtaining a user's response.
Mainnet fixes and changes to ensure thread-safety of noise in router.
Uptime tracking
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.
Intentions
Code is confusing and hard to work on top of to implement new features (specifically in relation to #278).
The code in
/pkg/app
and related logic are currently implemented badly. In summary:Changes
Within
/pkg/app
net.Conn
implementation via unix pipes (and associated structures) to an internal module/internal/appnet
./pkg/app
(and the newly created/internal/appnet
) to make more logical sense.(*appnet.Protocol).Serve()
now uses a map as input (instead of a function) to make the distinction as to what actions are to be performed for whatFrameType
./pkg/app
to make more sense.Within
/pkg/node
appManager
structure and moved the logic within a member ofnode.Node
as there is no need to abstract this logic out).