go-doudou

go-doudou(doudou pronounce /dəudəu/)is OpenAPI 3.0 (for REST) spec and Protobuf v3 (for grpc) based lightweight microservice framework. It supports monolith service application as well.

MIT License

Stars
1.4K
Committers
16

Bot releases are hidden (Show)

go-doudou - v1.0.2

Published by wubin1989 over 2 years ago

Changelog

  • Add rootPath field to go client struct for configuring path prefix when sending http requests
  • Add Nacos as another option for service discovery
  • Add NacosRRServiceProvider and NacosWRRServiceProvider for supporting load balancing of services fetched from Nacos server
  • Fix bug for OpenAPI 3.0 onlinedoc when GDD_ROUTE_ROOT_PATH is set
  • Replaced json marshal with msgpack for serializing node meta data, which makes meta data size smaller nearly 40% than json, but the optimization also makes v1.0.2 not compatible with old versions. Please upgrade go-doudou to the latest version if possible.
go-doudou - v1.0.0

Published by wubin1989 over 2 years ago

Changelog

  • Rearraged project structure to make developers understand this project more easily
  • Disable calculating weight mechanism by default and optimize config default value
  • Add cors support for /go-doudou/openapi.json endpoint for third-party code generation tool
  • Update online documentation html for rendering recursive data structure such as tree
  • Update online documentation html for rendering html code in doc content
  • Add headers parameter to go client method signatures
  • Other minor optimizations
go-doudou - v0.9.8

Published by wubin1989 over 2 years ago

  1. Add *resty.Response to go client sdk return parameters inspired by github go sdk
  2. Add new feature to IDL: non-pointer parameters are required, pointer parameters are optional
  3. Support variadic functions in IDL: varargs parameters will be treated as pointer-slice type, means optional
  4. Add request parameters required validation feature
  5. Add BizError struct for passing error message, business error code and http status code from service implementation layer to http handler layer
  6. Add GDD_MEM_LOG_DISABLE environment variable to disable memberlist log, default is false
  7. Some minor fixes and optimizations
go-doudou - v0.9.7

Published by wubin1989 over 2 years ago

  1. Fix registry endpoint bug: when a node left and come back, the node's status is still suspect in browser.
  2. Add --pre flag to go-doudou svc push subcommand to let developer add prefix string to docker image name.
  3. Add a built-in endpoint GET /go-doudou/config to display all environment variable pairs in browser.
  4. Add latest release version notify and upgrade feature by go-doudou version command
go-doudou - v0.9.6 Fix incorrectly leave

Published by wubin1989 over 2 years ago

  1. Remove mlist.Leave from registry.Shutdown method because calling leave method will send a left message to remote peers and make its state to be StateLeft. A node won't gossip messages to StateLeft nodes any more. If left a cluster incorrectly by calling leave method, the node won't have any chance to refute suspect or dead message to let remote peers know it still alive (or become alive again).
  2. Add another package level method for leaving cluster
// Leave leaves the cluster on purpose
func Leave(timeout time.Duration) {
	if mlist != nil {
		_ = mlist.Leave(timeout)
		logger.Info("local node left the cluster")
	}
}
go-doudou - v0.9.5

Published by wubin1989 almost 3 years ago

  1. Optimization: disable memberlist node weight calculation when GDD_MEM_WEIGHT is set to >0
  2. Optimization: update openapi doc ui to latest version of go-doudou-openapi-ui with new feature that sidebar menu width can be ajusted
go-doudou - v0.9.4 Redis GCRA Rate Limiter

Published by wubin1989 almost 3 years ago

  1. Add Redis GCRA Rate Limiter
  2. Refactored ratelimit package
  3. Support configuring rate limit by formatted string, for example: 0.0055 reqs/second with burst 20: "0.0055-S-20"
  4. Type of MemoryStore field keys is changed from map to *lru.Cache in order to control memory usage
go-doudou - v0.9.2 Log and ELK stack

Published by wubin1989 almost 3 years ago

Improved log feature for supporting ELK stack better

go-doudou - v0.9.1 Circuitbreaker/Timeout/Retry/Prometheus

