教学文库网 - 权威文档分享云平台
您的当前位置:首页 > 文库大全 > 高中教育 >

分布式应用学习笔记(2)

来源:网络收集 时间:2026-08-21
导读: 6.1.4 WSDD ..................................................................................................................................................... 37 6.2 AXIS ..........................

6.1.4 WSDD ..................................................................................................................................................... 37

6.2 AXIS ............................................................................................................................................................. 38

6.2.1 Axis基本概念 ...................................................................................................................................... 38

6.2.2 Axis的安装 ........................................................................................................................................... 38

6.2.3 Axis的配置 ........................................................................................................................................... 38

6.2.4 Axis的测试 ........................................................................................................................................... 39

6.2.5 服务的发布 ........................................................................................................................................... 39

6.2.6 服务的访问 ........................................................................................................................................... 46

6.2.7 客户端编程 ........................................................................................................................................... 47

6.2.8 服务类型 ................................................................................................................................................ 49

6.2.9 SOAP信封 ............................................................................................................................................ 51

MOM JMS 分布式 架构

1 通信基础知识

1.1 Synchronous communication

Synchronous communication represents a tight coupling between a sender and receiver:

1. the sender and receiver must both be available - i.e. real-time communication.

2. the sender will block until the response is available.

3. communication is one-to-one.

4. sender / receiver have some knowledge of each other - e.g. location, protocol,

methods, etc.

5. the sender is responsible for dealing with failures - e.g. retries, etc.

“request/response” is an example of a synchronous communication paradigm.

Example : a browser sends a request to a web server and waits for the response. The

wait can indefinite or until a timeout occurs.

1.2 Asynchronous communication

Asynchronous communication represents a loose coupling between senders / receivers :

1. sender and receiver communicate via a midde-man / broker / mediator.

2. no requirement for sender or receiver to both be available - i.e. deferred

communication.

3. sender doesn t wait for a response (if any).

4. communication can be one-to-one or one-to-many.

5. sender and receiver have no direct knowledge of each other so promotes reuse /

extension - e.g. new senders / receivers can be added without impact; senders /

receivers can be replaced as required.

6. the broker is responsible for dealing with failures - e.g. retries, etc.

7. messages may be delayed and/or arrive out of sequence.

“queues” and “publisher/subscriber” are examples of asynchronous communication

paradigm.

Example : the sender mail client sends an email via a mail server. The sender mail

server attempts delivery to the recipient mail server and repeats if unsuccessful. The

recipient mail client picks up the mail from the recipient server next time they re online.

1.3 Benefits of synchronous and asynchronous communication

Synchronous communication(e.g. RMI):

1. real-time response.

2. lock-step - order of execution guarantee.

MOM JMS 分布式 架构

3. self-contained – it s a single-shot “transaction”, no ongoing management over time

so suitable in pooled environments like EJB.

Asynchronous communication(e.g. JMS):

1. loose coupling.

2. producers/consumers delegate responsibility of reliable message delivery to MOM.

3. deferred communication - consumers can be offline, servers down, etc.

4. promotes reuse - components can be added/removed/modified without impact.

5. supports broadcast of messages.

MOM JMS 分布式 架构

2 Java远程通信技术

2.1 基本原理

要实现网络机器间的通讯,首先得来看看计算机系统网络通信的基本原理,在底层

层面去看,网络通信需要做的就是将流从一台计算机传输到另外一台计算机,基于传

输协议和网络IO来实现,其中传输协议比较出名的有 http、tcp、udp等等,http、tcp、

udp都是在基于Socket概念上为某类应用场景而扩展出的传输协议,网络IO,主要有

bio、 nio、aio三种方式,所有的分布式应用通讯都基于这个原理而实现,只是为了应

用的易用,各种语言通常都会提供一些更为贴近应用易用的应用层协议。

2.2 应用级远程通信协议

远程服务通讯,需要达到的目标是在一台计算机发起请求,另外一台机器在接收

到请求后进行相应的处理并将结果返回给请求端,这其中又会有诸如one way request、

同步请求、异步请求等等请求方式,按照网络通信原理,需要实现这个需要做的就是

将请求转换成流,通过传输协议传输至远端,远端计算机在接收到请求的流后进行处

理,处理完毕后将结果转化为流,并通过传输协议返回给调用端。

原理是这样的,但为了应用的方便,业界推出了很多基于此原理之上的应用级的

协议,使得大家可以不用去直接操作这么底层的东西,通常应用级的远程通信协议会

提供:

1. 为了避免直接做流操作这么麻烦,提供一种更加易用或贴合语言的标准传输格

式;

2. 网络通信机制的实现,就是替你完成了将传输格式转化为流,通过某种传输协

议传输至远端计算机,远端计算机在接收到流后转化为传输格式,并进行存储

或以某种方式通知远端计算机。

所以在学习应用级的远程通信协议 …… 此处隐藏:4295字,全部文档内容请下载后查看。喜欢就下载吧 ……

分布式应用学习笔记(2).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.jiaowen.net/wenku/130199.html(转载请注明文章来源)
Copyright © 2020-2025 教文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:78024566 邮箱:78024566@qq.com
苏ICP备19068818号-2
Top
× 游客快捷下载通道(下载后可以自由复制和排版)
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能出现无法下载或内容有问题,请联系客服协助您处理。
× 常见问题(客服时间:周一到周五 9:30-18:00)