All Projects → q315523275 → Familybucket

q315523275 / Familybucket

集合.net core、ocelot、consul、netty、rpc、eventbus、configserver、tracing、sqlsugar、vue-admin、基础管理平台等构建的微服务一条龙应用

Projects that are alternatives of or similar to Familybucket

Core Grpc
C# Grpc驱动封装,基于Consul实现服务注册服务发现,支持dotnetcore / framework,可快速实现基于Grpc的微服务,内部有完整案例,包含服务端Server 客户端 Client,core+grpc, netcore+grpc, dotnetcore+grpc
Stars: ✭ 209 (-66.77%)
Mutual labels:  grpc, consul
Surging
Surging is a micro-service engine that provides a lightweight, high-performance, modular RPC request pipeline. The service engine supports http, TCP, WS,Grpc, Thrift,Mqtt, UDP, and DNS protocols. It uses ZooKeeper and Consul as a registry, and integrates it. Hash, random, polling, Fair Polling as a load balancing algorithm, built-in service gove…
Stars: ✭ 3,088 (+390.94%)
Mutual labels:  grpc, consul
Sitko.Core
Sitko.Core is a set of libraries to help build .NET Core applications fast
Stars: ✭ 46 (-92.69%)
Mutual labels:  consul, grpc
Perfmark
PerfMark is a High Performance Tracing Library.
Stars: ✭ 112 (-82.19%)
Mutual labels:  grpc, tracing
Hyperf
🚀 A coroutine framework that focuses on hyperspeed and flexibility. Building microservice or middleware with ease.
Stars: ✭ 4,206 (+568.68%)
Mutual labels:  grpc, consul
Abp.grpc
基于 ABP 框架开发的 Grpc 模块,支持 Consul 服务发现与服务注册。Grpc module developed based on ABP framework supports early service discovery and service registration.
Stars: ✭ 134 (-78.7%)
Mutual labels:  grpc, consul
fm.consulinterop
a lib for build micro-service
Stars: ✭ 33 (-94.75%)
Mutual labels:  consul, grpc
Microservices Sample
Sample project to create an application using microservices architecture
Stars: ✭ 167 (-73.45%)
Mutual labels:  elasticsearch, consul
Go Project Sample
Introduce the best practice experience of Go project with a complete project example.通过一个完整的项目示例介绍Go语言项目的最佳实践经验.
Stars: ✭ 344 (-45.31%)
Mutual labels:  grpc, consul
Springboot Learning
基于Gradle构建,使用SpringBoot在各个场景的应用,包括集成消息中间件、前后端分离、数据库、缓存、分布式锁、分布式事务等
Stars: ✭ 340 (-45.95%)
Mutual labels:  grpc, elasticsearch
Gnes
GNES is Generic Neural Elastic Search, a cloud-native semantic search system based on deep neural network.
Stars: ✭ 1,178 (+87.28%)
Mutual labels:  grpc, elasticsearch
Netcoremicroservicessample
Sample using micro services in .NET Core 3.1 Focusing on clean code
Stars: ✭ 403 (-35.93%)
Mutual labels:  eventbus, consul
Go Micro Services
HTTP up front, Protobufs in the rear
Stars: ✭ 853 (+35.61%)
Mutual labels:  grpc, consul
Ketchup
ketchup (番茄酱) 是一个基于dotnet core的微服务框架。
Stars: ✭ 170 (-72.97%)
Mutual labels:  grpc, consul
Firecamp
Serverless Platform for the stateful services
Stars: ✭ 194 (-69.16%)
Mutual labels:  elasticsearch, consul
gcloud-opentracing
OpenTracing Tracer implementation for GCloud StackDriver in Go.
Stars: ✭ 44 (-93%)
Mutual labels:  grpc, tracing
Terraform Modules
Reusable Terraform modules
Stars: ✭ 63 (-89.98%)
Mutual labels:  elasticsearch, consul
Java Specialagent
Automatic instrumentation for 3rd-party libraries in Java applications with OpenTracing.
Stars: ✭ 156 (-75.2%)
Mutual labels:  elasticsearch, tracing
Vertx Zero
Zero Framework:http://www.vertxup.cn
Stars: ✭ 320 (-49.13%)
Mutual labels:  grpc, eventbus
Go Microservice Helpers
A collection of handy snippets that simplify creation of GRPC servers and clients
Stars: ✭ 400 (-36.41%)
Mutual labels:  grpc, tracing

微服务全家桶FamilyBucket应用框架

FamilyBucket 是一个集合多个组件应用形成的微服务一体化的全套应用框架。

各组件源码: https://github.com/q315523275/FamilyBucket
UI源码: https://github.com/q315523275/FamilyBucket-UI
部分服务源码: https://github.com/q315523275/FamilyBucket-Server
博客园地址: https://www.cnblogs.com/tianxiangzhe/p/10212337.html
Nuget: Bucket.XXX


特性

  • 没啥特性

各组件矩阵

