All Projects → fengjiachun → Jupiter

fengjiachun / Jupiter

Licence: apache-2.0
Jupiter是一款性能非常不错的, 轻量级的分布式服务框架

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Jupiter

Rsf
已作为 Hasor 的子项目,迁移到:http://git.oschina.net/zycgit/hasor
Stars: ✭ 77 (-94.39%)
Mutual labels:  rpc, rpc-framework, spring, service-discovery, distributed-systems, high-performance, cluster
Simple Rpc
RPC with service discovery base on netty
Stars: ✭ 103 (-92.49%)
Mutual labels:  rpc, nio, spring, service-discovery, netty
Pudding
Pudding 是一款迷你级分布式服务框架
Stars: ✭ 24 (-98.25%)
Mutual labels:  netty, rpc, rpc-framework, hessian
Xxl Rpc
A high performance, distributed RPC framework.(分布式服务框架XXL-RPC)
Stars: ✭ 493 (-64.07%)
Mutual labels:  rpc, hessian, high-performance, netty
Getty
a netty like asynchronous network I/O library based on tcp/udp/websocket; a bidirectional RPC framework based on JSON/Protobuf; a microservice framework based on zookeeper/etcd
Stars: ✭ 532 (-61.22%)
Mutual labels:  microservice, rpc, rpc-framework, netty
Brpc Java
Java implementation for Baidu RPC, multi-protocol & high performance RPC.
Stars: ✭ 647 (-52.84%)
Mutual labels:  microservice, rpc, high-performance, netty
Dapeng Soa
A lightweight, high performance micro-service framework
Stars: ✭ 101 (-92.64%)
Mutual labels:  microservice, rpc, high-performance, netty
Naivechat
🎭 本项目是作者小傅哥使用JavaFx、Netty4.x、SpringBoot、Mysql等技术栈和偏向于DDD领域驱动设计方式,搭建的仿桌面版微信实现通信核心功能。课程文章已发布到GitChat专栏,欢迎购买。如果本项目能为您提供帮助,请给予支持(关注、⭐️Star、分享)!
Stars: ✭ 290 (-78.86%)
Mutual labels:  spring, socket, netty4, netty
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 (+374.93%)
Mutual labels:  microservice, rpc, service-discovery
Hemera
🔬 Writing reliable & fault-tolerant microservices in Node.js https://hemerajs.github.io/hemera/
Stars: ✭ 773 (-43.66%)
Mutual labels:  microservice, rpc, distributed-systems
Easyrpc
EasyRpc is a simple, high-performance, easy-to-use RPC framework based on Netty, ZooKeeper and ProtoStuff.
Stars: ✭ 79 (-94.24%)
Mutual labels:  rpc, rpc-framework, netty
Microdot
Microdot: An open source .NET microservices framework
Stars: ✭ 1,222 (-10.93%)
Mutual labels:  microservice, service-discovery, distributed-systems
Go Zero
go-zero is a web and rpc framework written in Go. It's born to ensure the stability of the busy sites with resilient design. Builtin goctl greatly improves the development productivity.
Stars: ✭ 13,156 (+858.89%)
Mutual labels:  microservice, rpc, rpc-framework
Scalecube Services
ScaleCube Services is a high throughput, low latency reactive microservices library built to scale. it features: API-Gateways, service-discovery, service-load-balancing, the architecture supports plug-and-play service communication modules and features. built to provide performance and low-latency real-time stream-processing. its open and designed to accommodate changes. (no sidecar in a form of broker or any kind)
Stars: ✭ 482 (-64.87%)
Mutual labels:  service-discovery, distributed-systems, cluster
Twjitm
项目基于idea工作环境搭建的框架,添加mybatis3,spring4,springmvc4,以及redis。主要实现通过注解和反射自定义netty私有协议栈,实现在一条socket通道上传递不同的消息,采用支持tcp,udp和http协议
Stars: ✭ 26 (-98.1%)
Mutual labels:  rpc, spring, netty
Tars
Tars is a high-performance RPC framework based on name service and Tars protocol, also integrated administration platform, and implemented hosting-service via flexible schedule.
Stars: ✭ 9,277 (+576.17%)
Mutual labels:  microservice, rpc-framework, high-performance
Nettyrpc
NettyRPC is high performance java rpc server base on Netty,using kryo,hessian,protostuff support message serialization.
Stars: ✭ 1,131 (-17.57%)
Mutual labels:  rpc, spring, netty
Wheel
关于net nio os cache db rpc json web http udp tcp mq 等多个小工具的自定义实现
Stars: ✭ 45 (-96.72%)
Mutual labels:  rpc, nio, netty
T Io
解决其它网络框架没有解决的用户痛点,让天下没有难开发的网络程序
Stars: ✭ 1,331 (-2.99%)
Mutual labels:  nio, socket, netty
Gotree
Gotree is a vertically distributed framework. Gotree's goal is to easily develop distributed services and liberate the mental burden of developers.
Stars: ✭ 91 (-93.37%)
Mutual labels:  rpc, rpc-framework, distributed-systems

License Maven Central Build Status Code Quality: Java Total Alerts

Jupiter:

  • Jupiter 是一款性能非常不错的, 轻量级的分布式服务框架

Jupiter Architecture:

       ═ ═ ═▷ init         ─ ─ ─ ▷ async       ──────▶ sync
----------------------------------------------------------------------------------------

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

---------------------------------------------------------------------------------------

RELEASE-NOTES

性能:

文档:

一次 RPC 调用:

感谢 @远墨 提供的图

