Grid Ops Java - Tutorial
Grid Ops is an open source Java toolkit making distributed systems much easier to implement. Grid Ops implements a set of distributed system protocols which you can use in your applications. You can also easily implement your own distributed protocols, and you can mix them all in your applications.
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, where Java EE focuses more on what goes on inside a single application, Grid Ops focuses more on what goes on between applications.
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:
- Grid Ops
- Grid Services
IAP is an open network protocol suite. IAP is described in more detail later. Grid Ops uses IAP to communicate with other hosts (as long as they also understand IAP). Anyone can implement IAP and thus interact with Grid Ops hosts, or our grid services.
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 a binary encoding called ION. ION resembles a binary version of JSON but is more compact on the wire, easier and faster to read and write and ION has a few more data types than JSON.
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.
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 protools 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.
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.