项目作者: rdbcache

项目描述 :
redis database cache asynchronous api server
高级语言: Java
项目地址: git://github.com/rdbcache/rdbcache.git
创建时间: 2018-02-09T15:55:38Z
项目社区:https://github.com/rdbcache/rdbcache

开源协议:Other

下载


This README serves as a quick start docuement. For more detailed documentation, please visit website: http://rdbcache.com

Install rdbcache

rdbcache is a java application. It requires Java version 1.8+ runtime environment.

For Mac/Linux:

  1. curl https://raw.githubusercontent.com/rdbcache/rdbcache/master/download/install | sh
  2. # check if OK
  3. rdbcache -v
  4. Put following environment variables in your ~/.bash_profile.
  5. Please replace the values with the proper ones for your environment.
  6. export RDBCACHE_PORT=8181
  7. export REDIS_SERVER=localhost
  8. export DATABASE_NAME=testdb
  9. export DATABASE_SERVER=localhost
  10. export DB_USER_NAME=dbuser
  11. export DB_USER_PASS=rdbcache
  12. rdbcache

For Windows:

click download rdbcache.zip

  1. # check if OK
  2. java -jar rdbcache.jar -v
  3. Please replace the values with the proper ones for your environment.
  4. SET RDBCACHE_PORT=8181
  5. SET REDIS_SERVER=localhost
  6. SET DATABASE_NAME=testdb
  7. SET DATABASE_SERVER=localhost
  8. SET DB_USER_NAME=dbuser
  9. SET DB_USER_PASS=rdbcache
  10. java -jar rdbcache.jar

Playing with rdbcache

  1. curl http://localhost:8181/v1/set/my-hash-key/my-value
  2. {"timestamp":1518188737321,"duration":"0.00639","key":"my-hash-key","trace_id":"5554d502d58448e0a137196af0a4b1fa"}
  3. curl http://localhost:8181/v1/get/my-hash-key
  4. {"timestamp":1518188797475,"duration":"0.000454","key":"my-hash-key","data":"my-value","trace_id":"6f7c05360ec74b12bda80ec692030031"}
  5. curl http://localhost:8181/v1/select/rdbcache_monitor?limit=3
  6. ...
  7. curl http://localhost:8181/v1/select/rdbcache_stopwatch?limit=3
  8. ...

You can find all the available APIs and complete documentation at http://rdbcache.com.

Playing with source code

rdbcache uses maven and build on top of Java Spring Boot 1.5.10. It requires maven 3.5+ and JDK version 1.8+.

Download source from github

git clone https://github.com/rdbcache/rdbcache.git

cd rdbcache

mvn clean test

mvn clean spring-boot:run

mvn clean test package