组件 状态 说明
微服务网关 维护中 使用ocelot服务网关,扩展配置存储方式、子服务dotnetty通信
认证授权组件 维护中 jwt无状态认证方式,动态权限控制
缓存组件 维护中 多种缓存方式实现,本地缓存、redis缓存
配置中心 维护中 提供系统组件、业务等配置信息获取
错误码 维护中 提供系统错误、业务错误等错误码对外的描述信息获取
事件总线 维护中 使用RabbitMQ实现,可用于分布式事务
分布式调度任务 使用中 使用Hangfire分布式调度系统
命令监听 维护中 使用Redis、Zookeeper实现命令监听,用于组件命令接收,如缓存更新清除
日志收集 维护中 对原生日志组件实现扩展,支持Log4Net、NLog、自定义日志
MQ传输(扩展告警系统)
ORM 维护中 基于SqlSugar实现多库读写分离、数据仓储
RPC 升级中 基于DotNetty实现Rpc应用(网关通信扩展),gRpc连接管理
服务发现 维护中 基于Consul实现服务发现、自动注册注销,服务负载计算
链路追踪 维护中 请求链路追踪,由于资源关系对SkyAPM net客户端进行部分修改
工具组件 维护中 常用工具类、验证码、拼音、分词
WebSocket 维护中 原生WebSocket扩展实现,易于扩展与自定义
告警系统 未开放 应用异常实时告警系统,多大屏展示、多种通知方式
应用监控 开发中 应用对应cup、内存、gc、http、并发、异常等数据监控与上报
AspNetCode应用组件 升级中 应用程序组件,用户上下文、健康检查接口、Controller基类、
批量注册、全局异常拦截、ip白名单访问、模型验证、
限速限流、熔断降级等持续开发中...
框架后台管理 升级中 管理框架信息,网关监控路由配置、应用监控与查询管理、
配置中心管理、错误码管理、链路监控与管理、日志管理、通用后台功能管理等

各组件使用

webapi与控制台使用示例,源码: https://github.com/q315523275/FamilyBucket/tree/master/src/Sample

        /// <summary>
        /// 配置服务
        /// </summary>
        public void ConfigureServices(IServiceCollection services)
        {
            // 添加全家桶服务
            services.AddFamilyBucket(familyBucket =>
            {
                // 添加AspNetCore基础服务
                familyBucket.AddAspNetCore();
                // 添加授权认证
                familyBucket.AddApiJwtAuthorize().UseAuthoriser(builder => { builder.UseMySqlAuthorize(); });
                // 添加数据ORM、数据仓储
                familyBucket.AddSqlSugarDbContext().AddSqlSugarDbRepository();
                // 添加错误码服务
                familyBucket.AddErrorCodeServer();
                // 添加配置服务
                familyBucket.AddConfigServer();
                // 添加事件驱动
                familyBucket.AddEventBus(builder => { builder.UseRabbitMQ(); });
                // 添加服务发现
                familyBucket.AddServiceDiscovery(builder => { builder.UseConsul(); });
                // 添加负载算法
                familyBucket.AddLoadBalancer();
                // 添加事件队列日志和告警信息
                familyBucket.AddLogEventTransport();
                // 添加链路追踪
                familyBucket.AddBucketSkyApmCore().UseEventBusTransport();
                // 添加缓存组件
                familyBucket.AddCaching(build =>
                {
                    build.UseInMemory("default");
                    build.UseStackExchangeRedis(new Caching.StackExchangeRedis.Abstractions.StackExchangeRedisOption
                    {
                        Configuration = "10.10.188.136:6379,allowadmin=true",
                        DbProviderName = "redis"
                    });
                });
                // 添加工具组件
                familyBucket.AddUtil();
                // 添加组件定时任务
                familyBucket.AddAspNetCoreHostedService(builder => { builder.AddConfig().AddErrorCode().AddAuthorize(); });
                // 添加组件任务订阅
                familyBucket.AddListener(builder => { builder.UseRedis().AddAuthorize().AddConfig().AddErrorCode(); }); // builder.UseZookeeper();
                // 添加应用批量注册
                familyBucket.BatchRegisterService(Assembly.Load("Bucket.Demo.Repository"), "Repository", ServiceLifetime.Scoped);
                // 添加DotNetty_Rpc使用
                familyBucket.AddRpcCore().UseDotNettyTransport().UseMessagePackCodec().AddClientRuntime().AddServiceProxy(); //.UseProtoBufferCodec()
            });
            // 添加过滤器
            services.AddMvc(option => { option.Filters.Add(typeof(WebApiActionFilterAttribute)); }).AddJsonOptions(options =>
            {
                options.SerializerSettings.ContractResolver = new DefaultContractResolver();
                options.SerializerSettings.DateFormatString = "yyyy-MM-dd HH:mm:ss.fff";
            }).SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
            // 添加接口文档
            services.AddSwaggerGen(c =>
            {
                c.SwaggerDoc("v1", new Info { Title = "微服务全家桶接口服务", Version = "v1" });
                c.IncludeXmlComments(Path.Combine(AppContext.BaseDirectory, "Bucket.WebApi.xml"));
                c.CustomSchemaIds(x => x.FullName);
                // Swagger验证部分
                c.AddSecurityDefinition("Bearer", new ApiKeyScheme { In = "header", Description = "请输入带有Bearer的Token", Name = "Authorization", Type = "apiKey" });
                c.AddSecurityRequirement(new Dictionary<string, IEnumerable<string>> { { "Bearer", Enumerable.Empty<string>() } });
            });
            // 添加HttpClient管理
            services.AddHttpClient();
            // 添加业务组件注册

            // 添加事件消息
            RegisterEventBus(services);
            // 注册调度任务
            RegisterScheduler(services);
        }

性能与稳定

  • 追求极限性能其实不应该使用微服务框架,独立应用对外提供服务最好
  • 网关ocelot虽然有很多功能,但是尽量只当作路由来用不要把过多功能放在网关应用,目前平均一个请求2ms左右延时
  • 提供一个高可用的服务涉及到很多很多,一定要预防好级联雪崩情况
  • 太多了

VNext

  • 灰度发布方案
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].