Remote object activation in a distributed system

A distributed computer system uses a single interface at the client site to handle calls to call both active and passive remote objects. Accordingly, the calling process does not need to be aware of distinctions between active and passive objects. Further, remote objects are aggregated into common groups of objects, thereby providing greater security between objects of disparate groups and efficiency between related objects of the same group. Preferably, different groups are run on different Java virtual machines.

BACKGROUND OF THE INVENTION

The present invention relates generally to distributed computer systems, and more specifically, to managing and activating objects in distributed computer systems.

A distributed computer system is a network of computer processors that although geographically separated, are linked together functionally. It is often desirable to execute a computer program, or portions of a computer program, simultaneously across several computer processors in the distributed system. In such an environment, protocols coordinating the various portions of the program(s) are necessary.

Distributed computing systems executing object-oriented programming models are known. Essentially, in these systems, programs are written as an aggregation of objects, each of which may reside on and be executed on a different computer in the distributed system.

Typically, in an object-oriented distributed system, a local computer system, called the client, may access objects on remote computer systems. If the objects to be accessed on the remote computer system take up processor resources, i.e., if they consume physical or virtual memory and have a thread of control, they are said to be “active.” Examples of such active objects include running programs or objects that are part of active programs. Such objects are always taking up resources from the physical machine, even when they are not doing active work on behalf of themselves or at the request of some other object.

A “passive” object, on the other hand, refers to a presently non-active object on the remote computer. If a passive object is “activatable,” it may, at the request of the client computer system, be brought into an active state. Objects may be passive simply because they have never been instantiated. Alternatively, to save system resources, active objects may be de-activated and become passive. In particular, for active objects that have become quiescent, it may be advantageous for the computer to save the state information of the object to a stable storage medium, such as a magnetic disk, and release any memory or threads of control associated with the object. The de-activated object does not take up physical or virtual memory and is not associated with a control thread, although it continues to exist and may be made active when called.

One known distributed system capable of activating objects is the object management groups Common Object Request Broker Architecture (CORBA) system. In the CORBA system, remote objects are always considered by the client to be potentially passive, and thus activatable, regardless of whether the object is actually active or passive. Additionally, although some objects at a remote system may be similar to one another, and capable of benefiting from a sharing of common resources, CORBA does not provide for the associating of similar objects.

There is, therefore, a need for a distributed system object management architecture that solves the above mentioned limitations found in the prior art.

SUMMARY OF THE INVENTION

To achieve the objects and in accordance with the purpose of the invention, as embodied and broadly described herein, a first aspect of the present invention includes a method of calling a remote object by a process comprising the steps of: (1) calling the remote object directly using a first address in a faulting remote reference to the remote object when the reference refers to an active instance of the remote object; and (2) calling an activator object using a second address in the faulting remote reference to perform activation of the remote object when the reference to the remote object does not refer to an active instance of the remote object. In an alternative aspect, a computer readable medium contains instructions for performing similar steps.

A second method consistent with the present invention includes a method of handling an object call at a remote site for a remote object, the method comprises the steps of: (1) determining whether a first predefined group of objects corresponding to the called remote object is active; (2) activating the remote object within the first group when the determining step determines that the first group is active; and (3) creating a second group of objects and activating the remote object within the second group when the determining step determines that the first group is not active. As with the first method, an alternative aspect includes a computer readable medium containing instructions for performing similar steps.

Still further, a distributed computer system consistent with the present invention includes a plurality of elements, including first and second computers. The second computer, in particular, receives requests for remote objects from the first computer and executes an object activator performing the steps of: (1) determining whether a first predefined group of objects corresponding to the requested remote object is active; (2) activating the requested remote object within the first group of objects when the determining step determines that the first group of objects is active; and (3) creating a second group of objects and activating the requested remote object within the second group of objects when the determining step determines that the first group of objects is not active.

DESCRIPTION OF THE PREFERRED EMBODIMENT

A distributed computer system and related methods consistent with the present invention are described herein. The distributed computer system uses a single interface at the client site to handle calls to call both active and activatable remote objects. Further, remote objects are aggregated into common groups of objects, thereby providing greater security between objects of disparate groups and efficiency between related objects of the same group.

FIG. 1is a high-level block diagram illustrating interaction of hardware and software components in an exemplary distributed computer system. Computer102includes a computer hardware/processing section107executing programs from memory section103. Memory103is preferably a random access memory, but may additionally or alternatively include other storage media such as magnetic or optical disks.

Memory103stores one or more computer procedures104a,104b, and104c, such as, for example, a computer program, thread, or object. Computer threads104aand104bare programs comprised of Java bytecodes executing through a Java virtual machine105. The virtual machine is itself a process that when executed on computer102, translates threads104aand104binto computer instructions native to computer hardware107. In this manner, virtual machine105acts as an interpreter for computer hardware107. In contrast to threads104aand104b, program104cuses instructions native to computer hardware107, and thus does not require virtual machine105.

Computer102is connected via network120to computer112. Computer112includes components similar to those of computer102, and will therefore not be described further. Although the simple network described above includes only two computers, networks of many computers, or even networks of many thousands of computers, such as the Internet, may be used to implement the concepts of the present invention.

