Giter Site home page Giter Site logo

mrpc's Introduction

mrpc (v2)

特性

  • 调用透明
  • 高性能
  • 支持分布式(服务注册和发现)
  • 集成Spring/SpringBoot
  • 支持TCP/HTTP通讯
  • 负载均衡策略
  • 容错处理(FailOver/FailFast)
  • 拦截器处理
  • 客户端断线重连
  • 动态注册/卸载服务
  • 秒级监控

快速入门

创建服务端

public interface UserService {
    String hello(String name);
}

// 服务实现
@RpcService
public class UserServiceImpl implements UserService{
    
    @Override
    public String sayHello(String name){
        return "Hello " + name;
    }
    
}

客户端调用

RpcClient client = new RpcClient("127.0.0.1:5066");
// http协议,默认情况走TCP
client.setTransfer("http");

UserService userService = client.getProxyBean(UserService.class);
System.out.println(userService.hello("mrpc"));

更多例子

这里有更多的使用案例。

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.