Cajo project

Last updated

The Cajo Project is a framework that enables multiple Java applications that are spread across multiple machines to work together as one transparently and dynamically. This framework is useful for both open/free and proprietary applications that need distributed computing capabilities. It is capable of being used on almost any Java-equipped platform (JRE/JME 1.2 or higher) (mobile phones, mainframes, servers, embedded devices etc.) It is a “drop-in” framework, because it does not impose any structural requirements or source code changes and is 100% pure Java with no XML code. It also is not dependent on any other frameworks and can work behind NAT, firewalls, even HTTP proxies.

Contents

History

The Cajo Project has 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, and the documentation is free under the GFDL.

Usage

Overview

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

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 are one or more interfaces to the object, defining how the client may use it, known at Compile time. 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. [2] 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. [3] 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 with IP multicast. [4] This technique lets machines interested to use remote references, simply listen for the announcements. This provides a One-to-many linkage mechanism, where the users of the remote object do not need to know the TCP/IP address of the host machine.

Remote graphical user interfaces

The Cajo Project is also used to remote graphical user interfaces. [5] This allows an application to run its view on separate machines from its model, and even its controller objects.

See also

Related Research Articles

Java Platform, Standard Edition is a computing platform for development and deployment of portable code for desktop and server environments. Java SE was formerly known as Java 2 Platform, Standard Edition (J2SE).

In computing, the Java Remote Method Invocation is a Java API that performs remote method invocation, the object-oriented equivalent of remote procedure calls (RPC), with support for direct transfer of serialized Java classes and distributed garbage-collection.

The Common Object Request Broker Architecture (CORBA) is a standard defined by the Object Management Group (OMG) designed to facilitate the communication of systems that are deployed on diverse platforms. CORBA enables collaboration between systems on different operating systems, programming languages, and computing hardware. CORBA uses an object-oriented model although the systems that use the CORBA do not have to be object-oriented. CORBA is an example of the distributed object paradigm.

Library (computing) Collection of non-volatile resources used by computer programs, often for software development

In computer science, a library is a collection of non-volatile resources used by computer programs, often for software development. These may include configuration data, documentation, help data, message templates, pre-written code and subroutines, classes, values or type specifications. In IBM's OS/360 and its successors they are referred to as partitioned data sets.

In computing, just-in-time (JIT) compilation is a way of executing computer code that involves compilation during execution of a program rather than before execution. This may consist of source code translation but is more commonly bytecode translation to machine code, which is then executed directly. A system implementing a JIT compiler typically continuously analyses the code being executed and identifies parts of the code where the speedup gained from compilation or recompilation would outweigh the overhead of compiling that code.

Swing (Java) Java-based GUI toolkit

Swing is a GUI widget toolkit for Java. It is part of Oracle's Java Foundation Classes (JFC) – an API for providing a graphical user interface (GUI) for Java programs.

In computer science, reflective programming or reflection is the ability of a process to examine, introspect, and modify its own structure and behavior.

This article compares two programming languages: C# with Java. While the focus of this article is mainly the languages and their features, such a comparison will necessarily also consider some features of platforms and libraries. For a more detailed comparison of the platforms, see Comparison of the Java and .NET platforms.

Late binding or dynamic linkage—though not an identical process to dynamically linking imported code libraries—is a computer programming mechanism in which the method being called upon an object, or the function being called with arguments, is looked up by name at runtime. In other words, a name is associated with a particular operation or object at runtime, rather than during compilation. The name dynamic binding is sometimes used, but is more commonly used to refer to dynamic scope.

In software engineering, inversion of control (IoC) is a programming principle. IoC inverts the flow of control as compared to traditional control flow. In IoC, custom-written portions of a computer program receive the flow of control from a generic framework. A software architecture with this design inverts control as compared to traditional procedural programming: in traditional programming, the custom code that expresses the purpose of the program calls into reusable libraries to take care of generic tasks, but with inversion of control, it is the framework that calls into the custom, or task-specific, code.

C Sharp (programming language) Multi-paradigm (object-oriented) programming language

