All Projects → qichengzx → Seqsvr

qichengzx / Seqsvr

Licence: mit
High performance unique number generator powered by Go

Programming Languages

go
31211 projects - #10 most used programming language

Labels

Projects that are alternatives of or similar to Seqsvr

StackFlowView
Enforce stack behaviour for custom UI flow.
Stars: ✭ 35 (-39.66%)
Mutual labels:  sequence
Smile
😄 Emoji in Swift
Stars: ✭ 359 (+518.97%)
Mutual labels:  sequence
Numgen
Creates objects that generate number sequences
Stars: ✭ 5 (-91.38%)
Mutual labels:  sequence
visualize-dna-sequences
Visualizing DNA Sequences via Javascript
Stars: ✭ 51 (-12.07%)
Mutual labels:  sequence
Sequency
⚡️ Type-safe functional sequences for processing iterable data
Stars: ✭ 294 (+406.9%)
Mutual labels:  sequence
Fromfrom
A JS library written in TS to transform sequences of data from format to another
Stars: ✭ 462 (+696.55%)
Mutual labels:  sequence
sequence-as-promise
Executes array of functions as sequence and returns promise
Stars: ✭ 23 (-60.34%)
Mutual labels:  sequence
Fill Range
Fill in a range of numbers or letters, positive or negative, optionally passing an increment or multiplier to use.
Stars: ✭ 41 (-29.31%)
Mutual labels:  sequence
Sars tutorial
Repository for the tutorial on Sequence-Aware Recommender Systems held at TheWebConf 2019 and ACM RecSys 2018
Stars: ✭ 320 (+451.72%)
Mutual labels:  sequence
Period
PHP's time range API
Stars: ✭ 616 (+962.07%)
Mutual labels:  sequence
perf
PERF is an Exhaustive Repeat Finder
Stars: ✭ 26 (-55.17%)
Mutual labels:  sequence
Zheng
基于Spring+SpringMVC+Mybatis分布式敏捷开发系统架构,提供整套公共微服务服务模块:集中权限管理(单点登录)、内容管理、支付中心、用户管理(支持第三方登录)、微信平台、存储系统、配置中心、日志分析、任务和通知等,支持服务治理、监控和追踪,努力为中小型企业打造全方位J2EE企业级开发解决方案。
Stars: ✭ 16,163 (+27767.24%)
Mutual labels:  sequence
Gomonkey
gomonkey is a library to make monkey patching in unit tests easy
Stars: ✭ 473 (+715.52%)
Mutual labels:  sequence
seqlike
Unified biological sequence manipulation in Python
Stars: ✭ 181 (+212.07%)
Mutual labels:  sequence
Restez
😴 📂 Create and Query a Local Copy of GenBank in R
Stars: ✭ 22 (-62.07%)
Mutual labels:  sequence
e2-scripts
Scripts for working with electribe 2.
Stars: ✭ 20 (-65.52%)
Mutual labels:  sequence
Tsai
Time series Timeseries Deep Learning Pytorch fastai - State-of-the-art Deep Learning with Time Series and Sequences in Pytorch / fastai
Stars: ✭ 407 (+601.72%)
Mutual labels:  sequence
Yacrd
Yet Another Chimeric Read Detector
Stars: ✭ 49 (-15.52%)
Mutual labels:  sequence
Nunit cshaprp cheatsheet
Example implementations of each attribute available in Nunit2 unit Testing Framework using C# .NET.
Stars: ✭ 14 (-75.86%)
Mutual labels:  sequence
Seqkit
A cross-platform and ultrafast toolkit for FASTA/Q file manipulation in Golang
Stars: ✭ 607 (+946.55%)
Mutual labels:  sequence

SEQSVR

High performance unique number generator powered by Go

中文 README

Features

  • Distributed: Can be scaled horizontally
  • High performance: Allocation ID only accesses memory (up to the upper limit will request the database once)
  • Ease of use: Provide as HTTP service
  • Unique: MySQL auto increment ID, never repeat

Requirement

We are using these awesome projects as necessary libraries.

  • gopkg.in/yaml.v2
  • github.com/go-sql-driver/mysql
  • github.com/satori/go.uuid

Installation

You can install this service in the following three ways.

Note: You need to create the database and modify the configuration of the database in the configuration file before starting.

go get:

go get github.com/qichengzx/seqsvr
seqsvr

Compile By Yourself:

git clone [email protected]:qichengzx/seqsvr.git
cd seqsvr
go build .
./seqsvr

Docker:

The Docker "multi-stage" build feature is used, be ensure the Docker version is 17.05 or above. See:Use multi-stage builds

git clone [email protected]:qichengzx/seqsvr.git
cd seqsvr
docker build -t seqsvr:latest .
docker run -p 8000:8000 seqsvr:latest

Create Database

The database name can be customized, modify config.yml.

Then import the following SQL to generate the data table.

CREATE TABLE `generator_table` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uuid` char(36) NOT NULL COMMENT 'Machine identification',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id_UNIQUE` (`id`),
  UNIQUE KEY `stub_UNIQUE` (`uuid`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

Configuration

The configuration file is using YAML.

#app
port: ':8000'

#service
step: 100

#db
mysql:
  user: 'root'
  password: ''
  host: 'tcp(localhost:3306)'
  database: 'sequence'

Usage

curl http://localhost:8000/new

{"code":0,"msg":"ok","data":{"id":101}}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].