ARC 4Integrate Application EngineeringChapters 15–18

Chapter 17 — Isolate Communication and Collection Domains

Chapter objective: After this chapter, a developer can configure communication and collection domains separately and use equal entry keys to prove that the two identity layers remain distinct.

Learning objectives

  1. Distinguish clusterId, serviceId, and collection locator.
  2. Explain validation of cluster, service, and collection identity on a message.
  3. Prove that equal entry keys under different locators identify different state.
  4. Avoid treating a Spring bean name as wire identity.

Prerequisites

Case progress

The gateway and worker both use entry key fulfillment-primary in one Runtime, under route-hints and shard-owners. A test environment can also use the same locator while a different cluster/service identity keeps its messages separate from production.

Two boundaries, not interchangeable names

Two-layer isolation of communication and collection domains

Identifier Scope Purpose
clusterId Runtime/sync envelope membership in one deployment cluster
serviceId membership and sync envelope instances that discover and exchange DSM messages
tenantId collection locator state namespace or tenant ownership
applicationId collection locator application subdomain owning the collection
collectionId collection locator stable identity of one collection
Spring bean-name one application context code selecting a registered handle
entryKey inside one collection entity inside that collection

An entryKey gains meaning with its complete locator. Equal keys under different collection or application IDs do not identify one business object.

A message crosses two identity checks

Membership rejects discovery/messages from a different serviceId; RuntimePlatformSyncService also validates clusterId and serviceId in the envelope. After the communication domain accepts it, collection routing resolves the locator and handle.

network reachability
  → clusterId/serviceId match
  → collection descriptor/locator match
  → schema/capability match
  → apply entryKey inside target collection

Every rejection layer has an observable reason. Missing data cannot be attributed to locator without checking the earlier gates.

The equal-key counterexample in RuntimeIntegrationTest

One Runtime registers shared/gateway/route-hints and shared/worker/route-hints. Both Registers receive same-key; one stores gateway-value, the other worker-value. Each size remains one and each returns its own value. Locator, rather than Java entity type or entry key alone, owns collection identity.

Renaming distributed identity is protocol migration

Changing a bean alias affects one Spring context. Changing locator, cluster ID, or service ID changes distributed communication or state identity. It needs dual-write/migration, a compatibility window, or an explicit cold-start policy rather than an ordinary code rename.

Counterexample and fault injection

Experiment

cd submodule/dsm
mvn -q -pl dsm-integration-test,dsm-cluster -am \
  -Dtest=RuntimeIntegrationTest,MulticastClusterMembershipTest \
  -Dsurefire.failIfNoSpecifiedTests=false test

Inspect isolation-cases.json; each scenario identifies a change to communication domain, collection domain, or application-context name.

Experiment acceptance card

Field Content
Command The focused Runtime/membership tests above plus the book asset test
Input or fault equal key, different locator, different service ID, and duplicate locator
Observable result locator isolates values; service ID isolates membership; duplicate locator fails fast
Evidence level E2 single-Runtime isolation plus E3 controlled multi-node membership
This experiment does not prove Operating-system/network isolation, authorization, or tenant-data compliance

Review

Next

Chapter 18 arranges the preceding tests into an evidence ladder and states what each layer proves and leaves open.