diff --git a/README.md b/README.md index 251221c693b52c47d5663b0999fbf948008eafb2..0f261e8284af8181b6199b6b9cdc9e842da82b59 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# 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锛歋ervice 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) diff --git a/cluster/cluster_impl/base_cluster_invoker.go b/cluster/cluster_impl/base_cluster_invoker.go index c833ec75d932587684353a86bdca5539148482c8..c46460fc427e60c70eb216a30b282adc9fd2205b 100644 --- a/cluster/cluster_impl/base_cluster_invoker.go +++ b/cluster/cluster_impl/base_cluster_invoker.go @@ -38,7 +38,7 @@ func (invoker *baseClusterInvoker) Destroy() { } func (invoker *baseClusterInvoker) IsAvailable() bool { - //TODO:涓嶇悊瑙ava鐗堟湰涓叧浜巗tikyInvoker鐨勯€昏緫鎵€浠ュ厛涓嶅啓 + //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 diff --git a/registry/zookeeper/zk_client.go b/registry/zookeeper/zk_client.go index d8d351fbdadf61ed80a363567224cb032271203f..8bbfd3b809e9fcf53d0c77a6dcb7954ab859c547 100644 --- a/registry/zookeeper/zk_client.go +++ b/registry/zookeeper/zk_client.go @@ -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) }