分布式计算中WebService的替代方案: RPC (XML-RPC | JSON-RPC)
XML-RPC
http://zh.wikipedia.org/wiki/XML-RPC
XML-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中一个比较流行的实现:
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的替代方案: RPC (XML-RPC | JSON-RPC)的更多相关文章
- 【.net 深呼吸】聊聊WCF服务返回XML或JSON格式数据
有时候,为了让数据可以“跨国经营”,尤其是HTTP Web有关的东东,会将数据内容以 XML 或 JSON 的格式返回,这样一来,不管客户端平台是四大文明古国,还是处于蒙昧时代的原始部落,都可以使用这 ...
- 使用Boost.PropertyTree处理XML、JSON和INI数据
Boost.PropertyTree 应该是 Boost 1.41.0 开始正式加入 Boost 版本的.目前 ( 2010/02/28 ) 能下到的最新版本是 1.42.0. 主要作用/应用场合 B ...
- 由SOAP说开去 - - 谈谈WebServices、RMI、RPC、SOA、REST、XML、JSON
引子: 关于SOAP其实我一直模模糊糊不太理解,这种模模糊糊的感觉表述起来是这样: 在使用web服务时(功能接口),本来我就可以通过安卓中固有的http类(使用http协议),来发送http请求,并且 ...
- Java中WebService实例
Web Services是由企业公布的完毕其特定商务需求的在线应用服务,其它公司或应用软件可以通过Internet来訪问并使用这项在线服务. Web Service的关键技术和规则: 1.XML:描写 ...
- RPC原来就是Socket——RPC框架到dubbo的服务动态注册,服务路由,负载均衡演化
序:RPC就是使用socket告诉服务端我要调你的哪一个类的哪一个方法然后获得处理的结果.服务注册和路由就是借助第三方存储介质存储服务信息让服务消费者调用.然我们自己动手从0开始写一个rpc功能以及实 ...
- RPC笔记之初探RPC:DIY简单RPC框架
一.什么是RPC RPC(Remote Procedure Call)即远程过程调用,简单的说就是在A机器上去调用B机器上的某个方法,在分布式系统中极其常用. rpc原理其实很简单,比较容易理解,在r ...
- Solon rpc 之 SocketD 协议 - RPC调用模式
Solon rpc 之 SocketD 协议系列 Solon rpc 之 SocketD 协议 - 概述 Solon rpc 之 SocketD 协议 - 消息上报模式 Solon rpc 之 Soc ...
- Solon rpc 之 SocketD 协议 - RPC鉴权模式
Solon rpc 之 SocketD 协议系列 Solon rpc 之 SocketD 协议 - 概述 Solon rpc 之 SocketD 协议 - 消息上报模式 Solon rpc 之 Soc ...
- JAVA RPC(一)RPC入门
为什么要写这个RPC 市面上常见的RPC框架很多,grpc,motan,dubbo等,但是随着越来越多的元素加入,复杂的架构设计等因素似使得这些框架就想spring一样,虽然号称是轻量级,但是用起来却 ...
随机推荐
- Xamarin XAML语言教程构建ControlTemplate控件模板
Xamarin XAML语言教程构建ControlTemplate控件模板 控件模板ControlTemplate ControlTemplate是从Xamarin.Forms 2.1.0开始被引入的 ...
- 设计高效SQL: 一种视觉的方法
行; 这听起来很直观,但最有效的方法是什么?你可能有如下选择:行,其中有50行你必须剔除行,其中有450行你必须剔除行中剔除50行听起来比从500行中剔除450行更高效,但是请记住:聚簇,或者说,数据 ...
- 【分块】【线段树】bzoj3212 Pku3468 A Simple Problem with Integers
线段树入门题…… 因为poj原来的代码莫名RE,所以丧病地写了区间修改的分块…… 其实就是块上打标记,没有上传下传之类. #include<cstdio> #include<cmat ...
- 小白的Python之路 day5 os,sys模块详解
os模块详解 1.作用: 提供对操作系统调用的接口 2.常用方法: os.getcwd() 获取当前工作目录,即当前python脚本工作的目录路径os.chdir("dirname" ...
- Github上的iOS资料-个人记录
动画 awesome-ios-animation收集了iOS平台下比较主流炫酷的几款动画框架 RCTRefreshControlqq的下拉刷新 TBIconTransitionKiticon 的点击动 ...
- OC语言基础之NSArray
0.数组的分类 NSArray :不可变数组 NSMutableArray : 可变数组 1: // @[] 只创建不可变数组NSArray 2: /* 错误写法 3: NSMutableArray ...
- IntelliJ IDEA导入Maven之后强制刷新项目解决无法识别为Maven项目的问题
先点击左下角按钮以显示Maven Project 再点击右侧Maven Project 点击刷新按钮,当然也可以点击加号选择pom.xml文件. 最后是等待项目的更新.
- CSS3:animation动画
animation只应用在页面上已存在的DOM元素上,学这个不得不学keyframes,我们把他叫做“关键帧”. keyframes的语法法则: @keyframes flash { from{ le ...
- JS 创建长度为100的数组,数值为角标
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- flask的文件上传和下载
http://flask.pocoo.org/docs/1.0/api/ http://docs.jinkan.org/docs/flask/api.html?highlight=download h ...