distributed k/v cache system with rpc communication surpported

httpserver test


cd server

rpcconn test


cd rpcconn/test


In the test of rpcconn,we get keys from the api server by the command of “curl “http://localhost:9999/api?key=[key]“. The api server communicates with peers from remote server that we replace with localhost socket by rpc call, which is implemented in the rpcconn file.

Some bugs encountered

[Lincache] Failed to get from peer read tcp> use of closed network connection

To fix it : add sync.WaitGroup and sync.Once to RPCClient making sure that all the ongoing calls will be done before the conn is closed once.


View Github