Forest
An open-source framework for distributed services and data sharding is released with the following features:
- Simple Application
- Lightweight Framework
- Easy to expand
Source code, Detailed introduction documents and examples: https://github.com/wtt2012/forest
Architecture
Forest-core
Core APIs and basic implementations. However, to create a distributed service, such as a redis/memecached cluster, you can also create a data sharding service, such as horizontal and vertical (vertical) Scaling services of databases.
Forest-core currently supports exact match and range match of shards.
Example:
- Example
- Range match example
- Basic server example
- Basic server example
- Pooled server example
- Another pooled server example
- Test example
Forest-Database
Based on forest-core, a database shard service based on a connection pool is implemented. There are many examples to learn about sharding example.
Maven dependency
Add Repository
<Repository> <ID> fengfei-repo </ID> <Name> fengfei repository </Name> <URL> http://fengfei.googlecode.com/svn/maven-repo/releases </URL> </Repository> <repository> <ID> fengfei-Snapshot </ID> <Name> fengfei repository </Name> <URL> http://fengfei.googlecode.com/svn/maven-repo/snapshots </URL> </Repository>
Use it as a Maven dependency:
<Dependency> <groupid> fengfei. Forest </groupid> <artifactid> forest-core </artifactid> <version> 1.0-Snapshot </version> </dependency>
Or
<Dependency> <groupid> fengfei. Forest </groupid> <artifactid> forest-database </artifactid> <version> 1.0-Snapshot </version> </dependency>