Git Product home page Git Product logo

simple-rpc's Introduction

simple-rpc

从0实现rpc

版本迭代

version001

使用socket通过网络发起一次远程调用

version002

针对客户端的优化:

  1. 规范rpc请求和响应
  2. 使用动态代理封装请求对象

version 003

针对服务端的优化:

  1. 增加简易注册中心,解耦服务的注册和调用
  2. 实现WorkThread,负责处理socket连接和业务处理
  3. 抽象化服务端,增加线程池实现的服务端

version 004

  1. 引入netty替换BIO
  2. 提高序列化效率
  • 出现的问题
    • JSON 序列化导致反射参数丢失类型,无法invoke时会出现异常,参数类型不符
    • 解决:遍历参数类型和参数列表,使用jackson进行一次转化

simple-rpc's People

Watchers

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