v0.5.0 release candidate 01
version 0.5.0 changelog
1 file changed
tree: ab542c486e89368c556a20ee1a67dde5e0c99c27
  1. .github/
  2. cmd/
  3. configs/
  4. docs/
  5. igt/
  6. pkg/
  7. samples/
  8. .asf.yaml
  9. .gitignore
  10. .gitmodules
  11. .travis.yml
  12. before_ut.sh
  13. before_validate_license.sh
  14. CHANGE.md
  15. docker-entrypoint.sh
  16. Dockerfile
  17. go.mod
  18. go.sum
  19. integrate_test.sh
  20. LICENSE
  21. Makefile
  22. NOTICE
  23. quick_start_for_windows.md
  24. README.md
  25. README_CN.md
  26. start_integrate_test.sh
README.md

Pixiu Logo

Language Build Status

English | 中文

Introduction

Dubbo-Go-Pixiu is a gateway that mainly focuses on providing gateway solution to your Dubbo and RESTful services.

It supports HTTP-to-Dubbo and HTTP-to-HTTP proxy and more protocols will be supported in the near future.

Quick Start

cd samples dir

cd samples/dubbo/simple

we can use start.sh to run samples quickly. for more info, execute command as below for more help

./start.sh [action] [project]
./start.sh help

we run body samples below step

prepare config file and docker

prepare command will prepare dubbo-server and pixiu config file and start docker container needed

./start.sh prepare body

if prepare config file manually, notice:

  • modify $PROJECT_DIR in conf.yaml to absolute path in your compute

start dubbo or http server

./start.sh startServer body

start pixiu

./start.sh startPixiu body

if run pixiu manually, use command as below

 go run cmd/pixiu/*.go gateway start -c /[absolute-path]/dubbo-go-pixiu/samples/dubbo/simple/body/pixiu/conf.yaml

Try a request

use curl to try or use unit test

curl -X POST 'localhost:8881/api/v1/test-dubbo/user' -d '{"id":"0003","code":3,"name":"dubbogo","age":99}' --header 'Content-Type: application/json' 
./start.sh startTest body

Clean

./start.sh clean body

Features

  • You can customize your own dubbo-go-pixiu with plugin.
  • Multiple default filters to manage your APIs.
  • Dubbo and HTTP proxies.
  • Customizable request parameters mapping.
  • Automatically recognizes RPC services from service registration center and exposes it in HTTP protocol.
  • Sidecar or centralized deployment(Planning)
  • Dubbo protocol's rate-limiting in Istio environment(Planning)

Architecture

Pixiu Architecture

architecture

Pixiu Flow Chart

flow chart

Term

Components

  • Pixiu : Data panel

  • Admin : Control Panel

Concepts

  • Downstream : Downstream is the requester who sends request to and expecting the response from dubbo-go-pixiu. (Eg.Postman client, Browser)

  • Upstream : The service that receive requests and send responses to dubbo-go-pixiu. (Eg. Dubbo server)

  • Listener : The way that the dubbo-go-pixiu exposes services to upstream clients. It could be configured to multiple listeners for one dubbo-go-pixiu.

  • Cluster : Cluster is a set of upstream services that logically similar, such as dubbo cluster. pixiu can identifies the cluster members through service discovery and proactively probes their healthiness so that the pixiu can route the requests to proper cluster member base on load balancing strategies.

  • Api : API is the core concept of the dubbo-go-pixiu, all the upstream services will be configured and exposed through API.

  • Client : The actual caller of the upstream services.

  • Router : Router routes the HTTP request to proper upstream services according to the API configs.

  • Context : The context of a request in dubbo-go-pixiu includes almost all information to get response from upstream services. It will be used in almost all process in the dubbo-go-pixiu, especially the filter chain.

  • Filter : Filter manipulate the incoming requests. It is extensible for the users.

Contact Us

The project is under intensively iteration, you are more than welcome to use, suggest and contribute codes.

Community

DingDing Group (31363295):

flowchart

WeChat Official Account:

flowchart

We welcome the friends who can give us constructing suggestions instead of known-nothing.

License

Apache License, Version 2.0