Networking

How to manage networking for multi-computer synchronisation

The networking functionality of CaptureGRID allows you to connect and control a large number of cameras, by splitting the USB connections across multiple computers. This means the number of cameras is not limited by the USB hardware capabilities of a single computer, but instead can be scaled up by adding more computers.

The computers you use do not have to be the same type, or even use the same OS, they just need to have the CaptureGRID software installed and running on them, and be connected to the same local network. So for example, if the multi-camera rig needs to support 90 cameras, this could be achieved with either:

  • 3 Windows PCs, with 30 cameras connected to each

  • iMac connected to 90 Raspberry Pi boards, each with a single camera

The screenshot below shows the Network tab, which is used to monitor and these control features.

_images/networking_v4_10.png

Each computer on the network is referred to as a Node, and the table in the centre shows all the known nodes along with their status.

In order to discover and connect to the other nodes on the local network, the app will periodically send out a discovery message. Once another node is detected, the two will begin further network communication and synchronise camera and photo information.

Once all nodes are connected and synchronised, the user can operate the app from just one of the computers, to get a unified view of all cameras and photos on the network, and be able to take actions on all cameras at the same time.

Network Mode

Each node can be configured to operate with a particular network mode. This controls which other nodes it is allowed to communicate with.

To change this, right-click a node in the node table, and use the Set Network Mode menu option. For the local node, it can also be set using the Network Mode dropdown menu. The valid modes are:

Network Mode

Description

P2P

P2P (peer to peer) nodes main connection to other P2P nodes and to the Master node.

Master

Master node maintains connection to all other nodes, regardless of their network mode. Master node also distributes options to all other nodes.

Slave

Slave nodes only maintain connection to the Master node.

The default mode is P2P, and this is suitable for most situations. A typical configuation is to have one node set to Master, and all other nodes set to P2P.

For scenarios that have a large number of nodes (such as when using Raspberry PIs or similar), it is recommended to set the main computer to Master, and all other nodes to Slave. This reduces the overall network traffic being sent between nodes.

Tip

Before right-clicking the nodes in the node table, its possible to select multiple rows in the table. This allows the mode to be changed for multple nodes at the same time.

Distributing Options

It’s not just camera and photo information that can be synchronised between nodes, the app also allows various options to be set from one node by the user, and automatically sent to the other nodes.

This is enabled for any nodes that have Network Mode set to Master.

Tip

It’s recommended that you consider one of the computers as the Master node, and set the Network Mode to Master for only that node, and make all edits to the Options from that node.

Photo Transfers

Whenever a new photo is taken, information about that photo is synchronised to all nodes. However by default, the actual photo file will only be saved to the node where the camera is connected, to the Photo Download Directly on that computer.

To gather all the photos onto a single computer, the app has a feature for transferring photo files between nodes. To enable this, change the Sync photos dropdown menu. The valid options are:

Sync Mode

Description

None

Photo transfers are not enabled.

All

Photo transfers for all photos are enabled.

JPEG

Photo transfers for only JPEG photos are enabled.

Note

An alternative to using the built-in photo transfers, is to instead point each node’s Photo Download Directory to a common network shared folder. Depending on you network configuration, this may result shorter times to gather the photos to a single location.

However, the app’s photo viewer will not be aware of those network transfers, so it will only be possible to view the photo from inside the app, on the node that did the USB download.

Node Information

The main part of the Network tab shows a table containing all the nodes that are known to the local app. It lists various bits of information about each node, as described below:

Column

Description

Status

The status of the node. This will be either:

  • Disconnected - network connection to the node is down

  • Pending - network connection to the node is pending

  • Ready - network connection to the node is up and node is ready

  • Removed - user has flagged the node as removed

Name

The name of the node. This defaults to node’s hostname. Each node can renamed with a custom name, by editing this field.

Address

The IP address of the node.

Mode

The network mode used by the node. This can be either:

  • P2P (peer to peer)

  • Master

  • Slave

Cameras

The number of cameras that where detected by the node.

Connected

The number of cameras on the node that are connected and and ready for operation.

Photos

The number of photos that have been taken by cameras that are connected to this node.

TX Rate

The network transfer rate in MBytes/second, for the most recent photo transfer from this node.

Bandwidth

The current network bandwidth in MBytes/second between this node, as averaged over the last second.

Latency

The round-trip time in milliseconds for a request/reply message between the node.

Disk Space

The available disk space on the node.

Version

The version of CaptureGRID software running on the node.

Platform

The type of computer running the node.

Clock

The current time on the node.

Up Time

The total time that the CaptureGRID app has been running on the node.

Network Configuration

The app will attempt to choose a suitable network configuration, so in most cases the network connection will work automatically. If the network connection is down, the app will periodically check and retry until the connection is up again. Manual changes to network configuration can be made using the controls in the bottom left of the Network tab.

Interface

When the network connection is enabled, the app will retrieve the list of valid network interfaces on the computer. These are listed in the Interface dropdown list. The app will attempt to choose the appropriate one for the local network, but you may need to select it here if it cannot determine the correct one to use.

Port

This controls which port used for network communication. A reason for changing this is if you need to operate two multi-camera rigs, as then the network communication can be segregated for each set of computers.

Discovery mode

This option allows control over what method is used for networt discovery. This may need to be changed if the computers are unabled to detect each other, due to how network traffic is handled by the local router.

Max transfers

This controls the maximum number of active photo transfers coming into the node.

Transfer size

When transferring photos, the data is split across multiple network messages; this controls the maximum size of each message. A larger transfer size means fewer messages need to be sent, but more memory is required.

Node timeout

If no messages have been received from another node within this timeout period, that node is considered to be unavailable and is disconnected.