A simple net/rpc-like rpc framework implemented by Golang.
-
Support Multiple Encode and Decode Protocols
-
Support Multiple Network Protocols
-
Reflected Server and Concurrent Client
-
Timeout Handle Mechanism
-
Load Balance with Client or Server Discovery
-
Registry Center with Health Check
func main() {
log.SetFlags(0)
registryAddr := "http://localhost:9999/gingle/registry"
addr := make(chan string)
go StartClient(addr)
StartServer(addr, registryAddr)
ch1 := make(chan string)
ch2 := make(chan string)
go StartServer(ch1, registryAddr)
go StartServer(ch2, registryAddr)
StartXClientByPeerToPeer(registryAddr)
StartXClientByBroadcast(registryAddr)
}
-
Unit Tests
-
More Load Balance Algorithms
-
Refactor Codes