Hi, On Wed, Jul 17, 2019 at 5:55 PM 徐靖峰 <[email protected]> wrote: > > Hi folks > > There are many protocols in dubbo using HTTP in the remoting layer, for > example > > - > > hessain > - > > http > - > > jsonrpc > - > > rest > - > > webservice > > Among them, protocol="http" use the HttpInvoker designed by Spring > Framework(ref: > https://docs.spring.io/spring/docs/4.3.24.RELEASE/spring-framework-reference/htmlsingle/#remoting-httpinvoker-server), > and its default serialize type is origin Java Serialize, such design > determines that nowadays protocol="http" is not a cross-language & > high-performance protocol. > > But the protocol="jsonrpc" is a saver of the cross-language feature. Almost > every programing language supports json schema. For the above reasons, I > suggest that dubbo should repalce replace the current protocol="http" with > protocol="jsonrpc", and recommend people who want to use the cross-language > feature or develop web-site applications in dubbo to use > protocol="http".(waste the origin implementation of http protocol using > Spring HttpInvoker) > > WHY NOT replace protocol="http" with protocol="rest"? > > Dubbo has made an attempt on the RESTful interface, but there is some > difference between the REST architecture and the original RPC architecture > of Dubbo. The difference is that the REST architecture needs the definition > of resources and we should operate the resources using the basic HTTP > methods —— GET, POST, PUT, DELETE. Dubbo needs to redefine the properties > of the interface, which is a big burden on the original interface migration > of Dubbo. In contrast, RESTful is more appropriate for calls between > Internet systems, and RPC is more appropriate for calls within a system, so > we used protcol="jsonrpc" which is more consistent with the Dubbo concept. > > How do you think about the migration > > - > > protocol="jsonrpc" => protocol="http" >
I am also +1 to make jsonrpc as default. However, I think it is no need to do the rename, jsonrpc is more clear than http. > > - > > origin protocol="http" => waste or rename to > protocol="spring-httpinvoker" +1 to rename. -- Best Regards! Huxing
