client/updater design: parallel downloads
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 25/100
- Issue-Typ
- Feature
- Klarheit
- Muss geklärt werden
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- python
- Bereich
- backend-api-design, security
Rechercherichtung
Lesen Sie zunächst die vorhandenen Einstiegspunkte Updater.refresh(), Updater.get_valid_targetinfos(list) und Updater.download_targets(list), und prüfen Sie anschließend den im Issue beschriebenen Kontext für parallele Downloads in pip. Legen Sie einen konkreten API- oder Nebenläufigkeitsumfang fest; als abgeschlossen gilt die Aufgabe, wenn targets und bin-Metadaten parallel heruntergeladen werden können, ohne den gemeinsam genutzten Updater-Zustand unsicher zu machen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Python
- Sterne
- 1.7k
- Forks
- 304
- Ø Merge
- 1 T. 2 Std.
- Gemergte PRs (30 T.)
- 17
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus theupdateframework/python-tuf
-
switch to main branch? Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
theupdateframework/python-tuf#3001 ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 42/100
theupdateframework/python-tuf#2979 · 1 Kommentar ·
-
Use Immutable Releases Offenenhancement github_actions
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 45/100
theupdateframework/python-tuf#2920 · 1 Kommentar · 2 Reaktionen ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 35/100
theupdateframework/python-tuf#2842 · 3 Kommentare ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
theupdateframework/python-tuf#2836 · 7 Kommentare ·
Alle Issues in theupdateframework/python-tuf
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
bancolombia/sentinel#23 ·
-
test md OffenCI
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100