• Post Reply Bookmark Topic Watch Topic
  • New Topic

When Queue and When Topic ?  RSS feed

 
Reza Rav.
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just think about when using queue and when Broadcasting message is usefull? Please don't explain differences just give me an implementation example, as instance I think queue is good for person to person chat and topic is good when I want to send a message to all my friend list in chat software.
But I doubt about topic please let me know some example.
 
Valentin Tanase
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Reza,

Have you ever play any Yahoo games? I used to play chess for a while. Usually only two people can play, but several others can watch the game. All participants, whether hey are players or guests can watch the game and the applet that runs within the browsers will display the correct move (without refreshing the page) for each one of them. Let�s suppose now that you have to develop a similar application. What architecture would you chose?
Regards.
 
Masoud Kalali
Author
Ranch Hand
Posts: 531
Java Mac OS X Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Reza Rawassizadeh:
I just think about when using queue and when Broadcasting message is usefull? Please don't explain differences just give me an implementation example, as instance I think queue is good for person to person chat and topic is good when I want to send a message to all my friend list in chat software.
But I doubt about topic please let me know some example.


when you want a message to consume once and just once use a queue , so it means that you have a task and you want to gave it to some thread to execute.in this time you can use a queue.

a topic is what that some agents are interested , like a news , or a messeage that can be used by several agents ; in such condition you create topics and let the agents to subscribe into your topics that they like.
when a message of some topic came available system will publish it to all whose who subscribed.


If you want more computerized sample them let me know .
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!