Git Product home page Git Product logo

netty-rpc-demo's Introduction

Netty-Rpc-Demo

netty rpc 的一个小demo

启动测试:
       1.NettyRpcServerApplication 
         NettyRpcClientApplication
       2.访问localhost:8080
       3.cn/like/netty/rpc/client/controller 测试对应接口

common-netty

└───cn
    └───like
        └───netty
            └───common
                ├───channel         --- channel管理相关的接口(server端使用)
                ├───message         --- client和server相互传递的消息(请求以及响应)
                │   ├───auth            ---  用户注册
                │   ├───chat            ---  用户聊天
                │   ├───dispatcher      ---  消息分发
                │   ├───heartbeat       ---  心跳
                │   └───rpc             ---  rpc
                ├───protocol        --- 本demo采用的协议
                ├───serializer      --- 序列化实现
                ├───service         --- rpc调用的service接口
                └───util            --- 所包含的工具类

rpc-server

client和server一样。

└───cn
    └───like
        └───netty
            └───rpc
                └───server
                    ├───channel     --- channel管理相关的接口实现
                    ├───config      --- 配置类
                    ├───handler     --- 消息对应的处理器
                    ├───init        --- 初始化channel中的pipline
                    └───service     --- rpc调用的service的具体实现
                    ---  NettyRpcServer server 启动

todo 序列化工具 Protobuf

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.