Concepts
Concepts
Section titled βConceptsβπ― Goal: Build a deep mental model of how the platform works and why itβs designed this way
This section provides in-depth explanations of the Banyan platformβs architecture, design patterns, and underlying principles. Understanding these concepts will help you make better design decisions and troubleshoot effectively.
Concept Dependency Graph
Section titled βConcept Dependency GraphβUnderstanding concepts in the right order accelerates learning. Follow this dependency graph:
Foundation Concepts (Read First)ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ββ LAYER 1: Core Philosophy (30 minutes) ββ ββ βββββββββββββββββββββββββββββββββββββββ ββ β Zero Infrastructure Design β ββ β "Why Banyan exists" β ββ ββββββββββββββββ¬βββββββββββββββββββββββ ββ β ββ βΌ ββ βββββββββββββββββββββββββββββββββββββββ ββ β Message Bus Architecture β ββ β "How services communicate" β ββ ββββββββββββββββ¬βββββββββββββββββββββββ ββ β βββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββ β βΌCore Patterns (Read Second)ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ββ LAYER 2: Essential Patterns (60 minutes) ββ ββ βββββββββββββββββββββββββββββββββββββββ ββ β CQRS Pattern β ββ β "Separating reads from writes" β ββ ββββββββ¬ββββββββββββββββββββ¬βββββββββββ ββ β β ββ βΌ βΌ ββ ββββββββββββββββββββ ββββββββββββββββββββ ββ β Handler Discovery β β Domain Modeling β ββ β "Auto-registration"β β "Business logic" β ββ ββββββββββββββββββββ ββββββββββββββββββββ ββ ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β βΌAdvanced Patterns (Read Third)ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ββ LAYER 3: Advanced Patterns (90 minutes) ββ ββ βββββββββββββββββββββββββββββββββββββββ ββ β Event Sourcing β ββ β "State as events" β ββ ββββββββ¬ββββββββββββββββββββ¬βββββββββββ ββ β β ββ βΌ βΌ ββ ββββββββββββββββββββ ββββββββββββββββββββ ββ β Two-Layer Auth β β Saga Pattern β ββ β "Security model" β β "Distributed TX" β ββ ββββββββββββββββββββ ββββββββββββββββββββ ββ ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β βΌInfrastructure (Read As Needed)ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ββ LAYER 4: Operational Concerns (60 minutes) ββ ββ ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ ββ β Telemetry β β Scalability β β Event Store β ββ β & Tracing β β Patterns β β Design β ββ ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ ββ ββ ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ ββ β Message Bus β β Deployment β β Caching β ββ β Reliability β β Strategy β β Strategy β ββ ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ ββ ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββRecommended Reading Order
Section titled βRecommended Reading OrderβFor Quick Understanding (1 hour)
Section titled βFor Quick Understanding (1 hour)βGoal: Understand enough to build services effectively
-
Zero Infrastructure Design (15 min)
- Why the platform exists
- What problems it solves
-
Message Bus Architecture (15 min)
- How services communicate
- Why no direct HTTP calls
-
CQRS Pattern (15 min)
- Command vs Query separation
- Why it matters
-
Handler Discovery (15 min)
- Convention over configuration
- How handlers are auto-registered
For Deep Understanding (3 hours)
Section titled βFor Deep Understanding (3 hours)βGoal: Understand architectural decisions and trade-offs
Phase 1: Foundation (30 min)
- Zero Infrastructure Design
- Message Bus Architecture
- Service Discovery
- API Gateway
Phase 2: Core Patterns (60 min) 5. CQRS Pattern 6. Domain Modeling 7. Handler Discovery 8. Event Sourcing
Phase 3: Advanced Patterns (60 min) 9. Two-Layer Authorization 10. Saga Pattern 11. Read Model Projections
Phase 4: Infrastructure (30 min) 12. Telemetry and Observability 13. Message Bus Reliability 14. Event Store Design
For Platform Extension (5 hours)
Section titled βFor Platform Extension (5 hours)βGoal: Understand internals to extend platform capabilities
Read all concepts in dependency order, then:
- Review Platform Packages
- Study Platform Extensions Tutorial
- Examine platform source code
Content Organization
Section titled βContent OrganizationβArchitecture - How It Works
Section titled βArchitecture - How It Worksββ±οΈ 60 minutes total | π‘ Intermediate
Core architectural components and how they interact:
| Concept | Time | Difficulty | Prerequisites |
|---|---|---|---|
| Message Bus Architecture | 15 min | π’ Beginner | None |
| Service Discovery | 15 min | π‘ Intermediate | Message Bus |
| API Gateway | 15 min | π‘ Intermediate | Service Discovery |
| Zero Infrastructure Design | 15 min | π’ Beginner | None |
| Distributed Tracing | 15 min | π‘ Intermediate | API Gateway |
What youβll understand:
- β Why services communicate exclusively via message bus
- β How API Gateway translates HTTP/GraphQL to messages
- β How services discover and call each other
- β How distributed tracing works across services
- β Why thereβs no infrastructure code in services
Patterns - Why It Works
Section titled βPatterns - Why It Worksββ±οΈ 90 minutes total | π‘ Intermediate
Design patterns and best practices used throughout the platform:
| Concept | Time | Difficulty | Prerequisites |
|---|---|---|---|
| CQRS Pattern | 20 min | π‘ Intermediate | Message Bus |
| Event Sourcing | 30 min | π΄ Advanced | CQRS |
| Domain Modeling | 15 min | π’ Beginner | CQRS |
| Two-Layer Authorization | 15 min | π‘ Intermediate | Domain Modeling |
| Saga Pattern | 30 min | π΄ Advanced | Event Sourcing |
| Handler Discovery | 15 min | π’ Beginner | CQRS |
What youβll understand:
- β Why commands and queries are separated
- β How state is stored as event sequences
- β How to express business logic without infrastructure
- β How permissions and policies work together
- β How distributed transactions are coordinated
- β How handlers are auto-discovered
Infrastructure - Operational Concerns
Section titled βInfrastructure - Operational Concernsββ±οΈ 60 minutes total | π΄ Advanced
Platform infrastructure and operational concerns:
| Concept | Time | Difficulty | Prerequisites |
|---|---|---|---|
| Telemetry and Observability | 15 min | π‘ Intermediate | Distributed Tracing |
| Service Deployment | 10 min | π‘ Intermediate | Zero Infrastructure |
| Scalability | 15 min | π΄ Advanced | Message Bus |
| Message Bus Reliability | 10 min | π‘ Intermediate | Message Bus |
| Event Store | 15 min | π΄ Advanced | Event Sourcing |
| Caching Strategy | 10 min | π‘ Intermediate | CQRS |
What youβll understand:
- β How metrics, logs, and traces are collected
- β How services are deployed and scaled
- β How horizontal scaling works
- β How message delivery is guaranteed
- β How events are persisted in PostgreSQL
- β How query results are cached in Redis
Concepts by Use Case
Section titled βConcepts by Use CaseβI want to understandβ¦
Section titled βI want to understandβ¦βHow services communicate β Message Bus Architecture (15 min) β Service Discovery (15 min)
How to separate concerns β CQRS Pattern (20 min) β Domain Modeling (15 min)
How to handle state β Event Sourcing (30 min) β Event Store (15 min)
How security works β Two-Layer Authorization (15 min) β API Gateway (15 min)
How to debug issues β Distributed Tracing (15 min) β Telemetry and Observability (15 min)
How to scale services β Scalability (15 min) β Message Bus Reliability (10 min)
How distributed transactions work β Saga Pattern (30 min) β Event Sourcing (30 min)
How to Read Concept Docs
Section titled βHow to Read Concept DocsβEach concept document follows this structure:
1. Overview ββ What this concept is ββ Why it matters
2. The Problem ββ What problem does this solve? ββ Traditional approaches
3. The Solution ββ How Banyan solves it ββ Key design decisions
4. How It Works ββ Detailed explanation ββ Diagrams and examples
5. Benefits and Trade-offs ββ Advantages ββ Limitations ββ When to use
6. Implementation Details ββ Technical specifics ββ Code examples
7. Related Concepts ββ Prerequisites ββ Next stepsπ‘ Best Practice: Read βOverviewβ and βThe Problemβ sections first to understand context before diving into implementation details.
Learning by Role
Section titled βLearning by RoleβBackend Developer
Section titled βBackend DeveloperβFocus: Understand patterns for building services
30 minutes: Essential readingββ Zero Infrastructure Designββ CQRS Patternββ Handler Discovery
60 minutes: Deep diveββ Event Sourcingββ Domain Modelingββ Two-Layer AuthorizationFull-Stack Developer
Section titled βFull-Stack DeveloperβFocus: Understand how frontend interacts with platform
45 minutes: Essential readingββ API Gatewayββ Message Bus Architectureββ CQRS Patternββ Service Discovery
30 minutes: Real-time featuresββ Event Sourcingββ WebSocket SubscriptionsPlatform Engineer
Section titled βPlatform EngineerβFocus: Understand internals for extension and operations
3 hours: Comprehensive readingββ All Architecture concepts (60min)ββ All Patterns concepts (90min)ββ All Infrastructure concepts (60min)DevOps Engineer
Section titled βDevOps EngineerβFocus: Understand deployment and operations
60 minutes: Operations focusββ Service Deploymentββ Scalabilityββ Telemetry and Observabilityββ Message Bus Reliabilityββ Distributed TracingRelationship to Other Documentation
Section titled βRelationship to Other DocumentationβBefore Reading Concepts
Section titled βBefore Reading Conceptsββ Recommended: Complete Getting Started first
Having hands-on experience makes concepts more concrete and easier to understand.
While Reading Concepts
Section titled βWhile Reading Conceptsβ- See it in action: Examples demonstrate concepts
- Look up details: Reference provides API specifics
- Clarify confusion: Troubleshooting addresses common misunderstandings
After Reading Concepts
Section titled βAfter Reading Conceptsβ- Apply knowledge: Tutorials let you practice
- Solve problems: Guides show how to implement patterns
- Build services: Use concepts to make better design decisions
Quick Concept Lookup
Section titled βQuick Concept Lookupβ| If youβre wonderingβ¦ | Read this conceptβ¦ |
|---|---|
| Why no HTTP between services? | Message Bus Architecture |
| Why separate commands and queries? | CQRS Pattern |
| How do events become state? | Event Sourcing |
| How does auto-discovery work? | Handler Discovery |
| How do permissions work? | Two-Layer Authorization |
| How do I debug across services? | Distributed Tracing |
| How do distributed transactions work? | Saga Pattern |
| How does caching work? | Caching Strategy |
| How does the platform scale? | Scalability |
| Why no infrastructure code? | Zero Infrastructure Design |
Start learning β Zero Infrastructure Design (15 minutes, π’ Beginner)