refactor: 리펙토링 진행중 의존성 gradle은 얇게 유지, 각 모듈에서 처리하고 있는 부분에 대해서 리펙토링
This commit is contained in:
@@ -88,24 +88,20 @@ Implementing the design's SPI literally would have required
|
||||
points the wrong way regardless: the store is an application concern that two transports could
|
||||
share, not something the HTTP layer owns.
|
||||
|
||||
So the web leaf keeps only the parts that are genuinely HTTP and have no application-core
|
||||
equivalent, and everything else binds to the existing port:
|
||||
So the web leaf keeps only the part that is genuinely HTTP: JSON encoding of a replayed
|
||||
application result. Claiming, scope, fingerprint construction and replay policy remain at the
|
||||
application use-case boundary.
|
||||
|
||||
| Design type | Here |
|
||||
| Design concern | Here |
|
||||
| --- | --- |
|
||||
| `IdempotencyStore`, `IdempotencyRecord`, `IdempotencyState`, `IdempotencyScope` | `application-core/idempotency` (already present) |
|
||||
| `RequestFingerprint` | `application-core/idempotency` — the web factory *produces* it |
|
||||
| `ResponseSnapshot` | `application-core/idempotency/StoredResponse` |
|
||||
| `IdempotencyKey` | web: the `Idempotency-Key` header's grammar and bounds |
|
||||
| `FingerprintHeaderPolicy` | web: which HTTP headers change what a request means |
|
||||
| `DeterministicCommandEncoder` | web: canonical JSON, because the application port's `ofSha256(byte[])` hashes raw bytes |
|
||||
| `SemanticRequestFingerprintFactory` | web: builds the application type from operation, path identifiers, canonical body and selected headers |
|
||||
|
||||
The last three are the substance the design adds over what was here. The application port's
|
||||
`RequestFingerprint.ofSha256(byte[])` digests the raw request body, and raw bytes are not stable
|
||||
across a client library that reorders JSON members or a proxy that reformats — the design names that
|
||||
explicitly, and the semantic factory is the fix.
|
||||
| store / record / scope / claim / replay | `application-core/idempotency` |
|
||||
| request fingerprint policy | application use case, because only the use case knows which fields define the same work |
|
||||
| `Idempotency-Key` extraction | concrete inbound endpoint that opts into idempotency |
|
||||
| replay JSON encoding | `adapter-inbound-web/idempotency/JsonIdempotentResponseCodec` |
|
||||
|
||||
This avoids two authorities for “same request”. The HTTP adapter does not run its own database
|
||||
replay policy; it translates the transport input into the application idempotency context and lets
|
||||
the use case own duplicate execution.
|
||||
|
||||
## 7. Durable operations: the design's `web-operation-jpa` cannot exist here
|
||||
|
||||
|
||||
Reference in New Issue
Block a user