Throughout the remainder of this disclosure, computer system102will be described as the requester of remote objects. Computer system112executes the remote objects and returns results to computer102. Although not explicitly shown, a plurality of computer systems112may execute multiple objects for a single host computer102.

FIG. 2is a block diagram illustrating software entities located on computer102.

Process202is a program active on computer102, such as process104in FIG.1. As shown, process202includes a plurality of bytecodes that may be translated from instructions written in the Java programming language, including instruction203, which is an invocation to a method residing in an object on remote computer112. The method invocation is preferably defined to be handled by local proxy object205, which functions as an interface for remote object calls from computer102and hides the remote calling protocol from the invocating process.

Proxy205may assume one of multiple implementations depending on the status of the object being referenced; such as whether the object is active or activatable (i.e., presently passive). When called by process202, proxy205packages the call using the appropriate implementation and forwards it to remote computer112. Results received from the remote computer, such as results from the method invocation, are passed back through proxy205to process202.

As described in more detail below, proxy205enables process202to make a single method invocation for both active and activatable objects. In other words, process202is not required to monitor whether a remote object is active or activatable.

Activation of remote objects by proxy205is implemented through an object reference known as a faulting remote reference, illustrated by reference210. For each remote object, faulting remote reference210is used to “fault in” the object's reference upon the first method invocation to the object. Faulting remote reference210includes a persistent handle (an activation identifier)211and a transient remote reference212. Both persistent handle211and transient remote reference212are obtained from the remote computer corresponding to the remote object, and contain address information for contacting the remote computer, such as the appropriate network address and port number, and address information more specific to the remote object being referred. Persistent handle211is the more general reference and references an activator entity (described in more detail below) at the remote host. Reference212is the actual “live” reference to the active remote object, and is used to contact the remote object directly.

In operation, upon invocation of a method requiring a remote object, proxy205checks reference210. A null value in “live” reference212indicates that the remote object may become passive (i.e., it is not an active-only object), and proxy205uses activation identifier211to contact an activator entity at the remote site. If reference212is not null it will point directly to the remote object. This indicates an active remote object, which proxy205contacts directly.

FIG. 3is a block diagram illustrating software entities located on host computer112. As mentioned previously, host computer112is contacted by the client using either the activation identifier reference211or “live” reference212. Activation identifier reference211references object activator302, which supervises object activation on the host. Activator302functions as: (1) a database that maps activation identifiers211to the information necessary to activate an object (e.g., the object's class, the location a URL from where the class can be loaded, specific data the object may need to bootstrap, etc.); (2) a database for tracking the current mapping of activation identifiers to active objects; and (3) a manager of Java virtual machines.

Activatable objects are defined by the designer to exist as a member of a group of objects, such as group305. The designer preferably assigns objects to particular groups so that objects within a group are designed to interact with one another. For example, objects within a group should have a relationship of mutual trust strong enough to allow them all to run within a single Java virtual machine308. Once assigned to a group, objects stay within that group.

Activation entity304manages object group305. In particular, activation entity304activates passive objects and creates objects pursuant to requests from object activator302, and returns a reference to the corresponding activated object to object activator302. To activate a quiescent object within group305, activation entity304allocates the appropriate operating system resources (memory, process, or thread allocation) and starts up the object. After activating an object, activation entity304passes information to object activator302describing the way in which the object is to be reached for further communication. Object activator302may then forward this information to proxy205, which appropriately updates faulting remote reference210. If an object later de-activates, or is de-activated, object activator302similarly communicates with proxy205to update the faulting remote reference.

Preferably, one activation entity304exists per each active Java virtual machine308.

FIG. 4is a flow chart further illustrating steps consistent with the present invention. Upon invocation of a remote object by computer102, proxy205determines if the transient remote reference (the “live” reference)212at computer102is present, i.e., if it is not null, and proxy205contacts the active remote object (steps402,404). Otherwise, proxy205uses persistent handle211within reference210to contact object activator302(steps402,406). Object activator302uses information within reference210to determine if an object group corresponds to the invocated object (step408). If an appropriate group is already active, an activation request for the called object is forwarded to the appropriate activation entity (steps408,410), and the object is activated (step411). Otherwise, the activator object first creates a new virtual machine and a new activation entity (steps408,412), and then forwards the activation request to the newly created activation entity, (step414), at which point the object is activated (step415). In response to forwarding an activation request to an activation entity, the object activator will usually receive an updated network address and port number, which it forwards to proxy object205(step416).

As described above, object groups such as group305form the basic unit of object activation. Object activator302and activation entities304manage the object groups, such that if a group has not been activated then a call to any object of an object group will cause the activation of that object group and the called object in a new Java virtual machine.

Clustering objects within an object group on a single Java virtual machine allows related objects to share an address space, which in turn allows close communication between the objects. Objects in different groups, on the other hand, are in different Java virtual machines and thus have a much stronger security separation, ensuring that those objects will not interfere, either intentionally or unintentionally, with each other.

Further, a single interface is seen by clients attempting to call remote objects. The interface has multiple implementations depending on the status of the object being referenced, allowing for transparent mixing of active and passive (i.e., activatable) objects in the same system, supporting both without requiring that the clients of those objects have any knowledge of whether or not the object is activatable. This interface provides the client the ability to make any calls that are supported by the remote object through a faulting remote reference.