Published by wubin1989 almost 3 years ago

  1. Add Circuitbreaker/Timeout/Retry support (including metrics for Prometheus)
  2. Add custom Prometheus service discovery for go-doudou services
go-doudou - v0.9.0 RateLimit and Bulkhead

Published by wubin1989 almost 3 years ago

  1. Add rate limit support
  2. Add bulkhead pattern support
go-doudou - v0.8.9 cors

Published by wubin1989 almost 3 years ago

Add http.MethodOptions to support cors

go-doudou - v0.8.8 net.DNSError

Published by wubin1989 almost 3 years ago

Properly Handle no such host error from memberlist

go-doudou - v0.8.7 ddhttp.Tracing

Published by wubin1989 almost 3 years ago

  1. Add Tracing middleware to ddhttp package to make tracing usage more flexible. If you need to use it, please make sure to add it as earlier as possible. etc.:
srv.AddMiddleware(ddhttp.Tracing, ddhttp.Metrics, requestid.RequestIDHandler, handlers.CompressHandler, handlers.ProxyHeaders, ddhttp.Logger, ddhttp.Rest, ddhttp.Recover)
  1. Refactered ddhttp Logger middleware to add opentracing span field to ddhttp.HttpLog struct
  2. Fix ddhttp Logger middleware bug in order to print key/value pairs from multipart/form-data request (but ignore uploaded file binary) . etc.:
DEBU[2021-12-30 12:17:03] {
    "clientIp": "[::1]:53489",
    "httpMethod": "POST",
    "uri": "/upload/avatar",
    "proto": "HTTP/1.1",
    "host": "localhost:6061",
    "reqContentLength": 199769,
    "reqHeader": {
        "Accept": [
            "*/*"
        ],
        "Cache-Control": [
            "no-cache"
        ],
        "Connection": [
            "keep-alive"
        ],
        "Content-Length": [
            "199769"
        ],
        "Content-Type": [
            "multipart/form-data; boundary=--------------------------631217490048140198896124"
        ],
        "User-Agent": [
            "PostmanRuntime/7.28.3"
        ],
        "X-Request-Id": [
            "5d1816f2-439e-412d-aa65-fd963baa5863"
        ]
    },
    "requestId": "5d1816f2-439e-412d-aa65-fd963baa5863",
    "rawReq": "ps=laborum",
    "respBody": "{\"ri\":0,\"rs\":\"OK\"}\n",
    "statusCode": 200,
    "respHeader": {
        "Content-Type": [
            "application/json; charset=UTF-8"
        ]
    },
    "respContentLength": 19,
    "elapsedTime": "3.89µs",
    "span": "33238964ec22e157:33238964ec22e157:0000000000000000:1"
} 
go-doudou - v0.8.6 minor improvement

Published by wubin1989 almost 3 years ago

go-doudou - v0.8.5 Jaeger

Published by wubin1989 almost 3 years ago

Add Jaeger support

go-doudou - v0.8.4 Close method for v3.FileModel

Published by wubin1989 almost 3 years ago

Add Close method to v3.FileModel struct for releasing the resouce

go-doudou - v0.8.3 retry

Published by wubin1989 almost 3 years ago

Add client side retry feature. If one node cannot process requests, retry another node.

go-doudou - v0.8.1

Published by wubin1989 almost 3 years ago

Filter suspect nodes when send http requests in elegant way

go-doudou - v0.8.0

Published by wubin1989 almost 3 years ago

Add smooth weighted round-robin load balancing feature. If environment variable GDD_MEM_WEIGHT is not set, local node weight will be calculated by health score and cpu idle percent every GDD_MEM_WEIGHT_INTERVAL and gossip to remote nodes.

go-doudou - v0.7.10

Published by wubin1989 almost 3 years ago

  1. Add index update feature support to ddl migration tool
  2. Add foreign key create and update features to ddl migration tool
  3. Remove « and » in name of components of OpenAPI3 json generated from some Java OpenAPI3 implementation libraries
  4. Add v3.FileModel as svc methods parameter for uploading files
  5. Filter suspected nodes when doing client load balancing
  6. Disabled indirect ping feature as no need to do so in our RESTful service use case. If ping failed, it means we shouldn't send requests to that backend.
Package Rankings
Top 1.81% on Proxy.golang.org