This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Publisher/Sub and Point to Point.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Publisher/Sub and Point to Point.." Watch "Publisher/Sub and Point to Point.." New topic
Author

Publisher/Sub and Point to Point..

andy armstrong
Ranch Hand

Joined: May 14, 2002
Posts: 154
Does Point to Point messaging use Synchronous
or Asyncrhonous communication?


Certifications: <br />scp2, scea, scwcd, WL7.0, CISSP, XML
Rufus BugleWeed
Ranch Hand

Joined: Feb 22, 2002
Posts: 1551
JMS, an asynchronous messaging system has a modes
know as point to point and pub/sub.
Point to point could be be RMI, a synchronous
protocol.
Point to point is not tied to either synchronous
or asynchronous.
Sanjay Raghavan
Ranch Hand

Joined: May 14, 2002
Posts: 148
Rufus,
I beg to differ.
Middleware Architectures follow one of two forms - Synchronous Communication and Asynchronous Communication.
Synchronous Communication is used typically when a client is requesting a server to do some processing and is waiting for the response before proceeding further. The best example for Synchronous communication is RPC based mechanisms. Examples of RPC based mechanisms are - IIOP, RMI/JRMP, RMI/IIOP. (Note: EJB 2.0 supports a message listener in the new bean type and CORBA also has event listener capabilities, but generally speaking, remote method invocation is the normal purpose.) Excellent example is Credit Card validation. Without that you do not want to continue with the transaction.
Asynchronous communication is used when:
1. you need time transparency - do not want sub-system dependencies (check durable queues / subscribers for more info)i.e., The message producer does not need to wait for an ack before proceeding further.
2. Location transparency: In a stock quote application, the publisher has no need to know who the subscribers are and where they are.
(Note: With EJB using JNDI and CORBA using COS naming e.t.c., location transparency is achieved in RPC too, but the scope is a little different here)
In many JMS books, they talk about using JMS (MOM messaging) synchronously. Please note that they only simulate synchronous behavior. This is done via two asynchronous messages used back-to-back. This is not to be confused with RPC behavior. They talk about P2P specifically because that is the messaging model intended for one-to-one use. (Pub / Sub is supposed to be used as a Broadcast mechanism, so ack has no relevance here.)
HTH.


Sanjay Raghavan<br />SCJP2, SCEA-J2EE<br />Moderator - <a href="http://groups.yahoo.com/group/scea_prep" target="_blank" rel="nofollow">SCEA PREP</a><br />Co-Author - <a href="http://www.whizlabs.com/scea/scea.html" target="_blank" rel="nofollow">SCEA@Whiz</a><br /><i>Where did you sip your Java Today?</i>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Publisher/Sub and Point to Point..
 
Similar Threads
Best Companies in Chennai - India
WA #1.....word association
Cannot resolve Varibles
regarding Point-to-Point messaging system
help understanding Java-7(Sum)