What Is Grid Ops? In post [ ] we introduced Grid Ops as an open source Java toolkit for creating advanced distributed systems. We also wrote that Grid Ops consists of a set of core tools for the implementation of distributed systems in general, and a set of commonly used distributed systems infrastructure services. 1 Our mission is to help developers get distributed systems up and running with just few lines of code. Although we started with a Java implementation, in future we hope to be able to make implementations in other languages such as C# and D. The main components of Grid Ops are: TcpServer TcpSocketsPort Host NodeContainer These four components form the basic foundations of Grid Ops as illustrated below: 1. The is one of the ways messages can enter a . The reads messages via a and passes them on to the . **TcpServer** **Host** **Host** **TcpSocketsPort** **NodeContainer** 2. The manages one or more TCP sockets internally. These TCP sockets can come from a or be opened by the application as client connections (outgoing connections). Thus the can be used as an interface to both incoming and outgoing connections, meaning as both an interface to a server and a client. **TcpSocketsPort** **TcpServer** **TcpSocketsPort** 3. The routes the messages it receives to the correct node internally. You can plug in node reactors, protocol reactors and message reactors into the . That is how developers can implement multi-tenancy and multi-protocol applications. **NodeContainer** **NodeContainer** In nutshell, the class in Grid Ops functions can route incoming messages to the components that are to process them. The will look at the node id in the incoming message and forward the message to the corresponding . The will look at the semantic protocol id + version and forward the message to the corresponding protocol reactor. The protocol reactor will look at the message type of the incoming message and forward the message to the corresponding message reactor. **NodeContainer** **NodeContainer** **NodeReactor** **NodeReactor** Messages are received from the outside, typically via a and a , and then given to the , which internally routes the messages to the correct (via the and instances). **TcpServer** **TcpSocketsPort** **NodeContainer** **MessageReactor** **NodeReactor** **ProtocolReactor** What About Threads? Well a has its own thread which accepts incoming connections. This thread does not read anything from the incoming connections. **TcpServer** The also has its own thread which pulls the messages out of the and passes them on to the . There is a 's method that is called by the same thread which runs the loop. That way the reading and processing of messages happens by the same, single thread. Thus developers can code their node reactors, protocol reactors and message reactors assuming a single-threaded concurrency model. **Host** **TcpSocketsPort** **NodeContainer** **NodeContainer** **react()** **Host** Grid Ops Stack Overview This is it for now, we will continue with more details in future posts. If you would like to play with Grid Ops please visit our and for code please check . We are gearing up for the launch of some of the services, if you would like to receive beta invite please Github page here [**Subscribe here.**](https://goo.gl/forms/zXQe9k2es9iombdD2)