Skip to content
Juvix imports

module node_architecture.engines.ticker_messages;

Ticker Messages

Message interface

type TickerMsg :=
| Increment
| Count;

There are only two message tags: Increment, which increases the counter state of the ticker, and Count, which the ticker responds to with the current counter state.

Increment message

Increment

Increment

An Increment message instructs the engine to increase the counter. This message doesn't require any arguments.

Count message

Count

Count

A Count message requests the engine to send the current counter value back to the requester. This message doesn't require any arguments.

Message sequence diagrams

Ticker Interaction Diagram

This diagram represents a simple interaction between a Ticker engine instance and another entity sending increment requests and count requests.

sequenceDiagram
    participant Ticker
    participant EngineTickerClient

    EngineTickerClient ->> Ticker: Send Increment
    Note over Ticker: Counter = 1

    EngineTickerClient ->> Ticker: Send Increment
    Note over Ticker: Counter = 2

    EngineTickerClient ->> Ticker: Send Count
    Ticker ->> EngineTickerClient: Respond with Counter (2)
A client interacts with the Ticker engine, which increments and responds with the counter value.