Git Product home page Git Product logo

netty-rpc's Introduction

netty-rpc

##参考

##client端调用remote service的方式

  • java config方式
@Bean
    public HelloService buildHelloService(RpcProxyFactory rpcProxyFactory){
        return rpcProxyFactory.proxyBean(HelloService.class,100/*timeout*/);
    }

好处是,可以直接共用service-api的接口,不好的是java config稍微不如xml直观,不过适应就好

  • xml方式
<bean id="helloService" class="com.patterncat.rpc.spring.SpringProxyFactoryBean">
		<property name="innerClassName">
			<value>com.patterncat.rpc.service.demo.HelloService</value>
		</property>
		<property name="timeoutInMillis">
			<value>200</value>
		</property>
	</bean>

这种方式就是配置感觉略微复杂点,不过还可以接受,具体可参照navi

  • 更简洁的xml
<dubbo:reference id="helloService" interface="com.patterncat.rpc.service.demo.HelloService" timeout="200"/>

参照dubbo的方式,自定义schema,dubbo-config-spring

  • client再次定义接口 使用scanner的方式,client端再次写接口,然后client端扫描装配,重复定义,不建议用,具体可参照rpc-spring

##todo

  • client的失败重连
  • service mapping 采用注解形式
  • 基于spring的远程代理参考navi
  • 服务注册\发现\路由

netty-rpc's People

Contributors

patterncat avatar

Watchers

 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.