aws / aws/aws-durable-execution-sdk-python
[Feature]: Deduplicate SerDes deserialization within an invocation
- Lingua principale
- Python
- Stelle
- 53
- Fork
- 25
- Merge medio
- 1g 19h
- PR unite (30g)
- 40
Descrizione
## What would you like?
Deduplicate repeated SerDes deserialization within a single Lambda invocation.
Context-dependent SerDes implementations may perform filesystem or network I/O. Repeated access to the same checkpointed result or exception currently invokes the configured SerDes again, even when the serialized input and durable payload identity are unchanged.
## Possible Implementation
- Add an invocation-scoped deserialization cache around SDK-managed SerDes calls.
- Key entries by SerDes instance identity, durable execution ARN, operation/entity identity, payload kind when available, and a digest of the serialized input.
- Cache successful values, including `None`, but never cache failures.
- Bound completed entries with an LRU or weak-reference policy so large deserialized values are not retained indefinitely.
- If SDK-managed child/concurrency threads can request the same value concurrently, share one in-flight result rather than issuing duplicate external reads.
- Clear all entries at the end of the Lambda invocation; do not use a process-global cache across replays.
- Add tests for cache hits, distinct contexts/data, `None`, failures, eviction, and concurrent callers.
## Is this a breaking change?
No.
## Does this require an RFC?
No.
## Additional Context
This is primarily valuable for filesystem and other external-storage SerDes implementations. The Java SDK work in aws/aws-durable-execution-sdk-java#648 uses an invocation-scoped bounded cache and in-flight deduplication.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia individuando le chiamate SerDes gestite dall’SDK e il ciclo di vita dell’invocazione Lambda in cui potrebbe essere stabilita e svuotata una cache con ambito limitato all’invocazione. Aggiungi test che coprano gli hit della cache, contesti e dati distinti, valori None, errori, eviction e chiamanti concorrenti; il lavoro è completo quando le richieste corrispondenti ripetute vengono deduplicate senza memorizzare nella cache gli errori né oltrepassare i confini dell’invocazione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- backend, cloud
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Attiva
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100