We have a web application consisting of a three-layer rear end (Controller / Biz / Data) with a user interface. Our data layer is fully responsible for extracting data from the database instance (SQL), the business layer transfers data and creates derived properties, the controller is responsible for sending these changes to the user interface.
We need to have real-time updates in our application that MUST be tracked at the database level (and not at the controller level).
We decided to use SQL Dependency and SignalR as our solution.
Everything I’ve explored about SignalR and SQL Dependency is at the database level, where SQL Dependency will detect the change and broadcast, all within the data layer. For obvious reasons, this methodology will dispense with derivative properties created at the business level and give us another promising object.
The only solution I can come up with is to use SQL Dependency to track changes, dump them into some table / object, and then use a poll to retrieve data from the controller, level layer, data layer and back up.
- Question # 1: Is there a better solution?
- Question # 2: What is the best solution that includes business-level logic, but can you still track changes at the data level?
- Question No. 3: Is this possible without a survey?
source share