Silky Microservice FrameworkSilky Microservice Framework
Home
Docs
Config
Source
github
gitee
  • 简体中文
  • English
Home
Docs
Config
Source
github
gitee
  • 简体中文
  • English
  • Introduction

    • Silky Framework Overview
  • Getting Started

    • Glossary
    • Quick Start
    • Project Template
    • Microservice Architecture
    • Sample Projects
  • Host & Module

    • Host Types
    • Gateway Configuration
    • Module System
    • Plugin System
  • Gateway & HTTP

    • Swagger / OpenAPI
    • MiniProfiler
    • CORS
    • Audit Logging
  • Service & RPC

    • App Services & Service Entries
    • RPC Communication
    • WebSocket
    • Service Registry
    • Service Governance
  • Data & Cache

    • EFCore Data Access
    • Caching
    • Distributed Lock
  • Security & Auth

    • Identity & Authentication
    • Distributed Transactions
  • Infrastructure

    • Dependency Injection
    • Object Mapping
    • Validation
    • Link Tracking (SkyAPM)
    • Logging (Serilog)
    • Health Checks
    • Message Bus (MassTransit)
    • Unit & Integration Testing

Overview

Silky provides official sample projects that demonstrate how to build production-oriented microservice applications using the framework.

Sample: Microservice E-Commerce

A complete e-commerce microservice sample at: https://github.com/liuhll/silky.sample

Architecture

The sample includes the following services:

ServiceDescription
GatewayHostAPI gateway, external HTTP entry point
AccountServiceUser accounts, balance management
OrderServiceOrder creation, TCC distributed transaction coordinator
InventoryServiceStock reservation and deduction (TCC participant)
IdentityServiceJWT authentication and authorization

Technology Stack

  • Registry: Zookeeper (Docker Compose included)
  • Cache: Redis
  • Database: MySQL (via EFCore)
  • Transactions: TCC (Silky.Transaction.Tcc)
  • Logging: Serilog → Elasticsearch
  • Tracing: SkyAPM
  • Documentation: Swagger

Quick Start

git clone https://github.com/liuhll/silky.sample.git
cd silky.sample

# Start infrastructure (Zookeeper, Redis, MySQL, etc.)
docker-compose -f docker-compose/docker-compose.yml up -d

# Start services (example: OrderService)
cd src/OrderService/OrderService.Host
dotnet run

Repository Samples

The framework repository (d:\open-source\silky) contains minimal samples under samples/:

samples/
  quickstart/       # Minimal two-service + gateway project
  microservices/    # Multi-service with EFCore and Redis

Run the Quickstart Sample

cd samples/quickstart
docker-compose up -d       # start Zookeeper and Redis

cd NormalHost
dotnet run                 # start the business service

cd ../GatewayHost
dotnet run                 # start the gateway

Open http://localhost:5000/swagger to see the aggregated Swagger docs.

Learning Path

For framework newcomers, we recommend this order:

  1. Quick Start — understand basic concepts
  2. App Services & Service Entries — service definition
  3. RPC Communication — inter-service calls
  4. Service Governance — resilience policies
  5. Explore the full sample for distributed transactions, caching, and tracing
Edit this page
Prev
Microservice Architecture