LevelDB, RocksDB and BoltDB support

Abierto
#2,515 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
swift
Área
databases

Línea de trabajo

Start by locating the registry plugin architecture and reading how existing database integrations are organized. Then assess support for reading LevelDB and RocksDB directories, read-only access by default, byte-oriented key/value views, prefix filtering and range scans, and RocksDB column families. Done means these requirements are covered; the issue names no files or tests, so identify the relevant entry points and validation approach in the project first.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement platform-macos
Problem

None of the embedded key-value stores LevelDB, RocksDB and BoltDB is supported, so inspecting an application's local data means writing a throwaway program. They run in-process with no server, so the only way in is to open the files, the way TablePro opens a SQLite file today. Folds in #524.

Proposed solution

A registry plugin that opens a local store:

  • Point at a LevelDB or RocksDB directory, or a BoltDB file. Read-only by default, since these formats hold a single-process lock and opening one under a running app is unsafe. When another process holds the lock, say so plainly instead of waiting on it.
  • Keys and values in the grid, with a hex and a text view, since all three stores are byte-oriented.
  • Prefix filtering and range scans, since there is no query language to fall back on.
  • The sidebar shows column families for RocksDB and buckets, nested ones included, for BoltDB. LevelDB has one flat keyspace.

Reading the files

  • LevelDB and RocksDB: link their C APIs as static libraries published through apple/Libs/, or read the on-disk format (sorted table files, the manifest and the write-ahead log, with their compression) in Swift. The C APIs are the smaller risk.
  • BoltDB (bbolt, which etcd uses) is Go only, with no C library, but its file is one B+tree of fixed-size pages, small enough to read in Swift.

Open question

Whether writes ever come after the read-only version, and for which store first.

Alternatives considered

A throwaway script per inspection.

Platform

macOS

Related database type

N/A / General

Lenguaje dominante
Swift
Estrellas
6.2k
Forks
412
Merge medio
3 h 56 min
PR fusionados (30 d)
669

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de TableProApp/TablePro

Todos los issues de TableProApp/TablePro

Issues similares

Más issues de Swift

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.