-
Notifications
You must be signed in to change notification settings - Fork 259
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
Refactoring core session management #486
Conversation
908a278
to
a7e527f
Compare
refactor(session): simplify jwt check in session method
Signed-off-by: Teo <[email protected]>
Signed-off-by: Teo <[email protected]>
Signed-off-by: Teo <[email protected]>
Signed-off-by: Teo <[email protected]>
Signed-off-by: Teo <[email protected]>
Signed-off-by: Teo <[email protected]>
Signed-off-by: Teo <[email protected]>
Signed-off-by: Teo <[email protected]>
Signed-off-by: Teo <[email protected]>
Signed-off-by: Teo <[email protected]>
Signed-off-by: Teo <[email protected]>
Signed-off-by: Teo <[email protected]>
Signed-off-by: Teo <[email protected]>
Signed-off-by: Teo <[email protected]>
bfca31a
to
b7dd348
Compare
This pull request has been automatically marked as stale because it has not had any activity in the last 14 days. @ please review this PR and make any necessary updates. If no updates are made within 7 days, this PR will be automatically closed. |
This pull request has been automatically closed because it has been stale for 7 days with no activity. Feel free to reopen this PR if you'd like to continue working on it. |
Abstract
The
Session
module functions as a god object, which complicates working with its varied responsibilities and behaviors. This design has led to significant issues, particularly with threading and synchronization, contributing to problems like the deadlock observed in #477.Mission
To refactor the
session
module by:Visioned design (Work in Progress)
Session Module Components
SessionStruct
: A model class that strictly defines the schema for session packets.SessionApi
: Acts as the service layer facilitating API communication.Session
: Maintains representing a live Session; acts as a manager, with targeted and clearer responsibilitiesThread Management Classes
_SessionThread
: Implementsthreading.Thread
and exposes an interfaceSession
understands.ChangesObserverThread
: Passive listener forSession
model changes; publishes to API when notified.EventPublisherThread
: Polls from aQueue
shared withSession
, aggregates payload in a "batch-and-flush" strategy with three triggers: max size, time threshold or empty queue....
TO BE CONTINUED