快速开始:

工程依赖:
  • JDK1.8 或更高版本
  • 依赖管理工具: Maven3.x 版本
最新版本OSS下载
最新版本Maven中心仓库下载
Maven依赖:
<dependency>
    <groupId>org.jupiter-rpc</groupId>
    <artifactId>jupiter-all</artifactId>
    <version>${jupiter.version}</version>
</dependency>
简单调用示例:
1. 创建服务接口:
@ServiceProvider(group = "test", name = "serviceTest")
public interface ServiceTest {
    String sayHelloString();
}

@ServiceProvider:
    - 建议每个服务接口通过此注解来指定服务信息, 如不希望业务代码对jupiter依赖也可以不使用此注解而手动去设置服务信息
        + group: 服务组别(选填, 默认组别为'Jupiter')
        + name: 服务名称(选填, 默认名称为接口全限定名称)
2. 创建服务实现:
@ServiceProviderImpl(version = "1.0.0")
public class ServiceTestImpl implements ServiceTest {

    @Override
    public String sayHelloString() {
        return "Hello jupiter";
    }
}

@ServiceProviderImpl:
    - 建议每个服务实现通过此注解来指定服务版本信息, 如不希望业务代码对jupiter依赖也可以不使用此注解而手动去设置版本信息
        + version: 服务版本号(选填, 默认版本号为'1.0.0')
3. 启动注册中心:
- 选择1: 使用 jupiter 默认的注册中心:
public class HelloJupiterRegistryServer {

    public static void main(String[] args) {
        // 注册中心
        RegistryServer registryServer = RegistryServer.Default.createRegistryServer(20001, 1);
        try {
            registryServer.startRegistryServer();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
- 选择2: 使用 zookeeper 作为注册中心:
默认注册中心只建议在测试环境使用, 线上建议使用 zookeeper 实现

// 设置使用 zookeeper 作为注册中心
JServer server = new DefaultServer(RegistryService.RegistryType.ZOOKEEPER)
JClient client = new DefaultClient(RegistryService.RegistryType.ZOOKEEPER)

在 server 和 client 中配置 jupiter-registry-zookeeper 依赖(jupiter-all 包含 jupiter-registry-zookeeper)

<dependency>
    <groupId>org.jupiter-rpc</groupId>
    <artifactId>jupiter-registry-zookeeper</artifactId>
    <version>${jupiter.version}</version>
</dependency>
4. 启动服务提供(Server):
public class HelloJupiterServer {

    public static void main(String[] args) throws Exception {
        JServer server = new DefaultServer().withAcceptor(new JNettyTcpAcceptor(18090));
        // provider
        ServiceTestImpl service = new ServiceTestImpl();
        // 本地注册
        ServiceWrapper provider = server.serviceRegistry()
                .provider(service)
                .register();
        // 连接注册中心
        server.connectToRegistryServer("127.0.0.1:20001");
        // 向注册中心发布服务
        server.publish(provider);
        // 启动server
        server.start();
    }
}
5. 启动服务消费者(Client)
public class HelloJupiterClient {

    public static void main(String[] args) {
        JClient client = new DefaultClient().withConnector(new JNettyTcpConnector());
        // 连接RegistryServer
        client.connectToRegistryServer("127.0.0.1:20001");
        // 自动管理可用连接
        JConnector.ConnectionWatcher watcher = client.watchConnections(ServiceTest.class);
        // 等待连接可用
        if (!watcher.waitForAvailable(3000)) {
            throw new ConnectFailedException();
        }

        ServiceTest service = ProxyFactory.factory(ServiceTest.class)
                .version("1.0.0")
                .client(client)
                .newProxyInstance();

        service.sayHelloString();
    }
}

Server/Client 代码示例

新特性

v1.3 新增 InvokeType.AUTO, 当你的接口返回值是一个 CompletableFuture 或者它的子类将自动适配为异步调用, 否则为同步调用 具体 demo 请参考这里

结合Spring使用示例:
1. Server端配置:
<jupiter:server id="jupiterServer" registryType="default"> <!-- registryType="zookeeper" 代表使用zk作为注册中心 -->
    <jupiter:property registryServerAddresses="127.0.0.1:20001" />
</jupiter:server>

<!-- provider -->
<bean id="serviceTest" class="org.jupiter.example.ServiceTestImpl" />

<jupiter:provider id="serviceTestProvider" server="jupiterServer" providerImpl="serviceTest">
    <jupiter:property weight="100"/>
</jupiter:provider>
2. Client 端配置:
<jupiter:client id="jupiterClient" registryType="default"> <!-- registryType="zookeeper" 代表使用zk作为注册中心 -->
    <jupiter:property registryServerAddresses="127.0.0.1:20001" />
</jupiter:client>

<!-- consumer -->
<jupiter:consumer id="serviceTest" client="jupiterClient" interfaceClass="org.jupiter.example.ServiceTest">
    <jupiter:property version="1.0.0.daily" />
    <jupiter:property serializerType="proto_stuff" />
    <jupiter:property loadBalancerType="round_robin" />
    <jupiter:property timeoutMillis="3000" />
    <jupiter:property clusterStrategy="fail_over" />
    <jupiter:property failoverRetries="2" />
    <jupiter:methodSpecials>
        <!-- 方法的单独配置 -->
        <jupiter:methodSpecial methodName="sayHello" timeoutMillis="5000" clusterStrategy="fail_fast" />
    </jupiter:methodSpecials>
</jupiter:consumer>

SpringServer/SpringClient 代码示例

更多示例代码

其他

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