aws / aws/aws-durable-execution-sdk-python

[Feature]: Deduplicate SerDes deserialization within an invocation

オープン
#678 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement parity pkg:sdk
主要言語
Python
スター
53
フォーク
25
平均マージ
1日 19時間
マージ済み PR(30日)
40

説明

## 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.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず、SDK が管理する SerDes 呼び出しと、invocation スコープのキャッシュを確立してクリアできる Lambda の invocation ライフサイクルを特定します。キャッシュヒット、異なるコンテキストとデータ、None 値、失敗、eviction、並行する呼び出し元を対象とするテストを追加します。完了の条件は、失敗をキャッシュしたり invocation の境界をまたいだりすることなく、繰り返される一致するリクエストが重複排除されることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
backend, cloud
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。