I have a DDD application and I am trying to understand where SignalR fits in my layers:
1. Presentation (Angular)
2. Distributed Services (Web API)
3. Application
4. Domain
5. Data
Basically, my SignalR hub notifies clients (Angular web app) when there is new data. For which I run a background service in a background thread that checks the database on an interval and notifies clients when there is new data.
I am inclined to think in this way:
- The SignalR hub belongs to the
Presentationlayer. Given that my presentation project is purely client-side (Angular), I would add a new project under Presentation just for the hub. - The background service that checks the database on an interval seems appropriate for the
Applicationlayer. I would inject anINotifyinterface with aNotifymethod, which I would implement with SignalR.
Is this along the DDD principles?