weibocom / motan

A cross-language remote procedure call(RPC) framework for rapid development of high performance distributed services.
Other
5.89k stars 1.78k forks source link

injvm调用的情况 #158

Closed linking12 closed 8 years ago

linking12 commented 8 years ago

如果是provider端的service依赖于本应用的另一个serivce,属于同一个jvm调用,为啥要走网络,即使是走本机的网卡也不是很合适吧?

rayzhang0603 commented 8 years ago

可以把本地应用的servcie增加Injvm protocol配置,injvm protocol是不走网络的,直接injvm调用。样例如下

<motan:protocol id="injvm" name="injvm" />
<motan:protocol id="motan" name="motan" .... />
<motan:service interface="quickstart.FooService" ref="serviceImpl" export="motan:8003,injvm" registry="registry"/>