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中一个比较流行的实现:

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的替代方案: RPC (XML-RPC | JSON-RPC)的更多相关文章

  1. 【.net 深呼吸】聊聊WCF服务返回XML或JSON格式数据

    有时候,为了让数据可以“跨国经营”,尤其是HTTP Web有关的东东,会将数据内容以 XML 或 JSON 的格式返回,这样一来,不管客户端平台是四大文明古国,还是处于蒙昧时代的原始部落,都可以使用这 ...

  2. 使用Boost.PropertyTree处理XML、JSON和INI数据

    Boost.PropertyTree 应该是 Boost 1.41.0 开始正式加入 Boost 版本的.目前 ( 2010/02/28 ) 能下到的最新版本是 1.42.0. 主要作用/应用场合 B ...

  3. 由SOAP说开去 - - 谈谈WebServices、RMI、RPC、SOA、REST、XML、JSON

    引子: 关于SOAP其实我一直模模糊糊不太理解,这种模模糊糊的感觉表述起来是这样: 在使用web服务时(功能接口),本来我就可以通过安卓中固有的http类(使用http协议),来发送http请求,并且 ...

  4. Java中WebService实例

    Web Services是由企业公布的完毕其特定商务需求的在线应用服务,其它公司或应用软件可以通过Internet来訪问并使用这项在线服务. Web Service的关键技术和规则: 1.XML:描写 ...

  5. RPC原来就是Socket——RPC框架到dubbo的服务动态注册,服务路由,负载均衡演化

    序:RPC就是使用socket告诉服务端我要调你的哪一个类的哪一个方法然后获得处理的结果.服务注册和路由就是借助第三方存储介质存储服务信息让服务消费者调用.然我们自己动手从0开始写一个rpc功能以及实 ...

  6. RPC笔记之初探RPC:DIY简单RPC框架

    一.什么是RPC RPC(Remote Procedure Call)即远程过程调用,简单的说就是在A机器上去调用B机器上的某个方法,在分布式系统中极其常用. rpc原理其实很简单,比较容易理解,在r ...

  7. Solon rpc 之 SocketD 协议 - RPC调用模式

    Solon rpc 之 SocketD 协议系列 Solon rpc 之 SocketD 协议 - 概述 Solon rpc 之 SocketD 协议 - 消息上报模式 Solon rpc 之 Soc ...

  8. Solon rpc 之 SocketD 协议 - RPC鉴权模式

    Solon rpc 之 SocketD 协议系列 Solon rpc 之 SocketD 协议 - 概述 Solon rpc 之 SocketD 协议 - 消息上报模式 Solon rpc 之 Soc ...

  9. JAVA RPC(一)RPC入门

    为什么要写这个RPC 市面上常见的RPC框架很多,grpc,motan,dubbo等,但是随着越来越多的元素加入,复杂的架构设计等因素似使得这些框架就想spring一样,虽然号称是轻量级,但是用起来却 ...

随机推荐

  1. duboo服务使用thrift协议 + MQ

    写一篇博客来记录从 Python 转型到 Java 的学习成果.整体架构: rpc: dubbo + thrift idl: thrift registeration: zookeeper MQ: k ...

  2. [TC-FindingFriends]Finding Friends

    题目大意: 给定一个长度为$n(n\le10^5)$的数列$A(A_i\le10^9)$,求最小的$k$满足存在一个长度至少为$m(m\le n)$的子串,对于串中的每一个数$A_i$,都至少存在一个 ...

  3. 5.5(java学习笔记)TreeSet和TreeMap

    1.TreeMap TreeMap是可排序的Map类,使用这个类时,TreeMap会对存放的数据进行排序. 排序是根据key来排序的,排序规则是key实现comparable接口中的compareTo ...

  4. xargs: How To Control and Use Command Line Arguments

    参考: http://www.cyberciti.biz/faq/linux-unix-bsd-xargs-construct-argument-lists-utility/ http://linux ...

  5. RequireJs 入门

    官网:http://www.requirejs.cn/ 使用方法: 1.引入require.js 可以在底部引入: <script type="text/javascript" ...

  6. mysql left join,right join,inner join的区别

    left join(左联接) 返回包括左表中的所有记录和右表中联结字段相等的记录 right join(右联接) 返回包括右表中的所有记录和左表中联结字段相等的记录 inner join(等值连接) ...

  7. 10个常用的ps命令总结,参数

    Linux系统中10个常用的ps命令总结 PS 命令是什么 查看它的man手册可以看到,ps命令能够给出当前系统中进程的快照.它能捕获系统在某一事件的进程状态.如果你想不断更新查看的这个状态,可以使用 ...

  8. centos和ubuntu下pycharm无法输入中文的解决办法

    编辑启动的脚本文件 vim /usr/bin/pycharm ubuntu下添加 export GTK_IM_MODULE=fcitx export QT_IM_MODULE=fcitx export ...

  9. SlickGrid资料

    SlickGrid简单介绍 : https://github.com/mleibman/SlickGrid/wiki 快速入门 : https://github.com/mleibman/SlickG ...

  10. 如何更专业的使用Chrome开发者工具

    顾名思义Chrome开发工具就是一个工具,它允许Web开发人员可以通过浏览器应用程序干预和操作Web页面,也可以通过这个工具调试和测试Web页面或Web应用程序.有了这个工具,你可以做很多有趣的事情: ...