Page 3 of 5
Enterprise JavaBeans
With Enterprise JavaBeans (EJB) things get a little more complicated. EJB is a server-side mechanism that allows you to build
a managed server application. The EJB server manages a pool of EJB applications, each of which handle the requests from network
clients. EJB builds an interface between a transaction processing server and client applications that can communicate over
the network. An EJB server does not, by definition, automatically distribute applications across several machines to do the
processing. Each EJB session or entity object is processed on the local machine. If you extend the EJB server such that these
EJB sessions or entities can span several computers on a network automatically, you may have an abstract notion of what JavaSpaces-Jini
can do.
CORBA
JavaSpaces may also be confused with CORBA (Common Object Request Broker Architecture). The Object Management Group, an association
of over 800 computer industry members, designed CORBA to span several component and/or object computing models and allow interactivity
across them. CORBA defines a method to write client and server objects in a number of programming languages, including Java,
C++, Smalltalk, Ada, and, believe it or not, Cobol. CORBA makes it possible for these languages to run on a number of different
platforms and still communicate and interact with each other through a common object brokering infrastructure. All this works
through the industry-accepted standard known as the Internet Inter-ORB Protocol (IIOP).
JavaSpaces provides server-side processing in a distributed environment. You are still passing objects around the network, but unless you use a Java object request broker like Visigenic Visibroker, Sun's Java IDL, or IBM Component Broker, these objects can only work in a Java environment. CORBA allows software development teams to develop using several languages or new code to be integrated with existing code by wrapping legacy code in CORBA objects. JavaSpaces actually fits into a separate brokering system for objects on the server side. Jini, for its part, works similarly to CORBAservices, a set of system objects for resource identification, leasing, transactions, and so on.
PVM architecture
Also comparable to JavaSpaces-Jini is the Parallel Virtual Machine (PVM) architecture from Oak Ridge National Labs. PVM is
actually a set of programming libraries that allow you to build multicomputers, a set of independent machines on a network that share application processing, creating true heterogeneous network computing.
Using PVM, you can create a distributed application, with each PVM daemon (server) automatically handling the job of network
processing synchronization, communications, and fault tolerance. PVM participants may be Unix or Windows machines communicating
over TCP sockets. There are programming interfaces to PVM in many languages including Java, C, C++, Perl, and Python.
JavaSpaces is similar to PVM. JavaSpaces is based on Tuple space, a concept created by Dr. David Gelertner of Yale University in his public domain Linda project. Tuple space is an abstract concept of a location, whereby processes can communicate in a distributed shared memory. The memory may be on a single machine, but more realistically is on several computers on a network -- each possibly a completely different computing platform. PVM and JavaSpaces solve the same problem of building heterogeneous network computers using different means and mechanisms.