C# is a general-purpose, multi-paradigm programming language. C# encompasses static typing, strong typing, lexically scoped, imperative, declarative, functional, generic, object-oriented (class-based), and component-oriented programming disciplines.

Oxygene (programming language) Object Pascal-based programming language

Oxygene is a programming language developed by RemObjects Software for Microsoft's Common Language Infrastructure, the Java Platform and Cocoa. Oxygene is based on Delphi's Object Pascal, but also has influences from C#, Eiffel, Java, F# and other languages.

.NET Remoting is a Microsoft application programming interface (API) for interprocess communication released in 2002 with the 1.0 version of .NET Framework. It is one in a series of Microsoft technologies that began in 1990 with the first version of Object Linking and Embedding (OLE) for 16-bit Windows. Intermediate steps in the development of these technologies were Component Object Model (COM) released in 1993 and updated in 1995 as COM-95, Distributed Component Object Model (DCOM), released in 1997, and COM+ with its Microsoft Transaction Server (MTS), released in 2000. It is now superseded by Windows Communication Foundation (WCF), which is part of the .NET Framework 3.0.

Charm++ is a parallel object-oriented programming paradigm based on C++ and developed in the Parallel Programming Laboratory at the University of Illinois at Urbana–Champaign. Charm++ is designed with the goal of enhancing programmer productivity by providing a high-level abstraction of a parallel program while at the same time delivering good performance on a wide variety of underlying hardware platforms. Programs written in Charm++ are decomposed into a number of cooperating message-driven objects called chares. When a programmer invokes a method on an object, the Charm++ runtime system sends a message to the invoked object, which may reside on the local processor or on a remote processor in a parallel computation. This message triggers the execution of code within the chare to handle the message asynchronously.

In object-oriented computer programming, an extension method is a method added to an object after the original object was compiled. The modified object is often a class, a prototype or a type. Extension methods are features of some object-oriented programming languages. There is no syntactic difference between calling an extension method and calling a method declared in the type definition.

Da Vinci Machine

The Da Vinci Machine, also called the Multi Language Virtual Machine, was a Sun Microsystems project aiming to prototype the extension of the Java Virtual Machine (JVM) to add support for dynamic languages.

Component Object Model (COM) is a binary-interface standard for software components introduced by Microsoft in 1993. It is used to enable inter-process communication object creation in a large range of programming languages. COM is the basis for several other Microsoft technologies and frameworks, including OLE, OLE Automation, Browser Helper Object, ActiveX, COM+, DCOM, the Windows shell, DirectX, UMDF and Windows Runtime. The essence of COM is a language-neutral way of implementing objects that can be used in environments different from the one in which they were created, even across machine boundaries. For well-authored components, COM allows reuse of objects with no knowledge of their internal implementation, as it forces component implementers to provide well-defined interfaces that are separated from the implementation. The different allocation semantics of languages are accommodated by making objects responsible for their own creation and destruction through reference-counting. Type conversion casting between different interfaces of an object is achieved through the QueryInterface method. The preferred method of "inheritance" within COM is the creation of sub-objects to which method "calls" are delegated.

Microsoft Silverlight is an application framework for writing and running rich web applications that was actively developed and marketed by Microsoft from 2007 to 2012. This is a technical overview of the platform's history.

Evocb

EVO/CB is a distributed object system that is constructed on top of publish/subscribe event systems. This design decision implies modeling method calls as events and subscriptions over the underlying messaging middleware.

References

  1. "Adding cajo to existing applications". Cajo project. 2007-08-04. Archived from the original on 2006-09-25. Retrieved 2008-01-19.
  2. "Using remote objects as if they were local". Cajo project. 2007-08-04. Archived from the original on 2007-12-23. Retrieved 2008-01-19.
  3. "Why script cajo?". Cajo project. 2007-08-04. Archived from the original on 2008-01-03. Retrieved 2008-01-19.
  4. "Using cajo Multicasting". Cajo project. 2007-08-04. Archived from the original on 2007-12-23. Retrieved 2008-01-19.
  5. "Using the cajo proxy mechanism". Cajo project. 2007-08-04. Archived from the original on 2007-12-23. Retrieved 2008-01-19.