Skip to content
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

Document DataStore exported ledger metadata file format #5577

Open
tamirms opened this issue Jan 22, 2025 · 2 comments
Open

Document DataStore exported ledger metadata file format #5577

tamirms opened this issue Jan 22, 2025 · 2 comments

Comments

@tamirms
Copy link
Contributor

tamirms commented Jan 22, 2025

Background

galexie is a service which publishes LedgerCloseMeta XDR objects bundled into a serialized file format LedgerCloseMetaBatch to a DataStore. Allowing subsequent queries from consumers for ledgers as a faster/easier alternative to acquiring the same from a captive core.

DataStore is the Go interface which defines all storage operations required by galexie. Currently, there is only 1 concrete implementation of the DataStore interface which is backed by GCS. However, we anticipate that there will be other DataStore implementations backed by other storage engines. For example, a DataStore implementation could be backed by S3, a local file system, or even a relational database like postgres.

Problem

External systems are not able to easily interoperate with GCS datastore exported bundled files because there is no external facing documentation on the export format:

Acceptance Criteria

Create a new ecosystem SEP which defines specification on Datastore export formats:

  • Document the exported serialized bundled file format, it should adhere to LedgerCloseMetaBatch.
  • Document the requirements for GCS Datastore exported bucket schema.
    • Define how the GCS bucket name and path should be encoded for a given exported bundled file based on the LedgerMetaArchive.ObjectKey which is an encoded string over partition, ledger range, and sort prefix.
@urvisavla
Copy link
Contributor

There are a couple of open items that could influence the datastore specification:

Co-locating the schema on the datastore might not be strictly necessary for the formal specification but I think it could be useful. However, the proposed changes in #5547 to simplify the append logic will definitely require the datastore to support listing objects in a specific order.

Imo, tackling these issues will help create a more robust interface that enables seamless datastore interchangeability in Galexie.

@sreuland
Copy link
Contributor

The pluggable datastore design, #5526, would be a related effort that is pending, if that comes to reality, then it would redefine what constitutes the interface of a Datastore.

@sreuland sreuland changed the title Document requirements for implementing a DataStore to serve ledger metadata Document DataStore exported ledger metadata file format Mar 6, 2025
@tamirms tamirms self-assigned this Mar 7, 2025
@tamirms tamirms moved this from To Do to Needs Review in Platform Scrum Mar 18, 2025
@tamirms tamirms added this to the platform sprint 57 milestone Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Needs Review
Development

No branches or pull requests

3 participants