client/updater design: parallel downloads
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- python
- Área
- backend-api-design, security
Línea de trabajo
Lea los puntos de entrada existentes Updater.refresh(), Updater.get_valid_targetinfos(list) y Updater.download_targets(list), y revise después el contexto de descargas paralelas de pip descrito en el issue. Defina un alcance concreto para la API o la concurrencia, considerando que el trabajo está terminado cuando targets y los metadatos de bin puedan descargarse en paralelo sin poner en riesgo el estado compartido de Updater.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Updater should in some way support parallel downloads.
This came up because I found an obscure corner in pip that does index file downloads in parallel in pip (pip list --outdated): if I plug my TUF-support in there, TUF Updater gets called from multiple threads and very bad things happen.
Some notes on this:
- for the pip use case, letting pip handle the actual downloads would remove 50% of the need for this -- but bin metadata downloads would still be sequential (and
Updater.refresh()would still be thread-unsafe) - Still, parallel downloads (for both targets and bin metadata) is probably a wanted feature in other user-facing apps as well: it is faster and is something package managers already often do
- this feature does not mean that TUF API absolutely needs to be threadsafe: many use cases would be covered by small API change:
Updater.get_valid_targetinfos(list)andUpdater.download_targets(list)could still be a single-threaded API but they could be implemented in a way that uses multiple threads and multiple connections to the server. I have no idea how easy this would be though. - The nicest solution might be a low-level Sans-IO style API (a state machine with events) or at least something that is asynchronous to the users. This API is then wrapped by a simple I/O layer that could look much like it now does. This would mean a large change.
- Lenguaje dominante
- Python
- Estrellas
- 1.7k
- Forks
- 304
- Merge medio
- 1 d 2 h
- PR fusionados (30 d)
- 17
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 theupdateframework/python-tuf
-
switch to main branch? Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
theupdateframework/python-tuf#3001 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
theupdateframework/python-tuf#2979 · 1 comentario ·
-
Use Immutable Releases Abiertoenhancement github_actions
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
theupdateframework/python-tuf#2920 · 1 comentario · 2 reacciones ·
-
Investigate/test fetcher retries Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
theupdateframework/python-tuf#2842 · 3 comentarios ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
theupdateframework/python-tuf#2836 · 7 comentarios ·
Todos los issues de theupdateframework/python-tuf
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
zostera/django-bootstrap4#894 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
use-agent-os/agent-os#3276 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
zephyrproject-rtos/zephyr#119726 ·
-
area/auth bug comp/agent P3 platform/discord type/security
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
NousResearch/hermes-agent#117848 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
zilliztech/memsearch#759 ·