Problem statement
A microservices project in dot consists of a gateway and one or more services, each auto-linked to the gateway. We need to decide how a developer initializes this structure before building the microservices generator.
Proposed solution
Option A — Incremental (recommended)
dot init with type: microservices generates the gateway only. dot add service <name> adds each service and links it to the gateway.
Pros: Maps to how real microservices projects grow — you don't know all services upfront. Each dot add service run is atomic and reversible. Easier to implement first.
Cons: Requires dot add service to patch the gateway config without breaking it. Depends on v0.3 conflict detection infrastructure being available.
Option B — Upfront declaration
dot init asks for gateway type and all service names/languages upfront. Generates everything in one shot.
Pros: Simpler to implement. No patching needed.
Cons: Forces the developer to know all services at project creation time. Inflexible. Doesn't scale to real workflows.
Alternatives considered
A hybrid: dot init generates the gateway and one initial service. Additional services via dot add service. Similar to Option A but with an initial service included.
Area
Core
Additional context
Blocks the microservices gateway generator and dot add service command.
See docs/developer-guide/roadmap/open-decisions.md #5.
Problem statement
A microservices project in dot consists of a gateway and one or more services, each auto-linked to the gateway. We need to decide how a developer initializes this structure before building the microservices generator.
Proposed solution
Option A — Incremental (recommended)
dot initwithtype: microservicesgenerates the gateway only.dot add service <name>adds each service and links it to the gateway.Pros: Maps to how real microservices projects grow — you don't know all services upfront. Each
dot add servicerun is atomic and reversible. Easier to implement first.Cons: Requires
dot add serviceto patch the gateway config without breaking it. Depends on v0.3 conflict detection infrastructure being available.Option B — Upfront declaration
dot initasks for gateway type and all service names/languages upfront. Generates everything in one shot.Pros: Simpler to implement. No patching needed.
Cons: Forces the developer to know all services at project creation time. Inflexible. Doesn't scale to real workflows.
Alternatives considered
A hybrid:
dot initgenerates the gateway and one initial service. Additional services viadot add service. Similar to Option A but with an initial service included.Area
Core
Additional context
Blocks the microservices gateway generator and
dot add servicecommand.See
docs/developer-guide/roadmap/open-decisions.md #5.