npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

tribedb

v0.2.8

Published

Unlimited expansion MySQL cluster storage system

Readme

TribeDB - 分布式集群储存框架 - Node.js

TribeDB 是一个MySQL分表分库数据中间件,实现MySQL数据的分布式集群储存管理。在处理海量数据、高并发访问时,获得更加优越的性能及横向扩展能力。它包含以下主要特性:

  1. 可伸缩、高扩展的架构
  2. 自动路由分库,维护数据库连接池
  3. 支持数据表的“横向”和“纵向”分表
  4. 支持“一主多从”式读写分离
  5. 分布式并行处理,成倍提升性能
  6. 对应用层隐藏数据来源及技术细节

拥有以上特点意味着,可随时通过增加普通级别数据库服务器的方式,方便地扩展整体系统性能,而无需修改业务层架构和代码。理论上TribeDB的扩展能力上线在于主库单表插入性能和主从数据同步开销。通过合理设计“横向”和“纵向”分表和数据切分粒度,可轻松应对上亿级别的数据量和访问请求。

安装

推荐采用 NPM 方式安装。也可以 下载源码,但需要自己处理依赖。

$ npm install tribedb

#[email protected] node_modules\tribedb
#└── [email protected] ([email protected], [email protected], [email protected])

快速上手:


var tribe = require('tribedb')
  , Query = tribe.Query;
// 添加一个数据库配置
tribe.config.db('db1',{user:'root'});
// 直接执行sql
tribe.pool.query('SELECT 1+1 AS num', { db: 'db1' }, function(err, rows, fields){
  // 结果
});
//插入封装
new Query('post').data({title:'标题'}).insert(function(err, data){
  console.log(err);
  console.log(data);
});
//查询封装
new Query('post').where('title','标题').order_by('time','DESC').limit(1).select(function(err, data){
  console.log(err);
  console.log(data);
});
    

TribeDB通过全局唯一的表名,自动连接对应的数据库,并通过分表配置,将操作映射到涉及的分表,同时完成读写分离。 一切都由TribeDB自动完成,业务层不必关心数据的位置。当数据库负载过高需要添加服务器时,只需简单修改配置文件而不必修改业务代码,甚至将整个架构推倒重来。继续阅读本文档详细了解如何使用。

文档

阅读详细API文档了解如何使用TribeDB。中文文档地址:http://jojoin.github.io/TribeDB/

其它

@ TribeDB - 2015

作者:杨捷

Email:[email protected]

HomePage:http://jojoin.github.io/TribeDB/

Github:https://github.com/jojoin/TribeDB