pull
diapason.mesh.pull
¶
Reaching a device that cannot be dialled.
Everything until now assumed a command travels by knocking on the target's door. That holds between two computers on one network and fails for exactly the devices this mesh exists to include: a phone has no stable address, sits behind a carrier NAT, and is put to sleep by the operating system whenever the user looks away. Succès Flutter is where the mesh meets those devices.
So the direction flips. A phone asks « quelque chose pour moi ? », receives what is waiting, does it, and says what happened. Three signed round trips, no inbound connection, no address to publish.
Two things this buys beyond reachability:
The poll IS the heartbeat. A device asking for its commands has proved it is awake more convincingly than any beacon could, so the same request records presence — one round trip where a naive design would spend two.
And the honesty rules finally fit the device. A phone that is polling every few seconds is not "hors ligne"; a command for it has not failed, it is simply about to be collected. Telling the user « elle n'a pas été effectuée » about a command that arrives four seconds later would be the exact lie §57 exists to forbid.
PullRejected
¶
Bases: Exception
A poll or acknowledgement that will not be honoured.
collect_for_device(raw, *, registry, queue, local_owner_id, local_device_id, now=None)
¶
Hand a verified device whatever is waiting for it.
Presence is recorded from the poll itself: asking for your commands is the strongest possible evidence that you are awake.
device_collects_its_own(device)
¶
True when this device comes and fetches, rather than being dialled.
Read from what the device last told us, not inferred from what we do not know about it. The tempting shortcut — "no address means it must poll" — is wrong in a way that produces a lie: a desktop that has simply not announced yet also has no address, has no intention of polling, and would sit under « il le récupérera à son réveil » forever.
transport is only ever set to pull by collect_for_device, so
this is evidence: the device has actually polled at least once. It is also
self-correcting — a device that stops polling falls out of presence on its
own and the ordinary offline rules take over again.
record_ack(raw, *, registry, queue, local_owner_id, local_device_id, now=None)
¶
Record what a device says it did with the commands it collected.