【Apache之Qpid介绍】

Apache Qpid™ makes messaging tools that speak AMQP and support many languages and platforms.

AMQP is an open internet protocol for reliably sending and receiving messages. It makes it possible for everyone to build a diverse, coherent messaging ecosystem.

Qpid 是 Apache 开发的一款面向对象的消息中间件,它是一个 AMQP 的实现,可以和其他符合 AMQP 协议的系统进行通信。Qpid 提供了 C++/Python/Java/C# 等主流编程语言的客户端库,安装使用非常方便。相对于其他的 AMQP 实现,Qpid 社区十分活跃,有望成为标准 AMQP 中间件产品。除了符合 AMQP 基本要求之外,Qpid 提供了很多额外的 HA 特性,非常适于集群环境下的消息通信。

Features

1)A flexible and capable reactive messaging API

2)Full control of AMQP 1.0 protocol semantics

3)Portable C implementation with bindings to popular languages

4)Pure-Java implementation

5)Peer-to-peer and brokered messaging

6)Secure communication via SSL and SASL

The challenge

Modern large-scale applications are rarely built as monoliths. Instead, they are built as distributed network applications, with parts of the application in distinct processes and distinct parts of the world.

All the same, the parts need to work together to behave as one reliable application. They need a way to communicate, and they must be able to tolerate failures.

Messaging is a better way

Modern messaging systems aren't the only way to get processes talking. Your application's parts can share a view into a database, or you can use HTTP and REST to expose information. But these approaches have some serious drawbacks. A database is reliable, but it isn't designed to intermediate communication. Its focus is storing data, not moving it between processes. REST helps you communicate efficiently, but it offers no reliability. If the party you're talking to is unavailable, the transmission is dropped.

A store-and-forward messaging system gives you efficient, reliable communication. Message brokers take responsibility for ensuring messages reach their destination, even if the destination is temporarily out of reach. Messaging APIs manage acknowledgments so that no messages are dropped in transit.



 

通信是一个基本的需求,正如人与人之间需要交流一样,比较大型的软件系统也往往需要内部或者外部通信。

在系统间通信最基础的通信方式是 socket,但 socket 比较底层。使用起来非常不易。如果需要一些高级特性,需要很多的编程负担。

与 socket 的原始对应,企业级的应用软件往往有着各种各样从简单到复杂的通信需求,表现为不同的通信模型。常见的有:

1)点对点:A 发消息给 B。

2)广播:A 发给所有其他人的消息

3)组播:A 发给多个但不是所有其他人的消息。

4)Requester/response:类似访问网页的通信方式,客户端发请求并等待,服务端回复该请求

5)Pub-sub:类似杂志发行,出版杂志的人并不知道谁在看这本杂志,订阅的人并不关心谁在发表这本杂志。出版的人只管将信息发布出去,订阅的人也只在需要的时候收到该信息。

6)Store-and-forward:存储转发模型类似信件投递,写信的人将消息写给某人,但在将信件发出的时候,收信的人并不一定在家等待,也并不知道有消息给他。但这个消息不会丢失,会放在收信者的信箱中。这种模型允许信息的异步交换。

7)其他通信模型

猜你喜欢

转载自gaojingsong.iteye.com/blog/2369722