Skip to content

A simple net/rpc-like rpc framework implemented by Golang.

License

Notifications You must be signed in to change notification settings

LotteWong/gingle-rpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gingle-rpc

A simple net/rpc-like rpc framework implemented by Golang.


Features

  • 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

Quick Start

Main Demo Sample

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)
}

TODOs

  • Unit Tests

  • More Load Balance Algorithms

  • Refactor Codes

About

A simple net/rpc-like rpc framework implemented by Golang.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages