• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Instant messaging

 
Rancher
Posts: 152
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Would you consider instant messaging an example of Point-to-Point communication or publish/subscribe communication?

Think about it. Instant messaging can be used between two individuals who are involved in a chat session. On the other hand, it can also be used by someone like a server administrator to send out a broadcast instant message to all employees in the company to indicate that the server would be down for a few minutes.

Without any additional information to go with the question, if you had to select only one of the two JMS messaging models for instant messaging, which one would you choose and why?

Thanks
 
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's not publish/subscribe.
 
Teja Saab
Rancher
Posts: 152
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Cameron Wallace McKenzie wrote:It's not publish/subscribe.



Hmmm. I was leaning more towards publish/subscribe if I had to select only one since point to point communication just happens to be a specialized case of publish/subscribe where there is exactly one message sender and one message receiver.

In other words,

Publish/Subscribe: One MessageProducer sending to a JMS Destination and multiple (potentially unknown number) of MessageConsumer
Point to Point: One MessageProducer sending to a JMS Destination and one MessageConsumer.

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Teja Saab wrote:

Cameron Wallace McKenzie wrote:It's not publish/subscribe.



Hmmm. I was leaning more towards publish/subscribe if I had to select only one since point to point communication just happens to be a specialized case of publish/subscribe where there is exactly one message sender and one message receiver.

In other words,

Publish/Subscribe: One MessageProducer sending to a JMS Destination and multiple (potentially unknown number) of MessageConsumer
Point to Point: One MessageProducer sending to a JMS Destination and one MessageConsumer.




Instant messaging could be considered an example of JMS queue with only one consumer and message is consumed only once .Broadcast messages are example of JMS topics with publish/subscribe .


Ashish
 
Teja Saab
Rancher
Posts: 152
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That was my point. Instant Messaging can be used in a situation where it can be consumed only once (as in a 2 person chat) or can be consumed several times (as in a company wide broadcast by a server administrator). So the question was if you had to select only one of the two, which one would it be?

I think if I select publish/subscribe, it will cater to both situations since point to point happens to be a special case of publish/subscribe.

Just my $.02
 
srivastava ashish
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Teja Saab wrote:That was my point. Instant Messaging can be used in a situation where it can be consumed only once (as in a 2 person chat) or can be consumed several times (as in a company wide broadcast by a server administrator). So the question was if you had to select only one of the two, which one would it be?

I think if I select publish/subscribe, it will cater to both situations since point to point happens to be a special case of publish/subscribe.

Just my $.02



In your solution you need to have two separate Topics.One for 1-1 message and the other for broadcast because all active subscriber to a topic will get the message.However if you are using two Topics why not use one Topic and one Queue??
 
Teja Saab
Rancher
Posts: 152
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

srivastava ashish wrote:

Teja Saab wrote:That was my point. Instant Messaging can be used in a situation where it can be consumed only once (as in a 2 person chat) or can be consumed several times (as in a company wide broadcast by a server administrator). So the question was if you had to select only one of the two, which one would it be?

I think if I select publish/subscribe, it will cater to both situations since point to point happens to be a special case of publish/subscribe.

Just my $.02



In your solution you need to have two separate Topics.One for 1-1 message and the other for broadcast because all active subscriber to a topic will get the message.However if you are using two Topics why not use one Topic and one Queue??



Hi Ashish,

Maybe I did not articulate my point properly. I am not trying to create a solution for Instant Messaging. Rather I am trying to ascertain if Instant Messaging can best be considered as an example of Point to Point messaging, Publish Subscribe Messaging or both.


In other words, if we had a question similar to the one below in Part 1, which one of the options would you select.

Instant Messaging can be considered as an example of .......

(a) Point to Point messaging
(b) Publish Subscribe messaging
(c) Both
(d) Neither

Thanks
 
srivastava ashish
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Got your point ..I would consider "Both" as the answer.
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Instant Messaging does not require a queue, P2P does.

Regards
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic