A difference
A, go-micro: micro- Service Development Library
B, Micro: When you run the Go-micro-based development tools
Two, Micro toolset components
A, API: Application of the internal steering http request
1, API: http request is mapped to the API interface
2, RPC: to map the http request to the RPC service
3, event: http request will be broadcast to subscribers
4, proxy: Reverse Proxy
5, web: websocket reverse proxy support
B, Web: web reverse proxy and management control
C, Proxy: proxy-style requests, support for heterogeneous system requires only a thin client can call Micro Services
1. Note: the Micro API different, Proxy only deals with micro-style RPC request, rather than http request
D, Cli: command line control Micro Services
E, Bot: docking and common communication software, responsible for passing messages, remote command operation
Three, Go-micro frame module
A, service: a specific example of the service, which includes two key components: Client, Server
Client: RPC requests broadcast message
Server: RPC request is received and consumer news
B, Broker: asynchronous communication component
C, Codec: data encoding component
D, Registry: service registration component
E, Selector: Client equalizer
F, Transport: synchronous communication component
Four, Broker asynchronous message component
A, Subscribe: Theme (Topic) registration concerned, specify the queue (queue) to send a message
B, Publish: asynchronous push message topic (Topic)
C, Encoding: encoded message (JSON format default)
Five, Registry registration component
A, registration type
1. Universal based registration center, such as Etcd, Consul, Zookeeper, Eureka
2. The broadcast-based network, such as mDNS, Gossip
3. Based on the message middleware, such as NATS
Six, selector selector component
A, currently supports two algorithms: random and polling
七、Transport同步请求组件
A、