Coder Social home page Coder Social logo

rpc's Introduction

说明

2022.6.5 目前的实现的rpc还是功能非常有限的轮子,后续不断更新,目标

  • 支持并发,添加并发控制,将map[string]interface{}改为sync.map

  • 支持同步、异步操作,将执行代码分割打包

    客户端传输方法名,找到对应的方法,这里是依靠map[string]interface{}实现的,最开始想法是直接使用map[string]的结果,但interface{}使用还需要下断言,但这样就需要提前知道方法类型,无法有效解决。 最后这里使用reflect.method.func的方法call,直接调用自身函数,详情见type methodfunc (Value) Call 这里还可以考虑使用golang相关注入依赖的库,通过控制反转实现。相关开源库

rpc's People

Contributors

zt-winter avatar

Stargazers

 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.