Remove lifecycle operations from the TickerService API #82

Open
opened 2026-09-03 19:58:54 +02:00 by minimons · 0 comments
Owner

Background

TickerService currently exposes start() and stop() to ordinary service consumers.

This conflicts with the current Nenjim architecture:

  • A service interface exposes only its domain API.
  • An active service implementation separately implements NenjimProcess.
  • NenjimProcess currently supports only start().
  • Common stop and restart lifecycle are not yet supported.

TickerServiceImpl already implements both TickerService and NenjimProcess, so exposing lifecycle through TickerService is unnecessary and leaks Hub-owned functionality to clients.

The canonical assetaz-ticker-service OpenSpec also retains outdated wording stating that TickerService exposes lifecycle operations.

Required changes

  • Remove start() and stop() from TickerService.
  • Keep TickerServiceImpl.start() as its implementation of NenjimProcess.start().
  • Remove the public normal stop() operation from TickerServiceImpl.
  • Preserve internal cleanup of already-started PriceSource instances when Ticker startup fails.
  • Do not change PriceSource.start(PriceSink) or PriceSource.stop().
  • Keep existing latest-price behavior and Hub startup wiring unchanged.
  • Create the corresponding OpenSpec change.
  • Update the canonical Ticker specification, relevant JavaDoc and documentation so ordinary TickerService consumers receive no lifecycle API.

Out of scope

  • Adding stop() to NenjimProcess.
  • Hub shutdown, restart or process-control support.
  • Changing the PriceSource lifecycle.
  • Similar cleanup of other service interfaces.
  • New automated tests.

Acceptance criteria

  • TickerService exposes no start() or stop() operation.
  • TickerServiceImpl remains both a TickerService and a NenjimProcess.
  • NenjimHub continues to start the Ticker through NenjimProcess.
  • TickerServiceImpl exposes no general stop operation.
  • Failed startup still stops any sources started during that attempt.
  • OpenSpec and documentation consistently describe lifecycle as Hub-owned rather than part of the Ticker client API.
  • The project compiles and the OpenSpec change validates successfully.
## Background `TickerService` currently exposes `start()` and `stop()` to ordinary service consumers. This conflicts with the current Nenjim architecture: * A service interface exposes only its domain API. * An active service implementation separately implements `NenjimProcess`. * `NenjimProcess` currently supports only `start()`. * Common stop and restart lifecycle are not yet supported. `TickerServiceImpl` already implements both `TickerService` and `NenjimProcess`, so exposing lifecycle through `TickerService` is unnecessary and leaks Hub-owned functionality to clients. The canonical `assetaz-ticker-service` OpenSpec also retains outdated wording stating that `TickerService` exposes lifecycle operations. ## Required changes * Remove `start()` and `stop()` from `TickerService`. * Keep `TickerServiceImpl.start()` as its implementation of `NenjimProcess.start()`. * Remove the public normal `stop()` operation from `TickerServiceImpl`. * Preserve internal cleanup of already-started `PriceSource` instances when Ticker startup fails. * Do not change `PriceSource.start(PriceSink)` or `PriceSource.stop()`. * Keep existing latest-price behavior and Hub startup wiring unchanged. * Create the corresponding OpenSpec change. * Update the canonical Ticker specification, relevant JavaDoc and documentation so ordinary `TickerService` consumers receive no lifecycle API. ## Out of scope * Adding `stop()` to `NenjimProcess`. * Hub shutdown, restart or process-control support. * Changing the `PriceSource` lifecycle. * Similar cleanup of other service interfaces. * New automated tests. ## Acceptance criteria * `TickerService` exposes no `start()` or `stop()` operation. * `TickerServiceImpl` remains both a `TickerService` and a `NenjimProcess`. * NenjimHub continues to start the Ticker through `NenjimProcess`. * `TickerServiceImpl` exposes no general stop operation. * Failed startup still stops any sources started during that attempt. * OpenSpec and documentation consistently describe lifecycle as Hub-owned rather than part of the Ticker client API. * The project compiles and the OpenSpec change validates successfully.
minimons added the bug label 2026-09-03 19:58:54 +02:00
minimons self-assigned this 2026-09-03 19:58:54 +02:00
minimons added this to the AssetAZ project 2026-09-03 19:58:54 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: r35157/com_r35157_nenjim-hubd-impl_ref#82