docs(keycloak-session-store): import the session-storage lab as a new project
The keycloak project ended with four open questions that design could not
settle. A two-VM lab was built to answer them by measurement, and this is
that material: 26 experiments, 125 raw command outputs, 22 browser captures.
Follows the import procedure in README.md.
source/ the originating repository verbatim — 78 documents, 28 SVGs,
8 manifests, plus .source-revision recording the commit
final/ the SSOT
document.md 729 lines written from the 29 experiment documents, not
concatenated: what was predicted, what was measured, and
where the measurement itself was wrong
evidence/raw 125 outputs, flattened to <experiment>__<file> because
the originals collided (01-baseline.txt appeared three
times) and the audit only globs the top level
evidence/meta one per raw file; command and exitCode are null and the
README says why rather than inventing them
evidence/browser 22 captures
assets/ three diagrams through techviz
.techviz/ their VizSpecs
A separate project rather than an addition to keycloak: the B-layer answers
that project's four questions, but the A, C and D layers are about cluster
failure, SSO and operations, and one document.md should hold one subject.
The four question records there can point here through 관계.
Recorded rather than papered over: only three of the 28 diagrams were
remade. The repository forbids hand-drawn SVG and forbids titles inside the
canvas; all 28 originals carry both, so converting them is redrawing, not
reformatting. They stay in source/ and the gap is written into the document.
verify-pipeline.py passes. audit-records.py reports no issues.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
43bccd08a8
commit
b2963105a8
+84
@@ -0,0 +1,84 @@
|
||||
# 삭제를 설명하는 문단과 그 마지막 문장
|
||||
* <p>There is no declarative retry annotation any more. {@code @RetryableJpaTransaction} lived in
|
||||
* the persistence leaf and documented itself as something an application service would put on its
|
||||
* own methods — which application-core cannot do without importing an outbound adapter and
|
||||
* inverting the dependency this architecture is built on. The canonical boundary is {@code
|
||||
* PolicyTransactionPort.inTransaction(TransactionRequest, Supplier)}; the retry coordinator below
|
||||
* is what implements it, not a second way to ask for the same thing.
|
||||
*/
|
||||
|
||||
# 그 문장이 지목한 클래스의 선언
|
||||
30:public final class FullTransactionRetryCoordinator {
|
||||
|
||||
# 그 포트를 실제로 구현하는 클래스
|
||||
adapter/outbound/persistence/transaction/SpringTransactionPort.java:31:public class SpringTransactionPort implements PolicyTransactionPort {
|
||||
30:@Component
|
||||
|
||||
# 조립된 쪽의 재시도 루프와 그 게이트
|
||||
int attempt = 1;
|
||||
while (true) {
|
||||
AttemptResult<T> attemptResult = executeOnce(request, action, policy);
|
||||
if (!shouldRetry(request.policyId(), attemptResult, attempt)) {
|
||||
return attemptResult.result();
|
||||
}
|
||||
if (!retryBackoff.pauseBeforeRetry(request.callBudget(), attempt)) {
|
||||
return attemptResult.result();
|
||||
}
|
||||
attempt++;
|
||||
}
|
||||
private boolean shouldRetry(
|
||||
TransactionPolicyId policyId, AttemptResult<?> attemptResult, int attempt) {
|
||||
if (policyId != TransactionPolicyId.COMMAND_SERIALIZABLE_REPLAY_SAFE
|
||||
|| !attemptResult.physicalOwner()
|
||||
|| attempt >= retryBackoff.maximumAttempts()
|
||||
|| Thread.currentThread().isInterrupted()) {
|
||||
return false;
|
||||
|
||||
# 두 구현이 읽는 값
|
||||
transactionMargin = defaulted(transactionMargin, Duration.ofMillis(250), "transaction-margin");
|
||||
lockMargin = defaulted(lockMargin, Duration.ofMillis(100), "lock-margin");
|
||||
retryBaseDelay = defaulted(retryBaseDelay, Duration.ofMillis(10), "retry-base-delay");
|
||||
retryMaximumDelay = defaulted(retryMaximumDelay, Duration.ofMillis(50), "retry-maximum-delay");
|
||||
retryMaximumAttempts = retryMaximumAttempts == null ? 2 : retryMaximumAttempts;
|
||||
|
||||
43: public static final Duration DEFAULT_MAX_RETRY_ELAPSED = Duration.ofSeconds(30);
|
||||
99: public FullTransactionRetryCoordinator retryCoordinator(
|
||||
103: return retryCoordinator(executor, DefaultJpaRetryPolicy.forProfile(retryProfile), listener);
|
||||
107: public FullTransactionRetryCoordinator retryCoordinator(
|
||||
110: executor, policy, retrySleeper(), clock, DEFAULT_MAX_RETRY_ELAPSED, listener);
|
||||
|
||||
# main 에서 코디네이터를 언급하는 파일 전부
|
||||
bootstrap/autoconfigure/jpa/JpaPlatformRuntimeAutoConfiguration.java:7:import dev.caskeleton.adapter.outbound.persistence.transaction.FullTransactionRetryCoordinator;
|
||||
bootstrap/autoconfigure/jpa/JpaPlatformRuntimeAutoConfiguration.java:170: public FullTransactionRetryCoordinator jpaRetryCoordinator(
|
||||
bootstrap/autoconfigure/jpa/JpaTransactionAutoConfiguration.java:9:import dev.caskeleton.adapter.outbound.persistence.transaction.FullTransactionRetryCoordinator;
|
||||
bootstrap/autoconfigure/jpa/JpaTransactionAutoConfiguration.java:99: public FullTransactionRetryCoordinator retryCoordinator(
|
||||
bootstrap/autoconfigure/jpa/JpaTransactionAutoConfiguration.java:107: public FullTransactionRetryCoordinator retryCoordinator(
|
||||
bootstrap/autoconfigure/jpa/JpaTransactionAutoConfiguration.java:109: return new FullTransactionRetryCoordinator(
|
||||
adapter/outbound/persistence/transaction/FullTransactionRetryCoordinator.java:30:public final class FullTransactionRetryCoordinator {
|
||||
adapter/outbound/persistence/transaction/FullTransactionRetryCoordinator.java:50: public FullTransactionRetryCoordinator(
|
||||
adapter/outbound/persistence/transaction/SpringJpaTransactionExecutor.java:21: * <p>This class does not retry. Retry lives in {@link FullTransactionRetryCoordinator}, which calls
|
||||
|
||||
# 파라미터로 받거나 컨테이너에서 꺼내는 곳
|
||||
FullTransactionRetryCoordinator 를 파라미터로 받는 선언 : 0
|
||||
ObjectProvider<FullTransactionRetryCoordinator> : 0
|
||||
getBean 으로 이 타입을 꺼내는 곳 : 0
|
||||
소스 밖에서 이 이름이 나오는 곳 : 0
|
||||
|
||||
# 선언된 능력
|
||||
83:| Full-transaction retry | Stable |
|
||||
|
||||
# 지워진 이름을 건드린 커밋 (경로 제한 없음)
|
||||
e98b56eb feat: jpa, messaging, notification, mongo, graphql 어댑터터 리펙토링
|
||||
2f5d2fc2 feat: jpa, messaging, notification, mongo, graphql 어댑터터 구현체 추가
|
||||
0e61f86e feat(jpa): implement the JPA relational persistence platform
|
||||
3b5aee50 feat: 설계 문서 추가
|
||||
|
||||
# 같은 트리에서 이미 도는 AOP
|
||||
adapter/outbound/persistence/fileserver/JpaFileMetadataStore.java:34: * {@code @Transactional} of their own.
|
||||
adapter/outbound/persistence/outbox/OutboxReaper.java:38: @Transactional
|
||||
adapter/outbound/persistence/outbox/OutboxStoreAdapter.java:20: * {@code @Transactional} of their own; {@link #claimBatch} delegates the vendor claim to {@link
|
||||
adapter/outbound/persistence/outbox/OutboxStoreAdapter.java:21: * OutboxClaimRepository}. See README "outbox" for the append/claim/no-@Transactional contracts.
|
||||
6:import org.springframework.aop.Advisor;
|
||||
9:import org.springframework.aop.support.annotation.AnnotationMatchingPointcut;
|
||||
50: static Advisor requiresPermissionAuthorizationAdvisor(
|
||||
55: Pointcut onMethod = AnnotationMatchingPointcut.forMethodAnnotation(RequiresPermission.class);
|
||||
Reference in New Issue
Block a user