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>
90 lines
4.5 KiB
Plaintext
90 lines
4.5 KiB
Plaintext
# 세 타입이 조립 결과에 대해 하는 일
|
|
public PubSubChannel {
|
|
Objects.requireNonNull(namespace, "namespace must be non-null");
|
|
Objects.requireNonNull(name, "name must be non-null");
|
|
Objects.requireNonNull(messageCodec, "message codec must be non-null");
|
|
public String render() {
|
|
return namespace.prefix() + ':' + name.entity() + ':' + name.identifier();
|
|
}
|
|
}
|
|
public ShardedPubSubChannel {
|
|
Objects.requireNonNull(namespace, "namespace must be non-null");
|
|
Objects.requireNonNull(name, "name must be non-null");
|
|
Objects.requireNonNull(messageCodec, "message codec must be non-null");
|
|
public String render() {
|
|
return namespace.prefix() + ':' + name.entity() + ':' + name.identifier();
|
|
}
|
|
}
|
|
public PubSubPattern {
|
|
Objects.requireNonNull(namespace, "namespace must be non-null");
|
|
Objects.requireNonNull(suffixPattern, "suffix pattern must be non-null");
|
|
Objects.requireNonNull(messageCodec, "message codec must be non-null");
|
|
if (suffixPattern.isBlank() || suffixPattern.indexOf(':') >= 0) {
|
|
throw new IllegalArgumentException(
|
|
"a pattern suffix must be non-blank and must not cross a namespace separator");
|
|
}
|
|
RedisKeyRules.requireRenderedSize(
|
|
namespace.prefix() + ':' + suffixPattern, RedisKeyRules.MAX_KEY_BYTES);
|
|
}
|
|
*/
|
|
public String render() {
|
|
return namespace.prefix() + ':' + suffixPattern;
|
|
}
|
|
|
|
# requireRenderedSize 가 나오는 곳 전부 (첫 줄은 선언)
|
|
sdk/api/key/RedisKeyRules.java:89: public static String requireRenderedSize(String rendered, int maxKeyBytes) {
|
|
sdk/api/key/RedisKeyRenderer.java:45: return RedisKeyRules.requireRenderedSize(rendered.toString(), maxKeyBytes);
|
|
sdk/api/operations/PubSubPattern.java:30: RedisKeyRules.requireRenderedSize(
|
|
|
|
# 조각이 받는 규칙과 상한 상수
|
|
19: public static final int MAX_KEY_BYTES = 512;
|
|
21: private static final Pattern TOKEN = Pattern.compile("^[a-z0-9]([a-z0-9-]{0,62}[a-z0-9])?$");
|
|
23: private static final Pattern IDENTIFIER = Pattern.compile("^[A-Za-z0-9][A-Za-z0-9._~-]{0,127}$");
|
|
91: if (maxKeyBytes < 1 || maxKeyBytes > MAX_KEY_BYTES) {
|
|
92: throw new IllegalArgumentException("maximum key bytes must be in 1.." + MAX_KEY_BYTES);
|
|
RedisNamespace.java:16: RedisKeyRules.requireToken("environment", environment);
|
|
RedisNamespace.java:17: RedisKeyRules.requireToken("service", service);
|
|
RedisNamespace.java:18: RedisKeyRules.requireToken("domain", domain);
|
|
RedisKeyName.java:12: RedisKeyRules.requireToken("entity", entity);
|
|
RedisKeyName.java:13: RedisKeyRules.requireIdentifier(identifier);
|
|
RedisSlotTag.java:15: RedisKeyRules.requireIdentifier(value);
|
|
|
|
# 키를 렌더하는 곳: 조각 사이에 슬롯 태그가 하나 더 들어간다
|
|
public String render(QualifiedRedisKey key) {
|
|
Objects.requireNonNull(key, "qualified key must be non-null");
|
|
StringBuilder rendered = new StringBuilder(64);
|
|
rendered.append(key.namespace().prefix()).append(':');
|
|
key.slotTag().ifPresent(tag -> rendered.append('{').append(tag.value()).append("}:"));
|
|
rendered.append(key.name().entity()).append(':').append(key.name().identifier());
|
|
return RedisKeyRules.requireRenderedSize(rendered.toString(), maxKeyBytes);
|
|
}
|
|
|
|
# 그 검사가 보는 상한은 생성자로 주입받는다
|
|
*
|
|
* @param maxKeyBytes the configured maximum rendered key size in UTF-8 bytes
|
|
*/
|
|
public RedisKeyRenderer(int maxKeyBytes) {
|
|
if (maxKeyBytes < 1 || maxKeyBytes > RedisKeyRules.MAX_KEY_BYTES) {
|
|
throw new IllegalArgumentException(
|
|
"maximum key bytes must be in 1.." + RedisKeyRules.MAX_KEY_BYTES);
|
|
}
|
|
this.maxKeyBytes = maxKeyBytes;
|
|
|
|
# 주입하는 곳
|
|
src/main 에서 new RedisKeyRenderer( : 0 건
|
|
src/test 에서 new RedisKeyRenderer( : 12 건
|
|
getMaxKeyBytes / getLimits 를 부르는 src/main 코드
|
|
sdk/config/RedisSdkSettings.java:272: public int getMaxKeyBytes() {
|
|
sdk/config/RedisSdkSettings.java:908: public Limits getLimits() {
|
|
설정 자체는 등록되어 있다
|
|
2116: - name: APP_REDIS_LIMITS_MAX_KEY_BYTES
|
|
private int maxKeyBytes = 512;
|
|
if (maxKeyBytes < 1 || maxKeyBytes > RedisKeyRules.MAX_KEY_BYTES) {
|
|
throw new IllegalStateException(
|
|
"max-key-bytes must be in 1.." + RedisKeyRules.MAX_KEY_BYTES);
|
|
|
|
# 기본 이름공간
|
|
private String environment = "local";
|
|
private String service = "sample-service";
|
|
private String domain = "shared";
|