Asp.Net - Upload Handling for an External Application

I have an asp.net website that processes requests using a third-party exe. Currently my workflow

  • The user accesses the website using any browser and fills out a task form.

  • A website calls a self-service WCW service that listens on a port

  • Windows service starts a third-party exe to process the job and returns the result to the website

  • The website displays the returned result to the user.

This website was a prototype that now needs to be converted to production. I understand that the above architecture has many points that can break. For example, if the computer is turned off or if the Windows service crashes and no longer listens on the port, all current requests will stop processing. To make the architecture more reliable, I consider the following

  • The user accesses the website using any browser and fills out a task form.

  • Website writes job data to database

  • A Windows service that polls the database for a new job every 10 seconds, picks up the job, and runs it using a third-party application. The results are written to the database.

  • The website that has now started polling the database picks up the results and displays them to the user.

The second architecture provides me with more logging capabilities, and jobs can run again if they are in the queue. However, this is due to the large number of surveys that cannot be scalable. Can anyone recommend a better architecture?

+6
source share
2 answers

Instead of polling, I would go with MSMQ or RabbitMQ .

Thus, you can turn off the processing of multiple users (possibly individual servers from the web server) of the queue and process more requests in parallel.

0
source

I implemented the same architecture in one of my applications where users process multiple requests. Therefore, I have -

  • Users went to the site and select options, etc. Send request
  • The request is stored in the database table with all the details + username, etc.
  • The service scans the database table and takes the request in FIFO mode.
  • After processing the request, the status is updated as Failed or Completed in the database table for requestId, which can be seen by users on the website
  • The service selects the next request, if there is one, otherwise it stops.
  • Service runs every 30 minutes.
0
source

All Articles