Class Telemetry

java.lang.Object
protocols.apps.canvas.telemetry.Telemetry

public final class Telemetry extends Object
Structured, machine-readable event emitter — the data contract between the canvas demo and the babel-canvas-experiments correctness harness.

Each method writes exactly one line to the dedicated canvas.telemetry logger, which log4j2 routes to a per-node telemetry file with an epoch-millis prefix (%d{UNIX_MILLIS}, see log4j2.xml). So the event's time is the line prefix — methods here never stamp their own. The line body is EVENT key=value key=value … with no spaces inside values, which the harness parses by splitting on whitespace then on =.

What the harness derives from these events:

  • reliabilityDELIVER count per op across nodes ÷ live nodes;
  • latency — a node's DELIVER prefix-time minus the op's BROADCAST prefix-time;
  • convergence — all live nodes' final DIGEST hash agree;
  • overlay healthDIGEST view/peers stay within HyParView's active-view bound; NEIGHBOR_* churn; peers gives a time-aligned active-view set for symmetry;
  • gossip vs. repairSYNC_MERGE applied counts ops a node obtained from a snapshot rather than gossip DELIVER, so coverage can be split into the eager-push share and the snapshot-reconciliation share;
  • start coordinationPAINT_START trigger is control (the experiment script wrote RUN once the whole system had settled) or timer (legacy start-delay); view/sinceBootMs let the analyzer confirm the overlay was formed when broadcasting began. WORKLOAD_STOP marks the end of painting.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Telemetry(String nodeId)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    broadcast(UUID opId, int x, int y, int argb)
    Emitted by the origin node when it issues a paint op.
    void
    deliver(UUID opId, String originId)
    Emitted by every node (including the origin) when an op is delivered locally.
    void
    digest(long tick, long hash, int paintedCells, int activeView, long delivered, String peers)
    Periodic convergence digest of the local canvas.
    void
    neighborDown(String peer, int activeView)
     
    void
    neighborUp(String peer, int activeView)
     
    void
    paintStart(int activeView, long sinceBootMs, String trigger)
    The local node began its paint workload.
    void
    start(int width, int height, String resolution, int fanout, boolean antiEntropy)
    Once at startup: records this node's identity and the run's key parameters.
    void
    syncMerge(String from, int ops, int applied, int activeView)
    This node merged a snapshot reply from from: ops ops received, applied of them won LWW (state this node obtained by reconciliation rather than gossip — invisible to the delivered counter and DELIVER lines).
    void
    This node asked peer for a canvas snapshot (point-to-point, once it has a neighbour).
    void
    syncServe(String to, int ops)
    This node served its canvas snapshot (ops winning ops) to to.
    void
    workloadStop(long paintedMs)
    The local node stopped generating paint ops — on the script's STOP (or the in-node duration safety-cap), before the drain window.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Telemetry

      public Telemetry(String nodeId)
  • Method Details

    • start

      public void start(int width, int height, String resolution, int fanout, boolean antiEntropy)
      Once at startup: records this node's identity and the run's key parameters.
    • broadcast

      public void broadcast(UUID opId, int x, int y, int argb)
      Emitted by the origin node when it issues a paint op.
    • deliver

      public void deliver(UUID opId, String originId)
      Emitted by every node (including the origin) when an op is delivered locally.
    • digest

      public void digest(long tick, long hash, int paintedCells, int activeView, long delivered, String peers)
      Periodic convergence digest of the local canvas. delivered is this node's in-process count of distinct ops delivered via gossip — a robust coverage signal the analyzer cross-checks against the (higher-volume, loss-prone) DELIVER lines. peers is the active-view set (ip:port joined by ;, empty when the view is empty): a time-stamped membership snapshot from which the analyzer reconstructs active-view symmetry at a common instant, robust to churn.
    • neighborUp

      public void neighborUp(String peer, int activeView)
    • neighborDown

      public void neighborDown(String peer, int activeView)
    • paintStart

      public void paintStart(int activeView, long sinceBootMs, String trigger)
      The local node began its paint workload. trigger is control (the experiment script's coordinated RUN, after the whole system settled) or timer (legacy/demo start-delay). view at start lets the analyzer check that the overlay was actually formed when broadcasting began.
    • workloadStop

      public void workloadStop(long paintedMs)
      The local node stopped generating paint ops — on the script's STOP (or the in-node duration safety-cap), before the drain window. Deliveries keep flowing afterwards.
    • syncRequest

      public void syncRequest(String peer)
      This node asked peer for a canvas snapshot (point-to-point, once it has a neighbour).
    • syncServe

      public void syncServe(String to, int ops)
      This node served its canvas snapshot (ops winning ops) to to.
    • syncMerge

      public void syncMerge(String from, int ops, int applied, int activeView)
      This node merged a snapshot reply from from: ops ops received, applied of them won LWW (state this node obtained by reconciliation rather than gossip — invisible to the delivered counter and DELIVER lines).