• Post Reply Bookmark Topic Watch Topic
  • New Topic

Is Rmi a stateless protocol?

 
jacob deiter
Ranch Hand
Posts: 585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Http is stateless so we have to use session object to identify each user.
Rmi is a stateless protocol?so if i use Rmi no stuff i have to use to identity each user.
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a question here?

More, why in the world would anyone use RMI today? Its so last century
 
jacob deiter
Ranch Hand
Posts: 585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
because EJB uses RMI
 
Reza Rahman
author
Ranch Hand
Posts: 580
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jacob,

One RMI server is shared between multiple "concurrent" clients and RMI connections do not implement a notion of a session. Stateful session beans implement a tighter coupling under the hood across RMI via protocol mechanisms similar to what you would have to roll out by hand.

Definitely think RMI is very applicable where binary based communication between Java/ORM/CORBA clients are needed. While HTTP/SOAP/REST covers a much broader use-case, it also carries a penalty in terms of network bandwidth and ASCII text/xml processing.

Cheers,
Reza
 
Tim Holloway
Bartender
Posts: 18413
58
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Pat Farrell:
Is there a question here?

More, why in the world would anyone use RMI today? Its so last century


I used it because it was the most efficient way for one application in my machine to trigger, monitor, and control long-running processes running in another VM.

I didn't use SOAP/Web services because the controlled process was batch, not interactive and there was no benefit to the extra portability and abstraction of SOAP, so it would have been empty overhead.

I didn't use CORBA, because both clients and server were Java apps.

I didn't use JMS, because I didn't need things like queueing, store-and-forward or guaranteed message delivery.

I didn't use EJB because EJBs are usually housed in interactive (web containers) and this was a small stand-alone app. Plus the Powers-That-Were were rabidly anti-EJB.

I didn't use raw network sockets or inter-address-space communications because I needed something I could get online quickly that would follow common easily-understood standards and not some one-off proprietary limited re-invention of an RMI-like interface.

So RMI was a good choice for the problem at hand.

And no, RMI is not stateless, but state and session are 2 quite different things.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!