Skip to content

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.

2 participants