binder: "intent:" target URIs that match multiple <service>s should only connect to the one of highest priority
Maintainer antworten meist innerhalb von 2 Tagen
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Feature
- Klarheit
- Muss geklärt werden
- Aktivitätsstatus
- Veraltet
- Bereich
- backend-api-design, mobile-dev
Rechercherichtung
Beginne damit, IntentNameResolver, den pick-first-Load-Balancer und BinderClientTransport nachzuverfolgen, um zu verstehen, wie passende Android-Dienste ausgewählt werden und Verbindungsfehler ein Failover auslösen. Das Issue nennt keine Datei- oder Testnamen; die Aufgabe ist erledigt, wenn mehrere passende Dienste den Dienst mit der höchsten Priorität verwenden, ohne vorübergehende Verbindungsfehler durch unbeabsichtigtes Fallback zu verschleiern.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
More than one <service> can advertise an <intent-filter> that matches a given Intent. IntentNameResolver returns all matches to the "pick-first" load balancer which tries them in priority order. If connecting to a first Service fails, pick-first will try the second highest priority Service.
Pick-first's fail-over behavior makes sense in the networked world where clients want to tolerate server failure and spotty connectivity. In the on-device context there are only two reasons we want fail-over:
- So an unauthorized app that maliciously gives itself a high
<android:priority>can quickly be passed over by preauthorization, avoiding a denial-of-service situation. - So multiple server apps in an
<android:priority>hierarchy can independently collaborate on which of them is active by enabling/disabling only their own<service>components in PackageManager.
But BinderClientTransport can fail to connect for many transient reasons like:
- the phone/tablet is busy doing other things causing the server app to be slow to start (DEADLINE_EXCEEDED)
- the server app does many things other than host the target Service, and a bug in one of them crashes the whole process while the ServiceConnection is being established (UNAVAILABLE).
- the user "swipes away" the server app's actiivity from the "recents" UI just as the ServiceConnection is being established (UNAVAILABLE).
- the server app is manually/automatically updated to a newer version and android kills all its processes while the ServiceConnection is being established (UNAVAILABLE).
Fail-over for these other reasons is problematic because different AndroidComponentAddresss are likely different implementations of the requested interface. It would be like if you selected Chrome as your default mobile browser but when you clicked on a URL, your phone failed over to Firefox if it didn’t launch fast enough. Perhaps that’s better than failing to show the web page at all, but it's also masking the underlying problem with the explicitly configured first choice browser in a way that's surprising and non-deterministic.
- Vorherrschende Sprache
- Java
- Sterne
- 12.1k
- Forks
- 4k
- Ø Merge
- 2 T. 3 Std.
- Gemergte PRs (30 T.)
- 30
Entwicklungsumgebung
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 grpc/grpc-java
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
grpc/grpc-java#13052 · 4 Kommentare ·
Maintainer antworten meist innerhalb von 2 Tagen
-
docs enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
grpc/grpc-java#10824 · 8 Kommentare ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 70/100
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 65/100
Maintainer antworten meist innerhalb von 2 Tagen
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
checkstyle/checkstyle#21755 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
Maintainer antworten meist innerhalb von 1 Tag
-
agentic-workflows
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
github/copilot-sdk#2782 ·
Maintainer antworten meist innerhalb von 1 Tag
-
documentation Good for newcomer quick win
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
CodeForPhilly/benefit-decision-toolkit#519 ·
Maintainer antworten meist innerhalb von 1 Tag
-
area-deployment triage:bot-seen triage:needs-human
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
microsoft/aspire#20533 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag