Microservice decomposition (outbound coupling)
Why use CCE
Monolith decomposition stalls without a map of outbound dependencies — HTTP clients, gRPC stubs, service discovery. Module boundaries drawn on whiteboards miss hidden coupling through shared libraries.
CCE inventories external call sites so architects can cluster by directory and propose microservice cuts with evidence.
What CCE extracts
| JSON field | Meaning for this use case |
|---|---|
provider |
Coupling type (OUTBOUND, DISCOVERY) |
resource |
Protocol or registry (http, grpc, consul, eureka) |
operation |
Client method (Get, Post, Dial, …) |
file / line |
Module that owns the outbound call |
CLI wiring
cce -folder ./monolith \
-language JAVA \
-mapper-file https://releases.stackgen.com/cce/lenses/microservice-decomposition/latest/microservice-decomposition_lenses.yaml \
-filter cloud \
-format json \
-output coupling.json
For unresolved calls, add -log-level debug and extend the lens.
cce -folder ./monolith \
-language AUTO \
-mapper-file https://releases.stackgen.com/cce/lenses/microservice-decomposition/latest/microservice-decomposition_lenses.yaml \
-filter cloud \
-format json \
-output coupling.json \
-log-level debug
How to read the JSON output
- Cluster
entitlements[]by directory prefix offile→ candidate service boundaries. provider == "OUTBOUND"— HTTP/gRPC calls to other systems (hard coupling).provider == "DISCOVERY"— registry clients (Consul, Eureka, etcd) indicating runtime service location.- Overlaps with integration-replatforming.md; this lens emphasizes cross-service coupling for decomposition.
CI/CD snippet
- name: Outbound coupling map
run: |
cce -folder . -language AUTO \
-mapper-file https://releases.stackgen.com/cce/lenses/microservice-decomposition/latest/microservice-decomposition_lenses.yaml \
-filter cloud -format json -output coupling.json
Published lens
Latest mapper YAML is published on every push to main (public, no auth):
- Latest: https://releases.stackgen.com/cce/lenses/microservice-decomposition/latest/microservice-decomposition_lenses.yaml
- Catalog: https://releases.stackgen.com/cce/lenses/index.json
curl -fsSL "https://releases.stackgen.com/cce/lenses/microservice-decomposition/latest/microservice-decomposition_lenses.yaml" -o microservice-decomposition_lenses.yaml
cce -folder . -mapper-file https://releases.stackgen.com/cce/lenses/microservice-decomposition/latest/microservice-decomposition_lenses.yaml -language AUTO -filter all -format json -output report.json
Known limitations
Proof status: Verified (Go HTTP outbound) — see KNOWN_LIMITATIONS.md (microservice-decomposition) and docs/proof.
| Limitation | Impact |
|---|---|
| Starter lens | Include http. and net/http. rules; extend gRPC/messaging for your stack. |
| Outbound heuristics | No automatic service boundaries or DDD contexts. |
| Filter | Use -filter all for OUTBOUND / DISCOVERY providers. |
Platform limits (CGO, languages, static analysis, mapper precedence, filters): KNOWN_LIMITATIONS.md.
Related
- Lens YAML:
outbound-coupling.yaml - Integration inventory: integration-replatforming.md
- Pipeline overview:
modernization_use_cases.md