CloudWeGo Demo for Business
April 21, 2023 ยท View on GitHub
This repo contains CloudWeGo demos with business logic, providing valuable references for enterprise user using in production.
Each demo should/may contain multiple CloudWeGo subprojects, e.g. Kitex & Hertz, and demonstrate an individual business scenario.
Demo List
1. Bookinfo
Description
What is it about and what problem does it solve?
- How to use kitex proxyless in istio?
- How to implement full-process traffic lane using CloudWeGo?
What is the business scenario?
Rewrite Bookinfo project using hertz, kitex, same as the Bookinfo
The application displays information about a book, similar to a single catalog entry of an online book store. Displayed on the page is a description of the book, book details (ISBN, number of pages, and so on), and a few book reviews.
The Bookinfo application is broken into four separate microservices:
- productpage. The productpage microservice calls the details and reviews microservices to populate the page.
- details. The details microservice contains book information.
- reviews. The reviews microservice contains book reviews. It also calls the ratings microservice.
- ratings. The ratings microservice contains book ranking information that accompanies a book review.
What are the core technologies/projects used?
- Use
istiodas xDS server for CRD configuration and distribution - Use
wirefor dependency injection - Use
opentelemetryfor tracing - Implement proxyless
flow lanewithKitex-xdsandopentelemetry baggage - Implement a bookinfo ui using
arco-designreact
Which CloudWeGo subprojects are used? List all technologies used.
Detailed documentation
Contributors & Maintainers
2. Open Payment Platform
Description
What is it about and what problem does it solve?
- How to use kitex generic call as the http gateway?
- How to implement Clean Structure of
Gousing kitex?
What is the business scenario?
The application demonstrates the usage of kitex generic call.
- We build the
generic callclient for each backend server by traversing IDL in Hertz. - Hertz will accept the requests with the query path of prefix
/gateway. Gatewayhandler will process these requests and route them to backend server bygeneric callclient.paymentserver is just a sample server using kitex.This service design pkg withClean Structure.
What are the core technologies/projects used?
- Use
Hertzas Gateway. - Use
Kitexgeneric call client route requests. - Use
Kitexas RPC framework to build micro-services. - Use
Clean Architecturefor design pkg and code layout. - Use
ententity framework for implementing repository. - Use
wirefor dependency injection - Use
Nacosas service registry. - Use
MySQLas RDBMS.
Which CloudWeGo subprojects are used? List all technologies used.
Detailed documentation
Contributors & Maintainers
3. Easy Note
Description
What is it about and what problem does it solve?
- How to get started with Hertz and Kitex collaboration?
- How to structure projects when using Hertz and Kitex?
What is the business scenario?
Migrate easy_note and optimize the project.
The application shows a note service that allows users to create, delete, update, and query notes.
The easy_note application is divided into three microservices:
- demoapi is an HTTP service that handles HTTP requests and calls other services via RPC.
- demouser is an RPC service that handles user related operations.
- demonote is an RPC service that handles note related operations and calls demouser service via RPC.
What are the core technologies/projects used?
- Use
hzandkitexto generate code - Use Hertz
requestid,jwt,pprof,gzipmiddlewares - Use
go-tagexprandthrift-gen-validatorfor validating HTTP and RPC request - Use
obs-opentelemetryfor tracing - Use
etcdas service registry. - Use
GORMfor implementing repository. - Use
MySQLas RDBMS.
Which CloudWeGo subprojects are used? List all technologies used.
Detailed documentation
Contributors & Maintainers
4. Book Shop
Description
What is it about and what problem does it solve?
- How to integrate middlewares(such as
ElasticSearch,Redis...) in Kitex project? - How to layer code in projects of different complexity using Hertz and Kitex?
What is the business scenario?
The application shows an e-commerce system that includes merchants managing items, consumers managing personal accounts and placing orders to buy items.
The book-shop application is divided into four microservices:
- facade is an HTTP service that handles HTTP requests and calls other services via RPC.
- user is an RPC service that handles user managements.
- item is an RPC service that handles item managements.
- order is an RPC service that handles order managements.
What are the core technologies/projects used?
- Use
Hertzas Gateway. - Use
Kitexas RPC framework to build microservices. - Use Hertz
swagger,jwt,pprof,gzipmiddlewares. - Use
ETCDas service registry. - Use
MySQLas RDBMS. - Use
Redisas cache. - Use
ElasticSearchas search-engine.
Which CloudWeGo subprojects are used? List all technologies used.
Detailed documentation
Contributors & Maintainers
5. FreeCar
Description
What is it about and what problem does it solve?
- How to use the idea of domain-driven development to develop in Kitex?
- How to develop Hertz and Kitex through RPC + AGW mode?
What is the business scenario?
Time-sharing car rental system kit in the cloud-native era.
The FreeCar application is divided into six microservices:
- api is an HTTP service that handles HTTP requests and calls other services via RPC.
- user is an RPC service that handles user related operations.
- profile is an RPC service that handles profile related operations.
- blob is an RPC service that handles blob related operations.
- car is an RPC service that handles car related operations.
- trip is an RPC service that handles trip related operations.
What are the core technologies/projects used?
- Use
hzandkitexto generate code - Use Hertz
paseto,cors,gzip,http2,limiter,opensergo,pprof,websocketmiddlewares - Use
obs-opentelemetryfor tracing - Use
consulas service registry and config center. - Use
GORMfor implementing repository. - Use
MySQLas RDBMS. - Use
MongoDBas DOCDB. - Use
Redisas cache. - Use
MinIOas object storage center. - Use
RabbitMQas MQ. - Implement a FreeCar-Admin using
arco-designreact. - Implement a FreeCar-MP using WeChat applet.