architecture-paradigm-space-based
Scannednpx machina-cli add skill athola/claude-night-market/architecture-paradigm-space-based --openclawThe Space-Based Architecture Paradigm
When To Use
- High-traffic applications needing elastic scalability
- Systems requiring in-memory data grids
When NOT To Use
- Low-traffic applications where distributed caching is overkill
- Systems with strong consistency requirements over availability
When to Employ This Paradigm
- When traffic or state volume overwhelms a single database node.
- When latency requirements demand in-memory data grids located close to processing units.
- When linear scalability is required, achieved by partitioning workloads across many identical, self-sufficient units.
Adoption Steps
- Partition Workloads: Divide traffic and data into processing units, each backed by a replicated data cache.
- Design the Data Grid: Select the appropriate caching technology, replication strategy (synchronous vs. asynchronous), and data eviction policies.
- Coordinate Persistence: Implement a write-through or write-behind strategy to a durable data store, including reconciliation processes.
- Implement Failover Handling: Design a mechanism for leader election or heartbeats to validate recovery from node loss without data loss.
- Validate Scalability: Conduct load and chaos testing to confirm the system's elasticity and self-healing capabilities.
Key Deliverables
- An Architecture Decision Record (ADR) detailing the chosen grid technology, partitioning scheme, and durability strategy.
- Runbooks for scaling processing units and for recovering from "split-brain" scenarios.
- A monitoring suite to track cache hit rates, replication lag, and failover events.
Risks & Mitigations
- Eventual Consistency Issues:
- Mitigation: Formally document data-freshness Service Level Agreements (SLAs) and implement compensation logic for data that is not immediately consistent.
- Operational Complexity:
- Mitigation: The orchestration of a data grid requires mature automation. Invest in production-grade tooling and automation early in the process.
- Cost:
- Mitigation: In-memory grids can be resource-intensive. Implement aggressive monitoring of utilization and auto-scaling policies to manage costs effectively.
Troubleshooting
Common Issues
Command not found Ensure all dependencies are installed and in PATH
Permission errors Check file permissions and run with appropriate privileges
Unexpected behavior
Enable verbose logging with --verbose flag
Source
git clone https://github.com/athola/claude-night-market/blob/master/plugins/archetypes/skills/architecture-paradigm-space-based/SKILL.mdView on GitHub Overview
Space-based architecture uses a data-grid pattern with in-memory caches to handle stateful workloads at scale. By partitioning workloads into self-sufficient units and using replicated caches with coordinated persistence, it delivers elastic capacity and resilience for high-traffic systems.
How This Skill Works
Traffic and state are partitioned into processing units, each backed by a replicated in-memory cache. Writes are coordinated via write-through or write-behind to a durable data store, with replication and leader-election mechanisms to support failover. The result is low-latency access and near-linear scalability as you add more units.
When to Use It
- High-traffic applications that require elastic scalability and low-latency access.
- Traffic overwhelms a single database node and you need distributed state.
- You need linear scalability by partitioning workloads across many identical, self-sufficient units.
- Latency-sensitive workloads that benefit from in-memory data grids located close to processing units.
- Systems designed for resilience with replicated caches and self-healing capabilities.
Quick Start
- Step 1: Partition workloads into processing units, each backed by a replicated in-memory cache.
- Step 2: Design the data grid by selecting caching technology, replication strategy, and eviction policies.
- Step 3: Coordinate persistence with write-through or write-behind to a durable store and plan for failover and scalability validation.
Best Practices
- Partition workloads into processing units, each backed by replicated caches.
- Design the grid with a clear caching technology choice, replication strategy (synchronous or asynchronous), and eviction policies.
- Coordinate persistence with write-through or write-behind and include reconciliation processes.
- Implement failover handling through leader election or heartbeats to recover from node loss without data loss.
- Validate scalability with load and chaos testing; monitor cache hit rates, replication lag, and failover events.
Example Use Cases
- Real-time bidding platform using space-based grid to handle bursty ad auction state with in-memory caches near edge compute.
- E-commerce storefront maintaining user session and cart state across a distributed grid for fast checkout.
- Fraud detection pipeline that analyzes streams with low-latency access to recent events.
- Telemetry ingestion system that partitions data across caches to scale with traffic.
- Online multiplayer game session state managed by partitioned grids with self-healing partitions.
Frequently Asked Questions
Related Skills
architecture-paradigm-layered
athola/claude-night-market
'Consult this skill when implementing layered patterns or enforcing layer
architecture-paradigm-microkernel
athola/claude-night-market
'Minimal core system with plugin-based feature extensibility for platform
architecture-paradigm-microservices
athola/claude-night-market
'Consult this skill when designing or evolving microservices architectures.
architecture-paradigm-pipeline
athola/claude-night-market
'Consult this skill when designing data pipelines or transformation workflows.
architecture-paradigm-serverless
athola/claude-night-market
'Serverless FaaS for event-driven workloads with minimal infrastructure
architecture-paradigm-client-server
athola/claude-night-market
'Consult this skill when designing client-server systems or API architectures.