Peering

Your agents can work together across all your devices.

Run J5 on more than one machine and peer them. Agents on each machine see the others in their address book and message them the way they message the agent next to them.

Different machines can do different things.

Most people already work across a few machines. Peering lets each agent reach the colleague that has what it needs, instead of you copying messages between windows.

  1. 1

    Agents see where everyone lives

    Each participant shows up with its device's name, so an agent can pick the right one.

  2. 2

    You say what each device is for

    Put it in your own instructions, in whatever words you like.

  3. 3

    Agents never manage connections

    They message each other directly, and J5 delivers.

Your instructions

# Devices

laptop
has Xcode and the iOS simulator; runs the mobile builds
cloud-vm
lots of resources, stays on overnight
home-server
can reach the home network and the NAS

Two ways to get a message across.

When you peer two devices, J5 works out how messages can get between them. Each direction is set up on its own, so a pair can send directly one way and poll the other.

Direct connection

One device opens a connection to the other and hands each message straight to the agent. It needs the receiving device to be reachable and on.

Polling

Messages wait on the device that can be reached. J5 on the other device fetches them over a connection it opens itself, and hands each to its agent.

When to use each.

Direct connection

When one device can reach the other.

The sending device opens a connection to the receiving one and delivers the message straight to the agent. Delivery is immediate, and nothing is stored in between.

Choose it for devices that are always on and can reach each other: two cloud VMs, or a VM and a home server on Tailscale. If the receiving device is off, the message can't be delivered.

CLOUD VMalways onLOCAL SERVERalways onNETWORKCLOUD VMalways onLOCAL SERVERalways onNETWORK
Polling

When one device cannot reach the other.

The reachable device stores the messages, and the device that can't be reached polls for them over a connection it opens itself. Its own messages and replies still go directly.

Choose it for a laptop behind an office firewall, or any device other machines can't connect to. There's nothing to configure on the firewall or proxy: the laptop only makes ordinary outgoing HTTPS connections.

CLOUD VMalways on, reachableWORK LAPTOPbehind an office firewallFIREWALL · NO INCOMING CONNECTIONS TO LAPTOPCLOUD VMalways on, reachableWORK LAPTOPbehind an office firewallFIREWALL · NO INCOMING CONNECTIONS TO LAPTOP
Polling

When a device comes and goes.

A laptop that sleeps, or a desktop app that's closed, can't take messages even when it could be reached. With polling, its messages wait on the other device and nothing is lost. When it's back, J5 fetches everything that arrived, with each agent's messages in the order it sent them.

Choose it for the desktop app, or any device that isn't always on. If you're not sure, use polling: it works on any network.

CLOUD VMalways onLAPTOPawakeNETWORKASLEEPCLOUD VMalways onLAPTOPawakeNETWORKASLEEP

Peer your first two devices.

Once J5 is running on both machines, you set it up from one J5 window, in about a minute.

  1. 1

    Open Peer servers

    It's under Settings → Connections → Peer servers.

  2. 2

    Add the other machine as a peer

    Choose Add peer and pick the other server.

  3. 3

    Confirm how messages will travel

    J5 checks which way each server can reach the other and spells out the setup it proposes. Choose Peer to accept it, or Set up differently to pick the direction and addresses yourself.

Only one machine running J5 so far? Download it for the other, or install the server.