Remoting Home

Introduction

Remoting is a framework issuing remote calls over TCP/IP with optional TLS support. It provides for callback patterns, broadcating and bean support and interoperates well with the spring framework and OSGi.

Furthermore, it offers two alternative wire protocols. One is based on java.io.ObjectOuputStream while the other protocol uses a highly optimized binary data stream, which additionally features C++ interoperability through the fancysock library.

The source code can be checked out from the SVN repository located here:

http://svn.clazzes.org/svn/remoting

For manual installation you may download the .jar files from the maven repository:

http://maven.clazzes.org/org/clazzes/remoting/

Maven integration

We recommend to build your project with Maven. Just add the following snippets to your pom.xml file:

<repository>
  <id>clazzes.org</id>
  <url>http://mvn.clazzes.org/</url>
</repository>
 
<dependency>
  <groupId>org.clazzes</groupId>
  <artifactId>remoting</artifactId>
  <version>yourversion</version>
</dependency>

Source code and issue tracker

Subversion: http://svn.clazzes.org/svn/remoting

Jira: REMOTING

Git-Mirrors: See https://git.clazzes.org/, search for "java-libs/rpc".

Protocol and Client / Server Support

Binary Protocol

The binary protocol that is based on but not quite equal to Java serialization.

Both Java and C++ can act as client and server for this variant.

Binary Protocol C++

For C++ see fancysock3-dev from the *-fancylibs-3 repos on deb.clazzes.org and rpm.clazzes.org.

As as starting point look at class Fancy::Sock::RemotingConnectionHandlerFactory (server) and Fancy::Sock::RemotingClientPool (client).

JSON Protocol

The JSON protocol is based on JSON-RPC-2.0 and supported by a server helper for C++, and there are examples for JavaScript clients (but nothing public yet).

JSON Protocol C++

For C++ see fancysock3-dev from the *-fancylibs-3 repos on deb.clazzes.org and rpm.clazzes.org.

As as starting point look at class Fancy::Sock::HttpD::JsonRpc2RequestHandler.

JSON Protocol JavaScript

There is no public example from clazzes.org yet, but it's basically JSON-RPC-2.0.

JSON Serialization and Deserialization behaviour & requirements (of C++ backend)

If an object is serialized all fields are serialized. Addtionally there's a field "serialID" that's basically the fully qualified class name of the Java data classe ("POJO"), like org.clazzes.foobar.api.data.MyPojo. All complex fields can be null, including Strings.

When deserializing a complex top-level object that field "serialID" is required to understand the contained type.