分布式计算中WebService的替代方案: RPC (XML-RPC | JSON-RPC)
2013-09-07 17:52
441 查看
XML-RPC
http://zh.wikipedia.org/wiki/XML-RPCXML-RPC是一个远程过程调用(远端程序呼叫)(remote procedure call,RPC)的分布式计算协议,通过XML将调用函数封装,并使用HTTP协议作为传送机制[1]。
.net中一个比较流行的实现是: xml-rpc.net
http://xml-rpc.net/faq/xmlrpcnetfaq-2-5-0.html
1. Introduction
1.1 What is XML-RPC?
To quote the XML-RPC.com site:"It's a spec and a set of implementations that allow software running on disparate operating systems, running in different environments to make procedure calls over the Internet. It's remote procedure calling using HTTP as the transport and XML as the encoding. XML-RPC is designed to be as simple as possible, while allowing complex data structures to be transmitted, processed and returned.";
1.2 What is XML-RPC.NET?
XML-RPC.NET is a .NET class library for implementing XML-RPC clients and servers.1.3 Why use XML-RPC instead of SOAP?
If your clients and servers are all running in the .NET environment there is no point in using XML-RPC: .NET provides excellent support for SOAP and XML-RPC doesn't have any features not provided by SOAP (other than simplicity).If you use .NET clients and want to connect to XML-RPC servers running under any OS then XML-RPC.NET is a good choice.
If you want to implement a server in the .NET environment which is to be connected to by clients running in other environments, say Unix or Java, then XML-RPC may be an appropriate choice. SOAP is supported in many different environments but is considerably more complicated than XML-RPC and presents more opportunity for interop problems.
1.4 Where do I obtain XML-RPC.NET from?
XML-RPC.NET can be obtained from the XML-RPC.NET home page.Updates are announced at Cook Computing and the Yahoo XMLRPCNET group.
JSON-RPC
JSON-RPC is a remote procedure call protocol encoded in JSON. It is a very simple protocol (and very similar to XML-RPC), defining only a handful of data types and commands. JSON-RPC allows for notifications (info sent to the server that does not require a response) and for multiple calls to be sent to the server which may be answered out of order..net中一个比较流行的实现:
http://jsonrpc2.codeplex.com/
Project Description
JSON-RPC.Net is a high performance Json-Rpc 2.0 server, leveraging the popular JSON.NET library. Host in ASP.NET, also supports sockets and pipes, oh my!
[Dot Net 4.0|Mono] currently Required. ASP.Net is optional.
工具: 监视端口数据
http://www.pocketsoap.com/tcptrace/
listen on port:8081(这个端口号可以自己设定,只要没有被占用就行)。
destination server:loalhost(目标地址,我这里是本地)。
destination port:8080(目标端口,由上面的服务地址决定了这个端口是8080)。
这样配置完成之后,我在浏览器中输入的访问地址中的端口就要变成8081,如:http://localhost:8081/springmvc/handle.do,
因为tcpTrace监听的是8081端口,他会把地址中的8081端口替换成目标端口8080.
相关文章推荐
- WebService、RMI、RPC、XML-RPC、JSON-RPC、SOAP、REST(rest-api、restful)等web服务实现方案概念
- 三种主流的WebService实现方案(REST/SOAP/XML-RPC)简述及比较
- 三种主流的WebService实现方案(REST/SOAP/XML-RPC)简述及比较
- 三种主流的WebService实现方案(REST/SOAP/XML-RPC)简述及比较
- 三种主流的WebService实现方案(REST/SOAP/XML-RPC)简述及比较
- 简略整理一下RPC、WebService、Restful、Json、Xml这些概念之间的关系
- 微服务–分布式事务的实现方法及替代方案
- 微服务–分布式事务的实现方法及替代方案
- 分布式编程->XML Webservice实现原理及相关知识
- 分布式补偿事务处理方案 / 分布式计算是如何控制事务的?
- 解决在OFFICE平台传输数据慢的问题,使用GZIP+JSON替代WEBSERVICE提供数据
- JSON-RPC、XML-RPC、SOAP三者的关系
- Hadoop-- 海量文件的分布式计算处理方案
- 微服务--分布式事务的实现方法及替代方案
- 基于 XML­RPC技术的分布式教育资源库系统的设计
- 中小企业基于Windows计算环境的软件开源或免费替代方案
- 研究一下 项目 webservice xml和java对象的相互自动转换,json和java对象的相互自动转换
- tomcat 启动webservice报java.lang.NoClassDefFoundError: javax/xml/rpc/ServiceException
- 【微服务】分布式事务的实现方法及替代方案
- JQuery调用webservice,返回的json数据和XML数据的处理方法