PHPackages                             basis-company/sharding - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. basis-company/sharding

ActiveLibrary[Framework](/categories/framework)

basis-company/sharding
======================

Sharding framework

0.8.2(4mo ago)1280↓33.3%3MITPHPPHP &gt;=8.3CI passing

Since May 20Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/basis-company/sharding.php)[ Packagist](https://packagist.org/packages/basis-company/sharding)[ RSS](/packages/basis-company-sharding/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (7)Versions (36)Used By (0)

A Sharding Library for PHP
==========================

[](#a-sharding-library-for-php)

[![Ask DeepWiki](https://camo.githubusercontent.com/0f5ae213ac378635adeb5d7f13cef055ad2f7d9a47b36de7b1c67dbe09f609ca/68747470733a2f2f6465657077696b692e636f6d2f62616467652e737667)](https://deepwiki.com/basis-company/sharding.php)[![Latest Version](https://camo.githubusercontent.com/e1cb3270047bbf5f8585a778fd855ad15b6eec3d7798c4496a9bc3edf9a729da/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f62617369732d636f6d70616e792f7368617264696e672e7068702e737667)](https://github.com/basis-company/sharding.php/releases)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)[![Testing](https://github.com/basis-company/sharding.php/actions/workflows/tests.yml/badge.svg)](https://github.com/basis-company/sharding.php/actions/workflows/tests.yml)[![Total Downloads](https://camo.githubusercontent.com/44c49b748109787b668204aa07a5079b9b72f173ae43ad469e25799edb042f1f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f62617369732d636f6d70616e792f7368617264696e672e737667)](https://packagist.org/packages/basis-company/sharding)

Overview
--------

[](#overview)

Sharding is a php library designed to handle domain data that is split into segments, where each segment represents a collection of entities. The library provides mechanisms for persisting these segments across distributed storage systems using a bucket-based approach.

Check out the [documentation](https://deepwiki.com/basis-company/sharding.php) or `tests` folder.

Key Concepts
------------

[](#key-concepts)

### Domain Segmentation

[](#domain-segmentation)

- The domain is divided into logical **segments**, each containing a collection of entities
- Segments allow for horizontal partitioning of data

### Persistence Model

[](#persistence-model)

- Segment persistence is achieved through **buckets**
- Buckets are distributed across multiple storage backends
- Provides fault tolerance and scalability
- We assume that **each storage node (or database instance) contains at most one logical bucket** (shard). This means:
    - **No need to store a `bucket_id` (or shard key) in the data records**—since the storage location itself implies the bucket.
    - **Sharding is storage-aware**: The system routes requests based on the physical/logical storage, not an attribute in the data.

Features
--------

[](#features)

- **Shard management**: Easily create and manage data shards
- **Bucket distribution**: Automatic distribution of buckets across storage systems
- **Entity operations**: CRUD operations for entities within segments
- **Storage abstraction**: Support for multiple storage backends
- **Scalability**: Designed to handle large-scale data distribution

Installation
------------

[](#installation)

```
composer require basis-company/sharding
```

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance75

Regular maintenance activity

Popularity19

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~6 days

Recently: every ~15 days

Total

35

Last Release

137d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d1208fadedf6b3356f8a5c7788d6d1533eb2c8838e166da0cf85f99722319d13?d=identicon)[nekufa](/maintainers/nekufa)

---

Top Contributors

[![nekufa](https://avatars.githubusercontent.com/u/405067?v=4)](https://github.com/nekufa "nekufa (171 commits)")[![Firetawnyowl](https://avatars.githubusercontent.com/u/78279357?v=4)](https://github.com/Firetawnyowl "Firetawnyowl (3 commits)")

---

Tags

postgresqltarantoolshardingbasis

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/basis-company-sharding/health.svg)

```
[![Health](https://phpackages.com/badges/basis-company-sharding/health.svg)](https://phpackages.com/packages/basis-company-sharding)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.6k509.9M17.0k](/packages/laravel-framework)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k84.2M225](/packages/laravel-horizon)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
