Skip to content
Snippets Groups Projects
Commit 4ebd55f9 authored by fangyincheng's avatar fangyincheng
Browse files

Merge remote-tracking branch 'upstream/develop' into develop

parents e8f0f975 d8886339
No related branches found
No related tags found
No related merge requests found
# dubbo-go #
# go-for-apache-dubbo #
---
Apache Dubbo Golang Implementation.
......@@ -6,27 +6,57 @@ Apache Dubbo Golang Implementation.
Apache License, Version 2.0
## Code design ##
Based on dubbo's layered code design (protocol layer,registry layer,cluster layer,config layer and so on),
About detail design please refer to [code layered design](https://github.com/dubbo/go-for-apache-dubbo/wiki/dubbo-go-V2.6-design)
## Feature list ##
+ 1 Transport: HTTP(√)
+ 2 Codec: JsonRPC(√), Hessian(X)
+ 3 Service discovery:Service Register(√), Service Watch(√)
+ 4 Registry: ZooKeeper(√), Etcd(X), Redis(X)
+ 5 Strategy: Failover(√), Failfast(√)
+ 6 Load Balance: Random(√), RoundRobin(√)
+ 7 Role: Consumer(√), Provider(√)
+ Role: Consumer(√), Provider(√)
+ Transport: HTTP(√), TCP(√) Based on [getty](https://github.com/AlexStocks/getty)
+ Codec: JsonRPC(√), Hessian(√) Based on [hession2](https://github.com/dubbogo/hessian2)
+ Registry: ZooKeeper(√)
+ Cluster Strategy: Failover(√)
+ Load Balance: Random(√)
+ Filter: Echo(√)
## Quick Start
## Code Example
The subdirectory examples shows how to use go-for-apache-dubbo. Please read the examples/readme.md carefully to learn how to dispose the configuration and compile the program.
The subdirectory examples shows how to use dubbo-go. Please read the examples/readme.md carefully to learn how to dispose the configuration and compile the program.
## Benchmark
Benchmark project please refer to [go-for-apache-dubbo-benchmark](https://github.com/dubbogo/go-for-apache-dubbo-benchmark)
About go-for-apache-dubbo benchmarking report, please refer to [dubbo benchmarking report](https://github.com/dubbo/go-for-apache-dubbo/wiki/pressure-test-report-for-dubbo) & [jsonrpc benchmarking report](https://github.com/dubbo/go-for-apache-dubbo/wiki/pressure-test-report-for-jsonrpc)
## Todo list
- [ ] Tcp Transport and Hessian2 protocol
- [ ] Network
- [ ] Fuse
- [ ] Rate Limit
- [ ] Trace
- [ ] Metrics
- [ ] Load Balance
Implement more extention:
* cluster strategy : Failfast/Failsafe/Failback/Forking/Broadcast
* load balance strategy: RoundRobin/LeastActive/ConsistentHash
* standard filter in dubbo: TokenFilter/AccessLogFilter/CountFilter/ActiveLimitFilter/ExecuteLimitFilter/GenericFilter/TpsLimitFilter
* registry impl: consul/etcd/k8s
Compatible with dubbo v2.7.x and not finished function in dubbo v2.6.x:
* routing rule (dubbo v2.6.x)
* monitoring (dubbo v2.6.x)
* metrics (dubbo v2.6.x)
* dynamic configuration (dubbo v2.7.x)
About the roadmap please refer to [roadmap](https://github.com/dubbo/go-for-apache-dubbo/wiki/Roadmap)
......@@ -38,7 +38,7 @@ func (invoker *baseClusterInvoker) Destroy() {
}
func (invoker *baseClusterInvoker) IsAvailable() bool {
//TODO:不理解java版本中关于stikyInvoker的逻辑所以先不写
//TODO:sticky connection
return invoker.directory.IsAvailable()
}
......@@ -46,9 +46,9 @@ func (invoker *baseClusterInvoker) IsAvailable() bool {
func (invoker *baseClusterInvoker) checkInvokers(invokers []protocol.Invoker, invocation protocol.Invocation) error {
if len(invokers) == 0 {
ip, _ := gxnet.GetLocalIP()
return jerrors.Errorf("Failed to invoke the method %v . No provider available for the service %v from"+
return jerrors.Errorf("Failed to invoke the method %v . No provider available for the service %v from "+
"registry %v on the consumer %v using the dubbo version %v .Please check if the providers have been started and registered.",
invocation.MethodName(), invoker.directory.GetUrl().Key(), invoker.directory.GetUrl().String(), ip, version.Version)
invocation.MethodName(), invoker.directory.GetUrl().SubURL.Key(), invoker.directory.GetUrl().String(), ip, version.Version)
}
return nil
......
......@@ -331,8 +331,8 @@ func (z *zookeeperClient) RegisterTemp(basePath string, node string) (string, er
tmpPath, err = z.conn.Create(zkPath, data, zk.FlagEphemeral, zk.WorldACL(zk.PermAll))
}
z.Unlock()
if err != nil && err != zk.ErrNodeExists {
//if err != nil {
//if err != nil && err != zk.ErrNodeExists {
if err != nil {
log.Warn("conn.Create(\"%s\", zk.FlagEphemeral) = error(%v)\n", zkPath, jerrors.ErrorStack(err))
return "", jerrors.Trace(err)
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment