#Decision Framework ??How to Choose Your Approach
Version: 0.43.0 Updated: 2026-03-15 Applies to: ranvier (all crates) Category: Philosophy & Architecture
When you face a choice between "Ranvier way" and "ecosystem way", use this framework to make informed decisions.
#Questions to Ask (In Order)
The first "Yes" determines your approach:
- Is this core business logic? (validation, calculation, orchestration) ??Ranvier way: Visualization, composition, testability
- Do I need to see it in the Schematic graph? (debug complex flows, document for team) ??Ranvier way: Only Transitions appear in Circuit view
- Is this pure infrastructure? (CORS, TLS, rate limiting, circuit breaking) ??Ecosystem way: Reuse battle-tested libraries (Tower)
- Am I migrating from an existing codebase? (Tower app, actix service) ??Hybrid: Start with ecosystem, gradually adopt Ranvier
- Does my team already know tool X? (Tower, Axum, diesel) ??Ecosystem way ??Ranvier: Use existing knowledge, wrap in Transition later
#Decision Flowchart
graph TD
S["START"] --> Q1{"Core business\nlogic?"}
Q1 -->|Yes| R1["Ranvier way\n(Transition)"]
Q1 -->|No| Q2{"Need\nvisualization?"}
Q2 -->|Yes| R2["Ranvier way"]
Q2 -->|No| Q3{"Pure\ninfrastructure?"}
Q3 -->|Yes| E1["Ecosystem way\n(Tower/library)"]
Q3 -->|No| Q4{"Migrating\nexisting?"}
Q4 -->|Yes| H1["Hybrid\n(Tower + Ranvier)"]
Q4 -->|No| D1["Ranvier way\n(when in doubt)"]#Summary Table
| Domain | Ranvier Way | Ecosystem Way | Hybrid |
|---|---|---|---|
| Business logic | Always | Never | ?? |
| Complex auth | Recommended | Possible | Common |
| CORS | Overkill | Use Tower | ?? |
| Database | Wrap in Transition | Direct use OK | Common |
| Metrics | Manual | Use Tower | ?? |
| Middleware | For business rules | For infrastructure | Common |
#When Should I Use Ranvier?
| Scenario | Recommendation |
|---|---|
| New project, complex workflows | Pure Ranvier (Transition) |
| New project, simple CRUD | Maybe Ranvier (simpler frameworks OK) |
| Existing Tower app | Hybrid (keep Tower, add Ranvier for new features) |
| Existing actix/Axum app | Embed Ranvier in handlers |
| Microservice orchestration | Ranvier for orchestrator |
| Leaf CRUD services | Use simpler frameworks |
| Just need CORS/basic auth | Tower/actix/Axum middleware is simpler |
| Multi-step state machines | Ranvier's sweet spot |
Default recommendation: If in doubt and you have any multi-step logic, use Ranvier. The visualization alone justifies the investment.
#Related Documents
- Boundary Map ??Where core ends and edges begin
- Code Examples ??Real-world patterns
- PHILOSOPHY.md ??Decision Framework ??Detailed scenarios and migration paths