We have a pretty big asp.net mvc site that has a lot going on. Pretty much CRUD , UI , some calendars and scheduling stuff on the UI side.
When a student schedule is published in our internal site, we need to communicate with external systems (APIs). We need to trigger these calls based on a value in a table for that particular record. My question is we have a couple of ways to do this :
I believe the best optimized way for this to do is an async process. To achieve this we can:
1) write an async controller that calls one of these services depending on the database value
2) windows service that runs on our server and checks the database records that need to be updated to the external systems.
My question is - which one to choose among the two options? If I go with 2) how can I trigger my windows service depending on the record value. I do not want to keep pinging our production database as this will be creating performance issues once we scale.
Any thoughts or insights would be appreciated?