O'Reilly logo

Mobile Intelligence by Bala Srinivasan, Ling Tan, Jianhua Ma, Agustinus Borgy Waluyo, Laurence T. Yang

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

4.3 PUBLISH/SUBSCRIBE

The requirements of a communications infrastructure presented in the previous section are addressed by the publish/subscribe model. The publish/subscribe model provides a simple yet powerful abstraction for application interactions. Below, we present the publish/subscribe model, briefly outline its benefits, and describe a distributed implementation of this model.

4.3.1 Publish/Subscribe Model

Publish/subscribe is a data-dissemination model that has many useful properties. There are three main entities in the publish/subscribe model: the publisher, subscriber, and broker. The publisher is the data producer, the subscriber the data consumer, and the broker mediates between the publisher and subscriber. These entities are only logical and do not have to correspond to physical components. For example, it is possible for a computer to be a publisher, subscriber, and broker.

A popular example of the publish/subscribe model is a stock quote information dissemination application. In this example, the publisher would be the stock exchange, such as the New York Stock Exchange, and the consumer could be a stock broker who is interested in tracking the latest prices of certain stocks. A subscriber S expresses his interest in these stocks by sending a subscription message s to the broker. The broker stores these subscriptions in an index T as a set of (subscription, subscriber) tuples. The publisher P communicates the latest stock updates by sending a publication message ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required