I am currently creating an ASP.NET MVC web application in C #.
I want to make sure that this application is built so that it can scale in the future without the need for serious re-factoring.
I am very interested in using some kind of queue to publish any entries in my database and have a process that asynchronously polls this queue for the update. After this data has been sent back to the database, the client must then be updated with new information. An example here is that the process of writing data back to the database can take a short time based on business rules that are executed on the server.
My question is what would be the best way to handle updating from a client \ browser perspective.
I am thinking about sending data back to the server and adding it to the queue and immediately sending a response to the client, and then polling at some frequency to get the updated data. Any best practices or patterns in this case would be appreciated.
Also, in terms of reading data from a database, would you suggest using any specific methods or you could read directly from db enough, given my scenario.
Update I thought I would post an update about this, as it had been a while. We have actually finished using Windows Azure, but the solution is applicable to other platforms.
What we have finished is using the Windows Azure queue to send messages / commands. This is a very fast process and returns immediately. Then we have a working role that processes these messages in another thread. This allows us to minimize any db records / updates to web roles in theory, allowing us to scale more easily.
We process informing the user by email or even quietly depending on the type of data we are dealing with.
gsobocinski
source share