0
votes

Which layer I should add scheduler project in domain driven design architecture?

I am thinking of adding scheduler in Distributed service layer and business login inside application services layer.

Here is the solution design I am thinking of:

  • Presentation Layer

    • UI project
  • Distribute Service Layer

    • Application API
    • Scheduler
  • Application Layer

    • Application (Application services for Application API and Scheduler logic)
    • DTO
  • Domain Entity Model

    • Project Domain (Domain entities specific to project)
    • Scheduler Domain (Domain entities specific to scheduler)
  • Data Persistence

    • Data Access Project (Repositories)
    • Data Access Scheduler Domain (Repositories)
  • Cross Cutting Infra.

    • Authorization
    • Logging

Any help is appreciated.

1
I saw your post I had the simlar kind of requirement why are you creating a seperate domain project for scheduler? - Vipin

1 Answers

1
votes

Since now I've implemented this kind of component in the Presentation layer, on the same level as the UI. These components are awaken by cronjobs at regular times then they call Application services in order to send commands to the Aggregates. Then, the Aggregates, if necessary and allowed, perform the changes to the system state.