Experiment: move SSE data to HistoryStep

Created on 8 September 2025, 23 days ago

Is it possible to move the data stored in the tempstore to HistoryStep and Instance?

class HistoryStep {

  /**
   * Construct an history step.
   *
   ....
   * @param ?string $session
   *   A PHP session ID, used for SSE.
   */
  public function __construct(
    #[Assert\Type('list')]
    // Writable because of Instance::postCreate().
    public array $data,
    public readonly int $hash,
    public readonly null|FormattableMarkup|string $log,
    #[Assert\Positive]
    public readonly int $time,
    #[Assert\PositiveOrZero]
    public readonly ?int $user,
    public readonly ?string $session,
  ) {}

}

It will grandly simplify the implementation, with a single source of truth and the removal of

 ApiControllerBase::saveSseData()

but we need to calculate the additional processing cost because we will load an entity and flush some cache every second or so.

📌 Task
Status

Active

Version

1.0

Component

State Manager

Created by

🇫🇷France pdureau Paris

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024