Re: What is the difference between JMS, SOAP and RMI ?
From: Will Hartung (willh_at_msoft.com)
Date: 10/05/04
- Next message: Boudewijn Dijkstra: "Re: What does '~' before a number mean"
- Previous message: Bryce: "Re: What is the difference between JMS, SOAP and RMI ?"
- In reply to: Anan H. Samiti: "What is the difference between JMS, SOAP and RMI ?"
- Next in thread: Michael Borgwardt: "Re: What is the difference between JMS, SOAP and RMI ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 5 Oct 2004 14:02:50 -0700
"Anan H. Samiti" <anan22@hotmail.com> wrote in message
news:cjuqk3$e06$04$1@news.t-online.com...
> I am not sure about the differences between the three java message
protocols mentioned in the subject.
> Ok, they are different protocols but what are the (dis)advantages of each
(particularly betwen JMS and RMI)?
SOAP, Simple Object Access Protocol, is a format for transfering data
between a client and server using high level protocols (predominantly HTTP
and XML). They managed to take a rather simple concept of using XML for
remote procedure calls and complicate it to no end, yet laughingly keep the
'S' (for Simple) in the acronym.
RMI, Remote Method Invocation, is Java's native RPC interface. It allows
you to run remote objects with similar semantics to local objects. The
default implementation uses a propietary binary communication protocol, but
technically you can implement RMI over SOAP (or anything else) if you really
wanted to.
JMS, Java Messaging System, is Java's interface and specification to Message
Oriented Middleware. The basic idea is that you ship packets of data to
message queues and topics where they will be operated upon In Due Time
asynchronously. There is no requirement that the queues or topics be remote.
You can easily have an embedded JMS system that doesn't use any remote
protocol, and simply passes objects around. Internally, your JMS server
could be using RMI, SOAP, anything it wants.
JMS is popular now because it does a pretty good job of hiding a lot of the
chicanery that is involved with remote protocols. It's usually handled by
the JMS server and its client library. JMS also isn't your typical RPC
mechanism, as it doesn't cleanly provide that transparent calling scheme for
synchronous calls that RMI and SOAP do. If the semantics of JMS work for
your application, it's pretty easy to use.
RMI and SOAP are a lot more complicated to set up with lots of component
parts to get right. If you really want remote method calls, I'd go and look
at EJBs. The modern J2EE server is pretty simple to set up, easier I'd argue
than a custom RMI solution, and easier than SOAP, particularly for
complicated object structures as EJB can rely on simple Java serialization.
Of course, the best solution if practical is to not do anything remotely at
all, as remote calls smash any sense of performance and complicate the whole
process.
So, if JMS will work for you, use JMS. It's protocol agnostic, by the simple
fact that you are isolated from the protocol completely. Otherwise I'd look
at EJBs. Only use SOAP if you are required to for interoperability with
somebody else. RMI is a legacy system best used for writing custom remote
servers, and frankly have been usurped by EJB for most human beings today.
Regards,
Will Hartung
(willh@msoft.com)
- Next message: Boudewijn Dijkstra: "Re: What does '~' before a number mean"
- Previous message: Bryce: "Re: What is the difference between JMS, SOAP and RMI ?"
- In reply to: Anan H. Samiti: "What is the difference between JMS, SOAP and RMI ?"
- Next in thread: Michael Borgwardt: "Re: What is the difference between JMS, SOAP and RMI ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|