Database Background Processing

As part of a large web application project there was a need to perform database updates as other data changed but doing so using typical database triggers was too costly on database performance. The solution included using SQL Service Broker to offload the data updates into the background, which allowed the database to remain responsive and the data modification queries to return immediately without having to wait for the background updates to complete.

A web UI was created to monitor the messages, tasks and data related to the background processes. This monitoring was accomplished by creating a Web API that was called directly by the SQL Service Broker tasks and a Signal R hub that dispatched the progress updates out to the monitor web application so admins could see the operations in real time.

  • Date: 2019
  • Tags: SQL, Database Design, SQL Service Broker, Web API