Service Modules (Not Microservices)¶
Principle¶
Nextpoint builds self-contained service modules — independent business capabilities that share infrastructure but own their domain logic, data operations, and event contracts.
What a Service Module Is¶
A service module: - Owns a business capability (document loading, export, near-dedup, transcription) - Has its own codebase (separate Git repo or distinct directory) - Publishes and consumes events via SNS/SQS - Owns its data operations (its own database operations against shared RDS schemas) - Deploys independently (its own CDK stack, Lambda functions, queues)
What a Service Module Is NOT¶
- NOT a microservice — modules share an RDS cluster, VPC, and AWS account
- NOT a monolith — modules are independently deployable with clear boundaries
- NOT a library — modules don't import from each other
Why This Approach¶
vs. Microservices¶
- No service mesh, API gateway, or service discovery overhead
- Shared RDS cluster reduces operational cost (one cluster, many schemas)
- Teams can own 2-3 modules without managing separate runtimes
- No network latency for database access (Lambda in same VPC as RDS)
vs. Monolith¶
- Independent deployment — changing documentloader doesn't redeploy exporter
- Clear ownership — each module has a defined team/owner
- Isolated failure — a bug in one module's handler doesn't crash another
- Independent scaling — each module's Lambda concurrency scales separately
Module Boundaries¶
Modules communicate ONLY through events. A module never: - Imports code from another module - Reads another module's database tables directly - Calls another module's Lambda functions synchronously
If two modules need to share data, they do it through: 1. Events — publisher emits a fact, subscriber reacts 2. Shared database schemas — both modules read from the same case schema (this is a pragmatic trade-off we accept given per-case isolation)
Current Modules¶
| Module | Capability | Key Events |
|---|---|---|
| documentloader | Document ingestion and indexing | DOCUMENT_LOADED, JOB_FINISHED |
| documentexporter | Document export and packaging | EXPORT_STARTED, EXPORT_COMPLETE |
| neardupe | Near-duplicate detection | DEDUPE_COMPLETE |
| transcript-pdf | Transcript PDF generation | TRANSCRIPT_GENERATED |
| query-language-engine | Search query processing | (synchronous — API module) |
Ask questions about Nextpoint architecture, patterns, rules, or any module. Powered by Claude Opus 4.6.