• Post Reply Bookmark Topic Watch Topic
  • New Topic

what are the services in rmi?what is lazy activation??

 
senthil sen
Ranch Hand
Posts: 184
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what are the services in rmi?
what is lazy activation??
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are two ways to interpret the first question, at least as I read it. Let me take a stab at trying to answer both ways.
An RMI "service" is any Java method that can be invoked remotely.
RMI's "services," or features, are all listed here.
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Default behavior of an RMI-enabled application is to run in perpetuity and wait for a client request. If there are several RMI apps running on single machine, chances are they're idle a great deal of the time, so having them each run an active polling agent to look for client requests can get expensive without getting any real work done.
Lazy acitvation is an old Unix technqiue. The idea is to let a single process stay awake and look for activity requests on behalf of a number of other applications. In Unix, for example, we use a daemin called inetd to monitor incoming network traffic and then wake up the appropriate service when it's needed -- telnet, ftp, finger, etc.
RMI uses this approach with a daemon or persistent service called rmid. RMI server programs, rather than just binding to a registry, register their service to an "activation group" which in turn is registered with rmid. When rmid sees a request for a particular service, it invokes the service. Later, when there is no further work to do, rmid's job is to safely persist the service's data, if any, and continue monitoring.
The big benefit is in conserving the time and resources needed to respond to client requests.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!