architecture check

Posted on 2012-08-16
Medium Priority
Last Modified: 2012-09-07
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?
Question by:readyset
  • 2
  • 2
LVL 14

Expert Comment

ID: 38300429
Have you looked into the MVC4 asynchronous processing technologies?


Option 1 ( non MVC 4 ) would probably be a better option.  Im not really sure as far as having a context on the number of possible transactions.
LVL 16

Expert Comment

by:Swapnil Piparia
ID: 38300674
Actually it all depends on below questions to know the frequency of trigger. I can see possible option to select as option 2 over option 1.

1. What would be the trigger point, will it be user or system? To elaborate more, student scheduling information publishing on your site is it through UI by some user on some button click / system?
2. Is scheduling happen for all the student at once or it is for individual student?

One more possible option is you can directly call wcf service apis from SQL server by setting it as SQL job which will solve your hitting database from windows service concern.



Author Comment

ID: 38300821
netswap - Thanks. I should have given these details in the first place. Its kind of both!

In our UI system, once a teacher creates a schedule, he/she publishes it. Here it is the user/ button click. Only when the schedule is published then we need to talk to these external systems.

The scheduling happens for all the students at once.

Also, once we talk to these external systems there are two options when errors occur in the first call. We want these to be handled automatically or give user an option to check the errors and then initiate the async call again by click of a button.

Please let me know your thoughts now.
LVL 16

Accepted Solution

Swapnil Piparia earned 2000 total points
ID: 38300920
Ok. Then as per my opinion we don't require any scheduling kind of mechanism means sql job / windows service because as per scenario you have explained it is initiated by the user(teacher) and with less frequency as it is created for bunch of student at once.

In this case, I think async call is good option which is option 1 async controller.  Handling of error need to be extra implementation which you need to implement inside async controller action or return user an view / popup with option to ask for correct actions.

LVL 14

Expert Comment

ID: 38300969
Agreed... Netswap thanks for posing these questions.  I should have asked them as well, shame on me.

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question