feature(simulator): Add simulator library to the project.#5
Open
arash-khajelou wants to merge 1 commit intotapsi-box:mainfrom
Open
feature(simulator): Add simulator library to the project.#5arash-khajelou wants to merge 1 commit intotapsi-box:mainfrom
arash-khajelou wants to merge 1 commit intotapsi-box:mainfrom
Conversation
f0e1c13 to
1907d72
Compare
1907d72 to
67a568b
Compare
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem Statement
What is the problem?
The delivery project needs simulator functionality to seed and clear test data during development and testing phases. Currently, similar simulator functionality exists in the scheduled-delivery project, but it is implemented as a project-specific solution that is tightly coupled to that project's infrastructure. The delivery project requires this functionality but lacks a reusable, standardized approach to implement it.
Why should we care?
Without simulator functionality in the delivery project, developers and QA engineers cannot easily:
This leads to manual data management processes, slower development cycles, and potential inconsistencies in test environments. Additionally, without a reusable library, each project that needs simulator functionality would need to implement its own solution, leading to code duplication and maintenance overhead.
Root Causes
Solution
Create a reusable simulator library in the
utilities-starterproject that provides:DataSimulatorinterface withseedData()andclearData()methodsSeedableandDeletableinterfaces that components can implement/actuator/simulator/seedand/actuator/simulator/clear) instead of gRPC endpointsThe library will be integrated into the delivery project's infrastructure layer, allowing components to implement
SeedableandDeletableinterfaces to participate in the simulator workflow. The actuator endpoints will provide a standard HTTP-based interface for triggering seed and clear operations.Boundaries
Key Questions
1. Should the library support both reactive (Mono/Flux) and blocking operations?
Answer: The library should support reactive operations (using Reactor's
Mono<Void>) to align with the existing codebase patterns in both scheduled-delivery and delivery projects. This ensures consistency and compatibility with Spring WebFlux and reactive MongoDB repositories.2. What actuator endpoint paths should be used?
Answer: The endpoints should follow Spring Boot Actuator conventions:
/actuator/simulator/seed- for seeding data/actuator/simulator/clear- for clearing dataThese endpoints should be secured and only enabled in appropriate profiles (local/dev).
3. Should the library handle repository deletion automatically or require explicit Deletable implementations?
Answer: The library requires explicit
Deletableimplementations. Developers must implement theDeletableinterface for any component that needs to participate in the clear workflow. This includes:Deletableimplementation that deletes from their repositories)The library is technology-agnostic and does not automatically discover or delete repositories. This gives developers full control over what gets deleted and how, regardless of the underlying data storage technology (MongoDB, PostgreSQL, etc.).
User Stories/Requirements
SeedableorDeletableinterfaces so that my component can participate in the simulator workflowOut of Scope