-
Notifications
You must be signed in to change notification settings - Fork 0
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
Refactor Session Management to Project-Wide Level #44
Labels
Comments
Notes
|
Implementation Ideas
Open QuestionsHow will
|
maximmaxim345
added a commit
that referenced
this issue
Dec 18, 2024
…78) Closes #44 **Description:** This pull request refactors the session management system to operate at the `ProjectSession` level instead of the `DataSession` level. This change centralizes session and shared data handling, ensuring consistency and synchronization across all `DataSessions` derived from the same `ProjectSession`. **Key Changes:** 1. **Centralized Session Data:** `SessionData` and `SharedData` are now managed within the `Project` struct, making them accessible to all `DataSessions` within that project. 2. **Simplified Data Access:** `ProjectView` now provides a unified view of a project's state at a given point in time, simplifying data access and manipulation. 3. **Atomic Transactions:** `ChangeBuilder` now records changes to be applied atomically to a `Project`, supporting project-level undo/redo and improving data consistency, especially in collaborative scenarios. 4. **Unified Change History:** A single chronological log of `ProjectLogEntry` is used to track all changes, enabling persistent undo/redo and supporting version control features like branching and merging. 5. **Enhanced Collaboration:** The new architecture supports multi-user collaborative editing with offline support by design, using the `ProjectLogEntry` to synchronize changes between users. 6. **Removed `DataSession`:** The `DataSession` concept has been removed in favor of direct manipulation of `DataView` and `PlannedData` through `ChangeBuilder`. 7. **Renamed `DocumentSession` to `DocumentView`:** Renamed `DocumentSession` to `DocumentView` to better reflect its role as a read-only view into a `Document`. 8. **Module-Specific Operations:** The `ModuleRegistry` now holds a v-table (`ModuleRegistryEntry`) for each registered module, enabling runtime polymorphic operations on module-specific data types. 9. **Serialization/Deserialization:** `ProjectDeserializer` is used to deserialize projects, leveraging the `ModuleRegistry` to handle module-specific data. **Benefits:** * **Data Consistency:** `SessionData` and `SharedData` are synchronized across all `DataSessions` within a project, eliminating inconsistencies. * **Predictable Behavior:** Concurrent operations on different parts of a project (e.g., modifying sub-parts of an assembly) are more predictable and consistent. * **Project-Level Undo/Redo:** Undo/redo operations are now managed at the project level, simplifying the implementation and ensuring consistency across all documents and data sections. * **Simplified API:** The API for interacting with projects is simplified, with `ProjectView`, `DocumentView`, and `DataView` providing read-only access and `ChangeBuilder` enabling controlled modifications. * **Foundation for Advanced Features:** The new architecture provides a solid foundation for future enhancements, such as CRDT-based data storage, real-time collaboration, and advanced version control.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Refactor the Session to be handled on a
ProjectSession
wide level instead ofDataSession
. This change will synchronize data stored in theSession
andShared
data sections across allDataSessions
created from the sameProjectSession
.Description
The current implementation manages sessions at the
DataSession
level. The proposed refactoring will elevate session management to theProjectSession
level, ensuring consistent data across multipleDataSessions
within the same project.Benefits
Session
andShared
data sections will be consistent across allDataSessions
derived from the sameProjectSession
.DataSessions
simultaneously, such as modifying a sub-part in an assembly, behavior will be more predictable and consistent.The text was updated successfully, but these errors were encountered: