CloudWeGo Business Demonstrations

repository·main·Indexed 43 days ago

https://github.com/cloudwego/biz-demo

A collection of business-oriented microservices demonstrations using the CloudWeGo framework (Hertz and Kitex). Includes real-world patterns such as API gateways, traffic lanes, and DDD through projects like Book Shop, Easy Note, and GoMall, showcasing integrations with MySQL, Redis, ETCD, OpenTelemetry, and Istio.

Tokens
183.3K
Snippets
637
Records
765
Agent score
52%

What's inside CloudWeGo Biz Demo

  1. Overview of Easy Note Microservices

    main

    Easy Note is a simple note service composed of three microservices built using Kitex and Hertz. It demonstrates how to use different protocols and frameworks within a microservice architecture.

    Service NameUsageFrameworkProtocolPathIDL
    demoapiHTTP interfacekitex/hertzhttpcmd/apiidl/api.thrift
    demouseruser data managementkitex/gormthriftcmd/useridl/user.thrift
    demonotenote data managementkitex/gormthriftcmd/noteidl/note.thrift
  2. Overview of the demo_proto project

    main

    The demo_proto project is a demonstration implementation using the Kitex framework. It serves as a template for implementing a basic MVC (Model-View-Controller) architecture in a microservices context.

    Key features include:

    • Use of the Kitex framework for RPC communication.
    • Automated generation of base code for unit testing.
    • Provision of basic configuration functions.
    • Implementation of a standard MVC code hierarchy.
  3. Overview of the *** Project

    main

    The *** Project is a demonstration application built using the Hertz framework. It showcases a standard MVC (Model-View-Controller) architecture and integrates several Hertz extensions for production-ready features.

    Key Features:

    • Hertz Framework Integration: Uses Hertz as the core web framework.
    • Middleware & Extensions: Includes pprof, cors, recovery, access_log, and gzip.
    • Testing Support: Provides base code generation for unit tests.
    • Observability: Includes basic profiling functions.
    • MVC Pattern: Implements a clean separation of concerns through a structured directory hierarchy.
  4. Overview of the Frontend Project

    main

    The Frontend project is a web service built using the Hertz framework. It implements a basic MVC (Model-View-Controller) architecture and integrates several Hertz extensions, including:

    • pprof: For profiling.
    • cors: For Cross-Origin Resource Sharing.
    • recovery: For panic recovery.
    • access_log: For request logging.
    • gzip: For response compression.

    The project also includes built-in support for generating base code for unit tests and provides basic profiling functions.