Tech and Media Labs
This site uses cookies to improve the user experience.

Grid Ops Java - Tutorial

Jakob Jenkov
Last update: 2017-03-06

Grid Ops for Java is an open source distributed systems toolkit implemented in Java. The purpose of Grid Ops is to make it easy to implement a growing set of distributed architectures.

Grid Ops is different from the Java EE platform. The Java EE platform tends to focus more on internal application design whereas Grid Ops focuses more on distributed architecture. In other words, Java EE focuses more on what goes on inside an application and Grid Ops focuses more on what goes on between applications.

Grid Ops is developed by Nanosai which is a joint venture between Jenkov Aps (the company behind this website) and Zaiku Group.

The Grid

Grid Ops is part of an eco system for creating advanced realtime distributed systems. We call this eco system "The Grid" to set it apart from "The Web". The grid eco system consists of the following parts:

  1. ION
  2. IAP
  3. Grid Ops
  4. Grid Services

ION is a fast, compact, binary data format. ION is similar to a binary version of JSON but with a few improvements. You can embed binary data to easily transfer files, or data in other encodings like MP3, ASN.1, JPEG etc. You can embed UTF-8 text too. ION also contains compact encodings of tabular data like arrays of objects, database records, CSV files etc. and a compact encoding of UTC date / time. Click here to read the ION specification.

IAP is an open network protocol suite. IAP is described in more detail later.

Grid Ops is the implementation of ION, IAP and additional tools which make it easier to implement distributed systems. uses IAP to communicate with other hosts (as long as they also understand IAP).

The grid services are a set of services that we (Nanosai) host to make it even easier for you to implement and operate your distributed systems. You do not have to use the Nanosai hosted services to use Grid Ops and IAP. They are just a supplement for the impatient - helping you focus on your business rather than infrastructure.

IAP - Internet Application Protocols

HTTP did not meet the requirements for all the use cases we want The Grid and Grid Ops to support. Therefore we developed our own network protocol suite called IAP (Internet Application Protocols). IAP is a message oriented network protocol designed for both synchronous and asynchronous communication, making IAP suitable for many different use cases like RPC, file exchange, streaming, message queue subscriptions and much, much more. IAP is specified here: IAP Specification

IAP defines a basic message format which is used across many different use cases. IAP messages are encoded using ION.

IAP allows you to define different semantic protocols on top of the basic message format. The basic message format contains a set of fields that are pretty much always used in network communication. Semantic protocols can extend this message format and add protocol specific fields.

IAP Protocol Basics Illustrated

Predefined Protocols

We define and implement semantic protocols for common use cases. If none of the pre-implemented semantic protocols suit your needs you can design and implement your own semantic protocol. Grid Ops makes that easy.

We have already started defining the first semantic protocols. During this work we realized that the network protocol design affects the platform design, and the platform design affect the network protocol design. Therefore the protocol design and implementation is an iterative process where we refine both specification and implementation as we learn more.

Multi Protocol Applications

Grid Ops is designed to enable multi protocol applications - meaning applications that combine multiple semantic protocols to achieve their goal. Imagine combining a P2P protocol with a File Exchange protocol - then you have something that can be used for P2P backup. Or combining RPC with File Exchange - then you have something that resembles how HTTP is used today.

Multi Tenancy

Both Grid Ops and IAP are designed to support multi tenancy, where multiple "nodes" run within the same host. This is similar to having multiple websites (domains) running within the same web server, or multiple web applications within the same Java EE application server. Each node within a host has a unique node ID. IAP messages contain a node ID telling for which node within the host the message is intended.

Maven Dependency

The Grid Ops for Java Maven dependency looks like this:


Remember to replace the version number with the version of Grid Ops you intend to use.

GitHub Repository

The Grid Ops GitHub repository can be found here:

Jakob Jenkov

Copyright  Jenkov Aps
Close TOC