Cajo project
Encyclopedia
The Cajo Project is a framework
Software framework
In computer programming, a software framework is an abstraction in which software providing generic functionality can be selectively changed by user code, thus providing application specific software...

 that enables multiple Java
Java (Sun)
Java refers to several computer software products and specifications from Sun Microsystems, a subsidiary of Oracle Corporation, that together provide a system for developing application software and deploying it in a cross-platform environment...

 applications
Application software
Application software, also known as an application or an "app", is computer software designed to help the user to perform specific tasks. Examples include enterprise software, accounting software, office suites, graphics software and media players. Many application programs deal principally with...

 that are spread across multiple machines to work together as one transparently and dynamically.
This framework is useful for both open/free
Free and open source software
Free and open-source software or free/libre/open-source software is software that is liberally licensed to grant users the right to use, study, change, and improve its design through the availability of its source code...

 and proprietary
Proprietary software
Proprietary software is computer software licensed under exclusive legal right of the copyright holder. The licensee is given the right to use the software under certain conditions, while restricted from other uses, such as modification, further distribution, or reverse engineering.Complementary...

 applications that need distributed computing capabilities and is capable of being used on almost any Java-equipped platform (JRE
Java Platform, Standard Edition
Java Platform, Standard Edition or Java SE is a widely used platform for programming in the Java language. It is the Java Platform used to deploy portable applications for general use...

/JME
Java Platform, Micro Edition
Java Platform, Micro Edition, or Java ME, is a Java platform designed for embedded systems . Target devices range from industrial controls to mobile phones and set-top boxes...

 1.2 or higher) (mobile phones, mainframes, servers
Server (computing)
In the context of client-server architecture, a server is a computer program running to serve the requests of other programs, the "clients". Thus, the "server" performs some computational task on behalf of "clients"...

, embedded devices, etc.). It is a “drop-in” framework, because it does not impose any structural requirements or source code
Source code
In computer science, source code is text written using the format and syntax of the programming language that it is being written in. Such a language is specially designed to facilitate the work of computer programmers, who specify the actions to be performed by a computer mostly by writing source...

 changes and is 100% pure Java with no XML code. It also is not dependent on any other frameworks and can work behind NAT
Network address translation
In computer networking, network address translation is the process of modifying IP address information in IP packet headers while in transit across a traffic routing device....

, firewalls
Firewall (computing)
A firewall is a device or set of devices designed to permit or deny network transmissions based upon a set of rules and is frequently used to protect networks from unauthorized access while permitting legitimate communications to pass....

, even HTTP proxies
Proxy server
In computer networks, a proxy server is a server that acts as an intermediary for requests from clients seeking resources from other servers. A client connects to the proxy server, requesting some service, such as a file, connection, web page, or other resource available from a different server...

.

History

The Cajo Project has recently been issued by the IANA port number 1198 and UDP Multicast address 224.0.23.162.

License

The source code is free under the LGPL
GNU Lesser General Public License
The GNU Lesser General Public License or LGPL is a free software license published by the Free Software Foundation . It was designed as a compromise between the strong-copyleft GNU General Public License or GPL and permissive licenses such as the BSD licenses and the MIT License...

, and the documentation is free under the GFDL
GNU Free Documentation License
The GNU Free Documentation License is a copyleft license for free documentation, designed by the Free Software Foundation for the GNU Project. It is similar to the GNU General Public License, giving readers the rights to copy, redistribute, and modify a work and requires all copies and...

.

Overview

Using the Cajo Project, ordinary unmodified Java objects, can be remote using a single line of code :


Itemserver.bind(someObject, "someName");


These can then be used by remote machines either statically, or dynamically.

Static remote object usage

Static remote object usage is typically performed when there exists one or more interfaces to the object, defining how the client may use it, known at Compile time
Compile time
In computer science, compile time refers to either the operations performed by a compiler , programming language requirements that must be met by source code for it to be successfully compiled , or properties of the program that can be reasoned about at compile time.The operations performed at...

. For example:


public interface SomeInterface {
... // method signatures
}


The remote object implements this interface, and possibly others, then remotes the object as shown previously.

Static remote object usage is provided through a TransparentItemProxy . The user of a remote object can create a reference to this object, which actually implements the shared interface, as follows:


SomeInterface si = (SomeInterface)TransparentItemProxy.getItem(
"//someHost:1198/someName", new Class[] {
SomeInterface.class }
);


A remote machine may now invoke methods on the remote object, with the exact Java syntax and semantics, as if it were local.

Dynamic remote object usage

Dynamic remote object usage is typically performed when the interface to an object will be determined at runtime. This is often the case when using Cajo remote objects in a scripting
Scripting language
A scripting language, script language, or extension language is a programming language that allows control of one or more applications. "Scripts" are distinct from the core code of the application, as they are usually written in a different language and are often created or at least modified by the...

 . A machine dynamically uses a remote object reference as follows:


// obtain reference
Object object = Remote.getItem("//someHost:1198/someName");

// typically obtained at runtime
String someMethod = "someMethod";

// also obtained at runtime
Object someArgs = new Object[] { someArgs, ... };

Object result = Remote.invoke(object, someMethod, someArgs);


This snippet invokes a method on a remote object, providing the arguments, (if any) and returning the result. (if any)

The cajo framework can allow a machine to remote its object reference using UDP
User Datagram Protocol
The User Datagram Protocol is one of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer applications can send messages, in this case referred to as datagrams, to other hosts on an Internet Protocol network without requiring...

/IP
Internet Protocol
The Internet Protocol is the principal communications protocol used for relaying datagrams across an internetwork using the Internet Protocol Suite...

 Multicast
IP Multicast
IP multicast is a method of sending Internet Protocol datagrams to a group of interested receivers in a single transmission. It is often employed for streaming media applications on the Internet and private networks. The method is the IP-specific version of the general concept of multicast...

 . This technique lets machines interested to use remote references, simply listen for the announcements. This provides a One-to-many
One-to-many
One-to-many may refer to:* Multivalued function, a one-to-many function in mathematics* Fat link, a one-to-many link in hypertext* Point-to-multipoint communication, communication which has a one-to-many relation-See also:*One-to-one...

linkage mechanism, where the users of the remote object do not need to know the TCP/IP
Transmission Control Protocol
The Transmission Control Protocol is one of the core protocols of the Internet Protocol Suite. TCP is one of the two original components of the suite, complementing the Internet Protocol , and therefore the entire suite is commonly referred to as TCP/IP...

 address of the host machine.

Remote graphical user interfaces

The Cajo Project is also used to remote graphical user interfaces . This provides the ability for an application to run its view on separate machines from its model, and even its controller objects.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK