What is the simplest way to synchronize GPIO state (states are: 1 or 0) between two Raspberry devices connected via Internet ?
What I need is immediately change GPIO state on Raspberry 1 if Raspberry 2 GPIO was changed before.
I'm thinking about bash script which read state on Raspberry 1 and send the same state to Raspberry 2 via ssh.
ssh email@example.com 'echo "1" > /sys/class/gpio/gpio4/value'
But I'm not sure about speed of this action.