Add parEvalMapPartitioned - concurrent eval with per-key ordering
I maintainer di solito rispondono entro 3 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- scala
- Ambito
- backend, distributed-systems
Direzione di ricerca
Read the prototype linked in the issue and compare it with fs2's existing parEvalMap implementation and tests. The proposed operation needs per-key ordering, concurrency and buffering limits, and ordered result emission; the issue also raises unresolved API choices around key equality, overloads, naming, and aliases. Done means those semantics and API questions are resolved and the implementation is covered by tests, including the stated ordered-mode hang.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Elements with the same key run one at a time, in arrival order. Other keys run concurrently, and results are emitted in input order. Akka and Pekko have this as mapAsyncPartitioned.
records
.parEvalMapPartitioned(maxConcurrent = 32, maxBuffered = 512)(_.record.key) {
(committable, _) => processRecord(committable.record).as(committable.offset)
}
.through(commitBatchWithin(500, 15.seconds))
maxConcurrent limits running effects, for example to a connection pool's size. maxBuffered limits the elements held, including those waiting for their key or to be emitted. There is also a single-limit overload and parEvalMapPartitionedUnordered.
I have a prototype built on parEvalMap here. If an effect fails, later elements with that key are skipped. If an effect fails, the stream terminates with that error, as with parEvalMap. Until then, later elements with the same key aren't evaluated.
It inherits the hang from #3486 in ordered mode.
Questions:
- Would you want this in fs2 (I personally need this for processing records from kafka using fs2-kafka)?
EqorHashfor keys? The prototype usesEq, with a linear scan over keys in progress.- Is
maxBufferedthe right name, and should the single-limit overload stay? - Should there be
mapAsyncPartitionedaliases? The prototype has none, because Akka's second parameter isperPartition, somapAsyncPartitioned(32, 40)would silently mean something different.
- Lingua principale
- Scala
- Stelle
- 2.5k
- Fork
- 633
- Merge medio
- 3g 21h
- PR unite (30g)
- 13
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di typelevel/fs2
-
Reading from a socket gets stuck on Node.js 26Forse già presa Una pull request collegata a questa issue è aperta o già unita. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 3 giorni
-
Scala Native TLSSocket#applicationProtocol behavior is inconsistent with JVMForse già presa @reardonj l’ha presa 24 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 25/100
I maintainer di solito rispondono entro 3 giorni
-
Feature Proposal: report progress writing to socketsForse già presa @reardonj l’ha presa 31 giorni fa. Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 45/100
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
typelevel/fs2#3719 · 2 commenti ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
I maintainer di solito rispondono entro 3 giorni
Tutte le issue di typelevel/fs2
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno
-
requires-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
apache/datafusion-comet#7559 ·
I maintainer di solito rispondono entro 2 giorni
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
propensive/soundness#2438 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ergoplatform/ergo#2918 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
lichess-org/lila#22440 ·
I maintainer di solito rispondono entro 1 giorno