Skip to content

feat: Implement DataStructureManager and internal structures for vari… #318

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

qishenonly
Copy link
Member

This pull request introduces a unified data structure management system for the FlyDB project. It adds a DataStructureManager class to provide a single interface for managing multiple data structures, all sharing a single database instance. The changes also include the internal implementation of various data structure types that integrate with the shared database.

Unified Data Structure Management:

  • DataStructureManager Implementation: Added a new DataStructureManager class in structure/manager.go to manage multiple data structures (e.g., strings, hashes, lists, sets, sorted sets, bitmaps, streams) through a single database instance. It supports operations like key deletion, expiration, TTL retrieval, and syncing data to disk.
  • Initialization of Data Structures: The DataStructureManager initializes and provides access to internal implementations of supported data structures, ensuring they share the same database instance.

Internal Data Structure Implementations:

  • Internal Structure Classes: Added internal implementations for ListStructureInternal, SetStructureInternal, ZSetStructureInternal, BitmapStructureInternal, StreamStructureInternal, and ExpiringKeyInternal in structure/structures_internal.go. These classes are designed to work with the shared database instance.
  • Factory Methods: Each internal structure has a corresponding factory method (e.g., newListStructureInternal) to simplify their initialization with the shared database instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant