Where does SignalR belong in a DDD architecture?

Viewed 2041

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:

  1. The SignalR hub belongs to the Presentation layer. Given that my presentation project is purely client-side (Angular), I would add a new project under Presentation just for the hub.
  2. The background service that checks the database on an interval seems appropriate for the Application layer. I would inject an INotify interface with a Notify method, which I would implement with SignalR.

Is this along the DDD principles?

1 Answers
Related