##branch 에 대해..
master branch 는 저장소로 redis 만 사용합니다.
thrift branch 는 master와 동일하지만 post 저장 및 조회에 대해서 redis와 thrift 클라이언트를 이용해 각각 비동기적으로 요청합니다.
하지만 thrift를 이용한 요청은 응답이 왔을때 log로만 남깁니다.
##로컬에서 테스트하기 위해선..
node.js + redis
- 소스 clone
<git clone "git url">
- /dao/index.js 파일 수정
var client = new redis.createClient(port번호, 'ip주소', null);
- 실행
node app.js
thrift 연동 테스트
- branch 변경
git checkout thrift
-
/lib/thrift_client.js 파일 수정
var connection = thrift.createConnection('ip 주소', port번호),
client = thrift.createClient(Post, connection); -
실행
node app.js
- 참고
thrift Repository(https://github.com/teragoon/thrift)에 있는 java용 thrift 클라이언트 실행 필요