用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/AzureFoxStudios/wabi --skill wabidb-replication-deployment命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | wabidb-replication-deployment |
| version | 0.1.0 |
| author | Hermes |
| description | Learn WabiDB replication deployment patterns for production environments. |
| platforms | ["linux","macos","windows"] |
| metadata | {"hermes":{"tags":["Replication","WabiDB","Deployment","Production"]}} |
This skill provides a structured approach to learning WabiDB's replication deployment patterns specifically for production environments, focusing on configuration, monitoring, and operational best practices.
Use these commands to explore replication deployment patterns:
# View replication configuration template
read_file /var/home/Ronin/wabi/core/crates/wabidb/docs/replication-config.md
# View deployment configuration template
read_file /var/home/Ronin/wabi/core/crates/wabidb/docs/deployment-config.md
# Run replication health checks
cargo test -p wabidb --test replication_health
| Component | Key Files | Key Configuration | Purpose |
|---|---|---|---|
| Replication Config | replication-config.md | sync_interval, peer_endpoints | Configure replication parameters |
| Deployment Config | deployment-config.md | replica_count, sync_strategy | Configure deployment parameters |
| Monitoring | replication-monitor.rs | health_check_interval, metrics_endpoint | Monitor replication health |
| Health Checks | replication_health.rs | sync_status, lag_metrics | Verify replication health |
Pattern: Configure replication parameters for production environments.
Key Components:
sync_interval: Set synchronization interval (default: 1 second)peer_endpoints: List of peer endpoints for replicationsync_strategy: Choose between push, pull, or hybrid strategiesreplica_count: Number of replicas for high availabilityExample Configuration:
replication:
sync_interval: 1000000 # 1 second in microseconds
peer_endpoints:
- "http://peer1:8080"
- "http://peer2:8080"
sync_strategy: "hybrid"
replica_count: 3
Pattern: Configure deployment parameters for production environments.
Key Components:
replica_count: Number of replicas for high availabilitysync_strategy: Choose between push, pull, or hybrid strategieshealth_check_interval: Interval for health checksmetrics_endpoint: Endpoint for metrics collectionExample Configuration:
deployment:
replica_count: 3
sync_strategy: "hybrid"
health_check_interval: 5000000 # 5 seconds in microseconds
metrics_endpoint: "/metrics"
Pattern: Implement monitoring and observability for replication.
Key Components:
health_check_interval: Interval for health checksmetrics_endpoint: Endpoint for metrics collectionsync_status: Monitor synchronization statuslag_metrics: Track replication lagExample Monitoring:
pub async fn check_replication_health(&self) -> Result<ReplicationHealth> {
let sync_status = self.get_sync_status().await?;
let lag_metrics = self.get_replication_lag().await?;
Ok(ReplicationHealth {
sync_status,
lag_metrics,
})
}
Pattern: Implement health checks and verification for replication.
Key Components:
sync_status: Verify synchronization statuslag_metrics: Check replication lagcycle_count: Track synchronization cycleslatest_commit_seq: Verify latest commit sequenceExample Health Check:
#[tokio::test]
async fn verify_replication_health() {
let worker = SyncWorker::new("http://peer:8080", 1_000_000);
worker.run_once().await.unwrap();
let health = worker.check_replication_health().await.unwrap();
assert_eq!(health.sync_status, SyncStatus::Synced);
assert!(health.lag_metrics < 100);
}
Pattern: Follow operational best practices for replication.
Key Components:
Example Best Practices:
Confirm your understanding by running these commands:
# Run replication health checks
cargo test -p wabidb --test replication_health
# Run deployment configuration tests
cargo test -p wabidb --test deployment_config
# Run monitoring tests
cargo test -p wabidb --test replication_monitor
These tests should all pass, demonstrating the key aspects of WabiDB's replication deployment patterns for production environments.