bsc-s2 / lua-acid

A collection of lua util functions
MIT License
18 stars 5 forks source link

Name

lua-acid

Status

This library is in beta phase.

It is deployed in a production envinroment and has been running stably. But it still requires more tests and docs.

Description

lua-acid is a colleciton of lua utility functions and a classic paxos implementation.

It is meant to be a underlaying code base for building a distributed system.

Modules

name description status
acid.async_cache shared-dict based cache, update asynchronously. well tested
acid.chash consistent hash module. well tested
acid.counter hot event counter. well tested
acid.strutil string operation functions. well tested
acid.tableutil table operation functions. well tested
acid.unittest unittest engine that looks for test functions in a dir. well tested
acid.utf8 utf8 encoding and decoding. well tested
acid.xml xml to table and table to xml. well tested
acid.cache in-process or shared-dict based cache. not well tested
acid.cluster cluster implementation based on paxos. not well tested
acid.logging logging utilities. not well tested
acid.paxos classic paxos implementation. not well tested

Install

Test

This package needs perl command prove to run unittest:

# install in centos 7
$ yum install -y perl-CPAN perl-Test-Harness

run test:

$ sudo cpan Test::Nginx

# optional, setup nginx path:
$ export PATH=$PATH:/usr/local/Cellar/openresty/1.11.2.3/nginx/sbin

# test all
$ prove

# test modules with verbose mode
# prove t/ngx_abort_test.t t/ngx_abort.t -v

check nginx.conf and logs used in test under t/servroot/conf, t/servroot/logs.

lua-poxos

Classic Paxos implementation in lua.

Nginx cluster management based on paxos.

Feature:

Author

Zhang Yanpo (张炎泼) drdr.xp@gmail.com

Copyright and License

The MIT License (MIT)

Copyright (c) 2015 Zhang Yanpo (张炎泼) drdr.xp@gmail.com