Giter Club home page Giter Club logo

jupiter's Introduction

###Jupiter

Jupiter是一个分布式服务框架

######Jupiter Architecture:

       ═ ═ ═▷ init         ─ ─ ─ ▷ async       ──────▶ sync
  ***********************************************************************************
                            ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
                                       ┌ ─ ─ ─ ┐ │
           ─ ─ ─ ─ ─ ─ ─ ─ ─│ Registry  Monitor ───────────────────────────┐
          │                            └ ─ ─ ─ ┘ │                         │
                            └ ─ ─△─ ─ ─ ─ ─△─ ─ ─                          ▼
          │                                                           ┌ ─ ─ ─ ─
        Notify                   ║         ║                            Telnet │
          │         ═ ═ ═ ═ ═ ═ ═           ═ ═ ═ ═ ═ ═ ═ ═ ═         └ ─ ─ ─ ─
                   ║                                         ║             ▲
          │    Subscribe                                  Register         │
                   ║                                         ║             │
          │  ┌ ─ ─ ─ ─ ─                          ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─    │
                        │─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ▷           ┌ ─ ─ ─ ┐ │   │
          └ ▷│ Consumer           Invoke          │ Provider  Monitor ─────┘
                        │────────────────────────▶           └ ─ ─ ─ ┘ │
             └ ─ ─ ─ ─ ─                          └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
  ***********************************************************************************

######性能报告: - 小数据包同步阻塞调用qps: 11w+ - 小数据包Future方式调用qps: 17w+ (比同步阻塞调用qps高一些是因为阻塞调用导致瓶颈在客户端, 如果有多台机器作为客户端测试理论上也能达到这个值)

######一些特性:

  • 支持同步阻塞调用, 异步Future, Callback方式调用

  • 支持单播和广播

  • 支持泛化调用

  • 支持udt(有点鸡肋)

  • 序列化/反序列化: 基于SPI并可扩展, 默认使用protostuff

  • 服务发布/订阅: 基于SPI并可扩展, 提供默认注册中心实现, 也支持zookeeper, 支持线上调整已有服务(通过flightexec)

  • 软负载均衡: 基于SPI并可扩展, 默认实现是随机, 按照权重和预热时间设置随机概率

  • 流量控制: 提供app级别和provider级别两种粒度流控, 支持线上调整(通过flightexec)

  • 监控服务: 只能使用telnet, 有点鸡肋, 因为我不会做网页

  • 性能指标度量: log, csv, telnet

  • 链路跟踪: 链路最前端会生成全局唯一的traceId, 后边需要业务代码埋点, 和业务代码之间通过ThreadLocal透传traceId

  • 调用超时设置支持两种粒度: provider级别和方法级别

  • 线上调试(flightexec)

  • 异步链式调用使用:

      // service2依赖service1的返回结果
      // service3依赖service2的返回结果
    
      service1.method1(); // step1. 先调用service1
    
      PromiseInvoker.currentPromise()
              .then(new InvokeDonePipe() {
    
                  @Override
                  public void doInPipe(Object result1) {
                      // result1为service1的调用返回值
                      Object parameter2 = result1;
                      service2.method2(parameter2); // step2. 再调用service2
                  }
              })
              .then(new InvokeDonePipe() {
    
                  @Override
                  public void doInPipe(Object result2) {
                      // result2为service2的调用返回值
                      Object parameter3 = result2;
                      service3.method3(parameter3); // step3. 再调用service3
                  }
              })
              .then(new InvokeDone() {
    
                  @Override
                  public void onDone(Object result3) {
                      // result3为service3的调用返回值
                  }
              }, new InvokeFail() {
    
                  @Override
                  public void onFail(Throwable cause) {
                      // 处理失败
                  }
              });
    

######想做却没做的:

  • Spring融合: 暂时没搞, 主要因为不想依赖Spring特定版本, 其实只需要两个类(SpringProviderBean和SpringConsumerBean), 可自行扩展

######Jupiter使用, 请参考示例代码(挺全的):

######其他:

  • 闲暇时间写着玩的, 娱乐性质, 不过如有人希望尝试使用, 我承诺会一直维护
    1. qq交流: 71287116
    2. 邮件交流: [email protected]

jupiter's People

Contributors

fengjiachun avatar

Watchers

James Cloos avatar  avatar

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.