You are on page 1of 8

BITS Pilani BITS Pilani

Pilani | Dubai | Goa | Hyderabad

Publisher-Subscriber Communication Model


Publisher-Subscriber Communication
Model BITS Pilani

Recap - Client server model Server

• A set of clients and a set of


servers request
response
request
request
• Clients establish
communication with the
servers Client Client Client Client

• Request-response based

• Variant of P2P
communication model
Publisher-Subscriber Communication
Model BITS Pilani

• A publisher entity
• A subscriber entity

• Publisher - produces information which


they post into the network
• Subscriber - one or a group of nodes
that listen to information sources

• Data oriented model


• What information does the subscribers
get from the publishers?
Publisher-Subscriber Communication
Model BITS Pilani

Subscriptions
• Static or Dynamic
• Static subscription could be
controlled via configurations
• Dynamic configurations
could be achieved via
special messages

Main advantage
• Reduces network traffic
Publisher-Subscriber Communication
Model BITS Pilani

• Two parts in the publisher-


subscriber model
(i) the subscription part
(ii) the actual data publishing part

• Subscription of subscribers with


the publishers is achieved via
client-server communication
based on confirmed services

• Needed because information


dissemination happens based
on the subscriptions
Publisher-Subscriber Communication
Model BITS Pilani

• Publishers are unware of the existence of the


subscribers

• Two ways for implementing publisher-subscriber


model

i. Pull model - information is pulled from the publisher


by the subscribers

ii. Push model - information is pushed out to the


subscribers by the publisher
Publisher-Subscriber Communication
Model BITS Pilani

Pull Model
• Consists of a publishing manager also
• Triggers the publishing action
• Requests the publisher to publish certain information via a
unicast message
• Publishers distribute the information to the subscribers via a
multicast
• Interaction between
publishing manager
and publisher –
confirmed
request/response
service
Publisher-Subscriber Communication
Model BITS Pilani

Push Model
• Publishers themselves distribute the information to the
subscribers
• No external trigger or publishing manager
• Information dissemination could be periodic or even-driven

You might also like