ShardingJH is a distributed database project that relies on Spring Boot, Hibernate and SQLite. It features P2P routing, gossip-based node discovery and sharding between multiple SQLite instances.
See the demo at ShardingJH Demo.
- Java 8+
- SQLite
- Maven
- RabbitMQ
- Ensure Java 8+ ,SQLite and RabbitMQ are available on your PATH.
- Build the project using the Maven wrapper:
./mvnw clean package -DskipTests
- Choose a server profile (
server1,server2,server3orserver4) and run the application with the helper script:Profiles contain individual port and routing settings stored in the./run-app.sh server1
src/main/resourcesdirectory.
If you prefer to start the jar manually, run:
java -jar target/*.jar --spring.profiles.active=server1The project contains a GitHub Actions workflow (.github/workflows/github-actions-ec2.yml) that deploys the packaged jar to multiple EC2 servers. Each server corresponds to a different profile. The deployment script also inserts the RabbitMQ password into application.properties before running run-app.sh remotely.
| Name | Responsibilities |
|---|---|
| JiDung | Encryption, P2P routing, Sharding strategy, MVCC and roll back, Static file replication, RabbitMQ product update sync, Frontend, AWS Deployment, Spring Boot framework, SQLite establishment |
| Haopeng | Gossip, HeartBeat messaging, Dynamic hash allocating |
