Giter Club home page Giter Club logo

grpc.extensions's Introduction

Grpc.Extesions

一个基于GRPC的简单微服务框架

功能

  • 服务注册和发现
    • 默认使用Consul实现
    • 实现IServiceDiscovery,IServiceRegister可扩展zk等
  • 服务自动负载均衡
    • 默认使用轮询实现,可切换随机算法
    • 实现ILoadBalancer可扩展
  • 服务容错
    • 服务连接报错,自动切换节点重试3次
    • 可在DashBoard上手动熔断
  • 调用链跟踪
    • 根据配制来启用Jaeger调用链跟踪
  • 服务网关
    • 使用Kong网关可实现服务的认证授权,协议转换(grpc转http),服务路由,服务限流和熔断等
    • 使用Ocelot网关也可实现上述功能
  • 服务配制
    • 使用Apollo配制中心
  • Grpc DashBoard和监控
    • Http远程调用,手动熔断,日志输出控制
    • 服务报警,可监听日志事件实现错误和超时的钉钉报警
    • 待实现服务统计数据和监控(目前使用日志查询来统计服务的调用次数和调用时长等)
  • 服务端中件间
    • 性能监控[日志,分布式调用链],全局错误处理,手动熔断
    • 实现ServerInterceptor可扩展
  • 客户端中件间
    • 性能监控[日志,分布式调用链],超时时间设置
    • 实现ClientInterceptor可扩展
  • Grpc ProtoFirst
    • 通过Proto生成代码和注释
  • Grpc CodeFirst
    • 通过代码生成proto和注释给第三方语言使用(GrpcMethod自动注册)
    • 代码更干净且方便扩展,例如可以在ProtoMessage上打验证特性来统一处理验证逻辑等
    • 更方便拆分GrpcService到多个类,而不是使用partial class

NuGet Package

支持NetFramework4.6,NetCore2.1

支持asp.netcore3.0

Documentation

待完善

  • 使用Polly实现重试,降级,熔断

依赖的技术栈

感谢

感谢以下的项目,排名不分先后

grpc.extensions's People

Contributors

dependabot[bot] avatar yileicn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

grpc.extensions's Issues

关于GRPC调试问题

官方给出了一个名为Grpcurl的调试工具(类似swagger)用以调试GRPC,我发现ProtoFirst可以使用,但是Codefirst不行。翻了一下源码发现调试工具使用反射来获取接口列表,使用ProtoBuff文件生成的类都包含Descriptor这个属性,想问下大佬有什么好的思路来实现CodeFirst也能够使用Grpcurl

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.