I'm trying to implement DDD application with layered architecture. I have:
- Infrastructure layer - a layer which implements technology specific parts of the application.
- Domain layer - a layer which contains domain model.
- Application layer - a layer which contains interferences to interact with domain model.
- And interfaces layer - a layer which receives events from the outside.
The classic 3 layer (+ infrastructure) architecture is quite clear. But my application isn't very classic. Beside UI I have scheduled task which should be ran periodically. I thought about putting such tasks into interfaces layer, because these task actually handle events like UI. But there is a problem, I can't make decision which layer I should put an scheduler which fire events for scheduled tasks.
I draw a sketch http://imgur.com/rY37b.png .
Which layer should I put the scheduler object? Or may be where is another way to design application with internal event generator.