Introduction

Welcome to the Connectivity Training Tutorial, Module 2. In this training, we show how to create and connect a DOFConnection and a DOFServer, which sets up a system of communication between two nodes. This connection allows uni- and bi-directional data flow between nodes, systems, applications, and devices on simple and complex networks (or mesh) even in scenarios where a network is not required.

For more information, see the DOF Connectivity Programmer's Guide at https://opendof.org/downloads/dof-connectivity-programmers-guide/.

Understanding Transports

One of the advantages of DOF is that it is transport-independent. Achieving transport independence for DOF is a result of isolating DOF protocols from transport protocols, relying on two basic abstractions. This training will use the typical DOF implementation of a transport for IP, and you will not need to implement your own transport; however, it is useful to have a basic understanding of the transport abstractions that DOF relies on.

Network Address Abstraction

The first abstraction is the network address. The DOF libraries include a DOFAddress API, which is an abstract representation of an address on the underlying transport layer. The OALs do not define how the DOFAddress should be created or handled, but routing relies on the DOFAddress instance. The transport implementation defines the methods for creating a DOFAddress instance and takes care of routing at the transport level.

Connection Type Abstraction

The second abstract concept you will deal with for connections is the connection type. DOF categorizes connections into streaming connections or datagram connections; a streaming connection is loosely defined as a lossless connection that delivers packets in order, while a datagram connection doesn’t guarantee packet order and is potentially lossy.

It is up to the transport implementation to create a relationship between the DOF connection types and the transport’s connection types. Some transports may only support one of the types. The Inet transport implementation supports both. If you create a streaming connection in DOF using this transport, it creates a TCP/IP connection. A DOF datagram connection creates a UDP/IP connection at the transport layer.