All Projects → xincao9 → yurpc

xincao9 / yurpc

Licence: Apache-2.0 License
high-performance RPC framework.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to yurpc

impress-cli
Impress Application Server Command line interface
Stars: ✭ 25 (-57.63%)
Mutual labels:  service, rpc, soa
Rsf
已作为 Hasor 的子项目,迁移到:http://git.oschina.net/zycgit/hasor
Stars: ✭ 77 (+30.51%)
Mutual labels:  service-discovery, rpc, soa
Spyne
A transport agnostic sync/async RPC library that focuses on exposing services with a well-defined API using popular protocols.
Stars: ✭ 992 (+1581.36%)
Mutual labels:  soap, rpc
prometheus-hetzner-sd
Prometheus Service Discovery for Hetzner
Stars: ✭ 15 (-74.58%)
Mutual labels:  service, service-discovery
Remit
RabbitMQ-backed microservices supporting RPC, pubsub, automatic service discovery and scaling with no code changes.
Stars: ✭ 24 (-59.32%)
Mutual labels:  service, rpc
Jupiter
Jupiter是一款性能非常不错的, 轻量级的分布式服务框架
Stars: ✭ 1,372 (+2225.42%)
Mutual labels:  service-discovery, rpc
Simple Rpc
RPC with service discovery base on netty
Stars: ✭ 103 (+74.58%)
Mutual labels:  service-discovery, rpc
Beehive
🐝 BeeHive is a solution for iOS Application module programs, it absorbed the Spring Framework API service concept to avoid coupling between modules.
Stars: ✭ 4,117 (+6877.97%)
Mutual labels:  service, service-discovery
Jstp
Fast RPC for browser and Node.js based on TCP, WebSocket, and MDSF
Stars: ✭ 132 (+123.73%)
Mutual labels:  rpc, soa
beems
a bee-queue based minimalist toolkit for building fast, decentralized, scalable and fault tolerant microservices
Stars: ✭ 33 (-44.07%)
Mutual labels:  rpc, soa
rpc
RPC-like client-service implementation over messaging queue
Stars: ✭ 26 (-55.93%)
Mutual labels:  service, rpc
server-framework
纯C的分布式服务器框架通用模板,跨平台,模块动态加载,tcp/可靠UDP,协程RPC,日志,集群建立
Stars: ✭ 24 (-59.32%)
Mutual labels:  service, rpc
Rpcx
Best microservices framework in Go, like alibaba Dubbo, but with more features, Scale easily. Try it. Test it. If you feel it's better, use it! 𝐉𝐚𝐯𝐚有𝐝𝐮𝐛𝐛𝐨, 𝐆𝐨𝐥𝐚𝐧𝐠有𝐫𝐩𝐜𝐱!
Stars: ✭ 6,516 (+10944.07%)
Mutual labels:  service-discovery, rpc
Doge
Doge is a high-performance, Python based, open source RPC framework
Stars: ✭ 144 (+144.07%)
Mutual labels:  service-discovery, rpc
Dora Rpc
DoraRPC is an RPC For the PHP MicroService by The Swoole
Stars: ✭ 475 (+705.08%)
Mutual labels:  service-discovery, rpc
Redeo
High-performance framework for building redis-protocol compatible TCP servers/services
Stars: ✭ 392 (+564.41%)
Mutual labels:  service, rpc
Dapeng Soa
A lightweight, high performance micro-service framework
Stars: ✭ 101 (+71.19%)
Mutual labels:  rpc, soa
Zanphp
PHP开发面向C10K+的高并发SOA服务 和RPC服务首选框架
Stars: ✭ 1,451 (+2359.32%)
Mutual labels:  rpc, soa
X
新生命X组件,数据中间件XCode、日志、网络、RPC、序列化、缓存、Windows服务
Stars: ✭ 1,322 (+2140.68%)
Mutual labels:  service, rpc
core
Enterprise Grade #NodeJS Platform implementing Industry Standards & Patterns in order to provide Connectivity, Stability, High-Availability and High-Performance
Stars: ✭ 54 (-8.47%)
Mutual labels:  rpc, soa

yurpc

高性能RPC框架

yurpc 基于java的高性能开源RPC框架,使用方式上类似dubbo,提倡面向接口编程,如果您熟悉dubbo很容易迁移到yurpc;并享受高性能带来的服务体验。提供springboot高度集成starter包,实现零配置使用

logo

yurpc 实战

maven 依赖

<dependency>
    <groupId>com.github.xincao9</groupId>
    <artifactId>yurpc-spring-boot-starter</artifactId>
    <version>1.2.6</version>
</dependency>

实体定义


public class Say {

    private Integer id;
    private String body;

    public Say(Integer id, String body) {
        this.id = id;
        this.body = body;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
    
        this.body = body;
    }

    @Override
    public String toString() {
        return JSONObject.toJSONString(this, SerializerFeature.DisableCircularReferenceDetect);
    }
}

服务接口定义

public interface SayService {

    Say perform(Say say);
}

提供者实现服务接口

@YUProvider
public class SayServiceImpl implements SayService {

    @Override
    public Say perform(Say say) {
        return say;
    }

}

服务提供者启动类

@SpringBootApplication
@EnableYuRPC(server = true)
public class ApplicationProvider {

    public static void main(String... args) {
        SpringApplication.run(ApplicationProvider.class, args);
    }
}

服务消费者启动类

@SpringBootApplication
@EnableYuRPC(client = true)
public class ApplicationConsumer {

    @YUConsumer
    private SayService sayService; // 可以在任何spring bean 中注入yurpc服务


    public static void main(String... args) {
        SpringApplication.run(ApplicationConsumer.class, args);
    }

    @Bean
    public CommandLineRunner commandLineRunner() {
        return (String... args) -> {
            for (int no = 0; no < 100; no++) {
                String value = RandomStringUtils.randomAscii(128);
                Say say = new Say(no, value);
                System.out.println(sayService.perform(say)); // 远程调用yurpc服务
            }
        };
    }

}

application.properties

## 服务发现注册或订阅的zk地址,暂时只支持zookeeper的注册中心
yurpc.discovery.zookeeper=localhost:2181

## 消费者配置
yurpc.client.connectionTimeoutMS=5000 // 服务连接超时时间
yurpc.client.invokeTimeoutMS=1000 // 服务调用超时时间

## 提供者配置
yurpc.server.port=12306 // 服务监听端口

温馨提示

  • 欢迎查看示例 examples
  • yurpc 本身并不是必须和springboot一起使用,在示例中可以查看
  • 单独使用的话,配置文件名为 config.properties,在示例中可以查看
  • @EnableYuRPC(server = true, client = true) 意味着服务角色同为消费端和提供者使用

联系方式

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].