简体   繁体   中英

ASP.NET and C# constant processing behind the site possible?

Imagine a site where the user logs in and can view their ip webcam (I can do this bit i believe). The problem is i want the site to do some processing on the images/video coming in even when the user is not logged in ie run some motion detection algorithm and if there is motion log the incident in a database.

What would i need to learn about to implement this project? I want to use ASP.NET and C# so i assume:

  1. Learn ASP.NET.
  2. Learn C# (I'm a pretty competent desktop application developer).
  3. mySQL database (Is this the best kind of database to use in this situation?).

I've not used ASP.NET before hence i have no idea what it can/can't do. I think i can get an ASP.NET site up and displaying a live feed but how do i implement the bit that is always running in the background processing stills from the live feed and logging the incidents?

Any help is appreciated. Thanks in advance.

You probably want to use something like a Windows Service to do the continuous processing. With the ASP.NET site talking to the database and displaying the feed.

ASP.NET is not really suited to doing background tasks.

MySQL should work fine and is free, so if this is not a work related task then it might be a good choice. I have a MySQL database here that contains close to 100GB of text. So it should handle what you are suggesting.

The the web site and database you're on the right track, ASP.Net and MySql will work just fine for the type of project you are describing. However, the processing bit doesn't fit very well into the ASP.net model.

I would recommend that you think about creating a Windows Service to do whatever processing you need to do. It sounds like you want your processor to work on remote video streams so you'll need to consider how you'll get those live streams to you service and how many concurrent streams you could realistically process.

Perhaps it may make sense to have a client application or service that your users would run locally which would ping your hosted service when it detected a movement? In that case you'll likely want to look at hosting a WCF service which can be done in IIS or any standalone application (such as the aforementioned Windows Service).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM