Initial commit
This commit is contained in:
54
skills/database-sharding-manager/SKILL.md
Normal file
54
skills/database-sharding-manager/SKILL.md
Normal file
@@ -0,0 +1,54 @@
|
||||
---
|
||||
name: managing-database-sharding
|
||||
description: |
|
||||
This skill assists with managing database sharding strategies. It is activated when the user needs to implement horizontal database sharding to scale beyond single-server limitations. The skill supports designing sharding strategies, distributing data across multiple database instances, and implementing consistent hashing, automatic rebalancing, and cross-shard query coordination. Use this skill when the user mentions "database sharding", "sharding implementation", "scale database", or "horizontal partitioning". The plugin helps design and implement sharding for high-scale applications.
|
||||
allowed-tools: Read, Write, Edit, Grep, Glob, Bash
|
||||
version: 1.0.0
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
This skill empowers Claude to design and implement horizontal database sharding strategies. It guides the user through the process of distributing data across multiple database instances, ensuring scalability and performance for applications handling large datasets and high query loads.
|
||||
|
||||
## How It Works
|
||||
|
||||
1. **Strategy Design**: Analyzes the application's data model and access patterns to determine the optimal sharding key and sharding strategy (e.g., range-based, hash-based).
|
||||
2. **Implementation Planning**: Generates a detailed plan for implementing the chosen sharding strategy, including database schema modifications, data migration procedures, and application code changes.
|
||||
3. **Cross-Shard Query Coordination**: Provides guidance on implementing cross-shard query coordination mechanisms to ensure data consistency and accuracy across multiple shards.
|
||||
|
||||
## When to Use This Skill
|
||||
|
||||
This skill activates when you need to:
|
||||
- Scale a database beyond the capacity of a single server.
|
||||
- Distribute write load across multiple database servers.
|
||||
- Improve database performance by reducing contention.
|
||||
|
||||
## Examples
|
||||
|
||||
### Example 1: Scaling an E-commerce Product Catalog
|
||||
|
||||
User request: "Implement database sharding for my e-commerce product catalog to handle increased traffic and product listings."
|
||||
|
||||
The skill will:
|
||||
1. Analyze the product catalog's data model and access patterns.
|
||||
2. Recommend a hash-based sharding strategy based on product ID.
|
||||
3. Generate a plan for migrating the product catalog data to the sharded database.
|
||||
|
||||
### Example 2: Sharding a Social Media Activity Feed
|
||||
|
||||
User request: "Design a sharding strategy for a social media activity feed to handle millions of users and billions of activities."
|
||||
|
||||
The skill will:
|
||||
1. Evaluate the activity feed's data model and query patterns.
|
||||
2. Suggest a time-based sharding strategy combined with user ID sharding.
|
||||
3. Outline the steps for implementing cross-shard queries to retrieve activities across multiple shards.
|
||||
|
||||
## Best Practices
|
||||
|
||||
- **Data Modeling**: Carefully consider the sharding key and its impact on query performance.
|
||||
- **Data Migration**: Plan the data migration process thoroughly to minimize downtime and ensure data integrity.
|
||||
- **Monitoring**: Implement robust monitoring to track shard performance and identify potential issues.
|
||||
|
||||
## Integration
|
||||
|
||||
This skill can be integrated with other database management tools and plugins to automate tasks such as schema creation, data migration, and monitoring. It complements plugins focused on database deployment and performance tuning.
|
||||
7
skills/database-sharding-manager/assets/README.md
Normal file
7
skills/database-sharding-manager/assets/README.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Assets
|
||||
|
||||
Bundled resources for database-sharding-manager skill
|
||||
|
||||
- [ ] sharding_config_template.yaml: Template for the sharding configuration file.
|
||||
- [ ] example_data_distribution.json: Example of data distribution across shards.
|
||||
- [ ] monitoring_dashboard.json: Example dashboard configuration for monitoring sharding performance.
|
||||
10
skills/database-sharding-manager/references/README.md
Normal file
10
skills/database-sharding-manager/references/README.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# References
|
||||
|
||||
Bundled resources for database-sharding-manager skill
|
||||
|
||||
- [ ] sharding_strategies.md: Documentation on different database sharding strategies (e.g., range-based, hash-based).
|
||||
- [ ] consistent_hashing.md: Detailed explanation of consistent hashing and its implementation.
|
||||
- [ ] auto_rebalancing.md: Guide on implementing automatic rebalancing of shards.
|
||||
- [ ] cross_shard_query_patterns.md: Best practices for querying data across multiple shards.
|
||||
- [ ] sharding_api_reference.md: API documentation for interacting with the sharding manager.
|
||||
- [ ] error_handling_sharding.md: Best practices for error handling in sharded environments
|
||||
8
skills/database-sharding-manager/scripts/README.md
Normal file
8
skills/database-sharding-manager/scripts/README.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# Scripts
|
||||
|
||||
Bundled resources for database-sharding-manager skill
|
||||
|
||||
- [ ] init_sharding.py: Script to initialize database sharding based on a given strategy.
|
||||
- [ ] rebalance_shards.py: Script to rebalance data across shards automatically.
|
||||
- [ ] cross_shard_query.py: Script to execute queries across multiple shards and aggregate results.
|
||||
- [ ] validate_sharding_config.py: Script to validate the sharding configuration file.
|
||||
Reference in New Issue
Block a user