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>
2.6 KiB
kind, slug, title, topic, project, status, sourceRevision, rootTreeNode, evidenceCapturedOn, assets, evidence, source, module
| kind | slug | title | topic | project | status | sourceRevision | rootTreeNode | evidenceCapturedOn | assets | evidence | source | module | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| CONCEPT | messaging-core-api-c07 | 동시성 지점이 하나뿐이다 | state-machines-and-ownership | clean-architecture-backend-template | 게시 전 | 21234e38cdb9a926cbc92bb97a2aee2e4a7d2916 | concept:messaging-core-api-c07 | 2026-09-01 |
|
|
|
messaging-core-api |
동시성 지점이 하나뿐이다
트랜잭션 개념은 선언으로만 등장하고 DB 트랜잭션은 이 리프가 만지지 않는다. 동시성 지점은 UuidV7.STATE 하나다.
본문
트랜잭션 개념이 이 leaf에는 두 가지 형태로만 등장하고 둘 다 선언이다 — MessagingCapabilities.brokerTransaction, ProcessingGuarantee.BROKER_TRANSACTIONAL("Atomicity holds only inside the transaction scope the broker itself defines"), ExternalSideEffectGuarantee.INBOX_TRANSACTIONAL("An Inbox row and the side effect commit inside the same database transaction"). DB 트랜잭션은 이 leaf가 만지지 않는다.
MessagingCapabilities 참조 위치
:::evidence key="messaging-core-api-c07" alt="코드베이스에서 MessagingCapabilities 를 검색한 출력 39줄. 이 기록이 세는 참조가 그 출력에 그대로 보인다." caption="MessagingCapabilities 코드베이스 검색 — 39줄 · exit 0" zoom="true" :::
유일한 동시성 지점
UuidV7.STATE(AtomicLong) 하나다. updateAndGet이 CAS 루프이므로 다중 스레드에서도 각 호출이 서로 다른 packed state를 얻는다. RANDOM(SecureRandom)은 thread-safe다. MessageHeaders는 생성 시 LinkedHashMap에 복사하고 Collections.unmodifiableMap으로 감싸 반환하므로 공유 안전하다.
최대 예순넷이라 실용상 문제가 아닌 선형 탐색
find(String)이 values.entrySet().stream() 선형 탐색이다 — 최대 64개이므로 실용상 문제는 아니지만 hot path에서 반복 호출되면 O(n)이다.
도달 불가능한 수명주기 필드
수명주기 개념은 DeliveryContext.shutdownRequested뿐이고, javadoc이 목적을 적는다 — "during a graceful drain the platform stops creating new retry attempts, and a long-running handler that can wind down early shortens the drain instead of being cancelled at the deadline." 이 필드는 production에서 도달 불가능하다(§12.1).