refactor: revisit the triplicated buffer implementations across the tokio / embassy / wasm adapters
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
- Refactorización
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- rust
- Área
- backend, embedded-iot
Línea de trabajo
Read docs/design/035-review-followups-deferred.md §2.3 and docs/design/038-technical-debt-and-simplification-review.md §2.3 / §3.2, then compare the buffer read paths in the three adapter files named in the issue. Check whether the documented tripwire has been hit by the late-join snapshot and record.get changes. Done means either recording a re-confirmation in 035 and closing the issue, or writing the shared core implementation design described in 038.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
The three runtime adapters each hand-build the same three buffer semantics (SPMC ring, single-latest, mailbox):
| File | Lines | Of which inline tests start at |
|---|---|---|
aimdb-tokio-adapter/src/buffer.rs |
1,634 | line 611 |
aimdb-embassy-adapter/src/buffer.rs |
963 | line 628 |
aimdb-wasm-adapter/src/buffer.rs |
757 | line 478 |
Each also carries a high density of feature gates (32, 29 and 26 cfg(feature …) occurrences respectively). This is the largest structural duplication left in the workspace: a behavioural fix or a new buffer feature has to be written and tested three times, and parity between them is only enforced by tests.
Prior decisions
This is not new:
docs/design/038-technical-debt-and-simplification-review.md§2.3 / §3.2 proposed one portable buffer implementation in core and estimated about 2,000 lines net removed (breaking for adapter authors only).docs/design/035-review-followups-deferred.md§2.3 decided "keep, with a tripwire" for the buffer-ext trait triplication.
So this issue is a request to re-check that decision, not to overturn it by default.
Suggested work
- Check whether the tripwire condition recorded in 035 §2.3 has been hit since (e.g. by the recent late-join snapshot and
record.getchanges, which touched buffer read paths). - If it has, or if the cost has grown, write the design for a shared core implementation as 038 §3.2 sketched.
- If not, record the re-confirmation in 035 and close this.
Notes
Line counts are from the tree at d9c7be0. I did not diff the three implementations line by line, so the amount of truly shareable code is the 038 estimate, not something I measured.
- Lenguaje dominante
- Rust
- Estrellas
- 101
- Forks
- 20
- Merge medio
- 2 h 33 min
- PR fusionados (30 d)
- 90
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de aimdb-dev/aimdb
-
🏷️ good first issue enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
Todos los issues de aimdb-dev/aimdb
Issues similares
-
Panic on live viewport resize when unstyled elements exist in display: none subtreePosiblemente ocupada @GoCoder7 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
DioxusLabs/blitz#1488 ·
Los mantenedores suelen responder en 1 día
-
S-Needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
vectordotdev/vrl#2042 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día