• Stars
    star
    146
  • Rank 252,769 (Top 5 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 2 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Business Demo for CloudWeGo

CloudWeGo Demo for Business

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 istiod as xDS server for CRD configuration and distribution
  • Use wire for dependency injection
  • Use opentelemetry for tracing
  • Implement proxyless flow lane with Kitex-xds and opentelemetry baggage
  • Implement a bookinfo ui using arco-design react
Which CloudWeGo subprojects are used? List all technologies used.
Detailed documentation

bookinfo

Contributors & Maintainers

@CoderPoet

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 Go using kitex?
What is the business scenario?

The application demonstrates the usage of kitex generic call.

  • We build the generic call client for each backend server by traversing IDL in Hertz.
  • Hertz will accept the requests with the query path of prefix /gateway .
  • Gateway handler will process these requests and route them to backend server by generic call client.
  • payment server is just a sample server using kitex.This service design pkg with Clean Structure.
What are the core technologies/projects used?
  • Use Hertz as Gateway.
  • Use Kitex generic call client route requests.
  • Use Kitex as RPC framework to build micro-services.
  • Use Clean Architecture for design pkg and code layout.
  • Use ent entity framework for implementing repository.
  • Use wire for dependency injection
  • Use Nacos as service registry.
  • Use MySQL as RDBMS.
Which CloudWeGo subprojects are used? List all technologies used.
Detailed documentation

Open Payment Platform

Contributors & Maintainers

@baiyutang

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 hz and kitex to generate code
  • Use Hertz requestid, jwt, pprof, gzip middlewares
  • Use go-tagexpr and thrift-gen-validator for validating HTTP and RPC request
  • Use obs-opentelemetry for tracing
  • Use etcd as service registry.
  • Use GORM for implementing repository.
  • Use MySQL as RDBMS.
Which CloudWeGo subprojects are used? List all technologies used.
Detailed documentation

easy_note

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 Hertz as Gateway.
  • Use Kitex as RPC framework to build microservices.
  • Use Hertz swagger, jwt, pprof, gzip middlewares.
  • Use ETCD as service registry.
  • Use MySQL as RDBMS.
  • Use Redis as cache.
  • Use ElasticSearch as search-engine.
Which CloudWeGo subprojects are used? List all technologies used.
Detailed documentation

Book Shop

Contributors & Maintainers

@bodhisatan

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 hz and kitex to generate code
  • Use Hertz paseto, cors, gzip, http2, limiter, opensergo, pprof, websocket middlewares
  • Use obs-opentelemetry for tracing
  • Use consul as service registry and config center.
  • Use GORM for implementing repository.
  • Use MySQL as RDBMS.
  • Use MongoDB as DOCDB.
  • Use Redis as cache.
  • Use MinIO as object storage center.
  • Use RabbitMQ as MQ.
  • Implement a FreeCar-Admin using arco-design react.
  • Implement a FreeCar-MP using WeChat applet.
Which CloudWeGo subprojects are used? List all technologies used.
Detailed documentation

FreeCar

Contributors & Maintainers

More Repositories

1

kitex

Go RPC framework with high-performance and strong-extensibility for building micro-services.
Go
6,844
star
2

netpoll

A high-performance non-blocking I/O networking framework, which focused on RPC scenarios, developed by ByteDance.
Go
2,325
star
3

volo

Rust RPC framework with high-performance and strong-extensibility for building micro-services.
Rust
2,176
star
4

hertz

A high-performance and strong-extensibility Go HTTP framework that helps developers build microservices.
Go
1,161
star
5

goref

Go heap object reference analysis tool
Go
541
star
6

sonic-rs

A fast Rust JSON library based on SIMD.
Rust
379
star
7

shmipc-go

A high performance inter-process communication golang library developed by CloudWeGo
Go
348
star
8

dynamicgo

Dynamically and efficiently operate RPC data for Go
Go
141
star
9

pilota

A thrift and protobuf implementation in pure rust with high performance and extensibility.
Rust
120
star
10

frugal

A very fast dynamic Thrift serializer & deserializer.
Go
112
star
11

cwgo

An all-in-one code generation tool for CloudWeGo
Go
102
star
12

thriftgo

An implementation of thrift compiler in go language.
Go
99
star
13

cloudwego.github.io

Website for CloudWeGo
JavaScript
59
star
14

kitex-examples

Go
50
star
15

netpoll-http2

Go
43
star
16

kitex-benchmark

Go
31
star
17

netpoll-benchmark

Go
18
star
18

hertz-examples

Examples for Hertz.
Go
18
star
19

localsession

transparently transmit context within or between goroutines
Go
18
star
20

configmanager

Go
10
star
21

kitex-tests

Tests for cloudwego/kitex
Go
2
star
22

netpoll-examples

Go
2
star
23

thrift-gen-validator

thrift-gen-validator is a thriftgo plugin to generate struct validators.
Go
2
star
24

.github

1
star
25

community

Governance and community material for CloudWeGo and its open source sub-projects
1
star
26

gopkg

Go
1
star