tags:

views:

47

answers:

2

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 i.e 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.

+1  A: 

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.

Glenn Condron
I assume i will have to install my web service on the same machine as the place where my ASP.NET site is hosted (i don't have to but why make things complex?!)The web service would be the core of my program right? I want to be able to tell the web service what to do i.e. tell it what to track etc and i want to be able to do this from the ASP.NET site.
Guesty
If you wanted to send commands to the windows service from the website then you probably want to look at using WCF. You can host a WCF service in a windows service. The windows service has threads doing the processing of video, and the WCF service can accept commands.
Glenn Condron
Alternatively you can just have the windows service communicate with the same database as the asp.net site. So the site sets fields in the database that the service picks up. So have fields in the database that tell the service what to track and have that data be displayed and editable in the website. The windows service can then look at the same field to determine what it should be doing.
Glenn Condron
A windows service is not the same as a web service too, in case that is what you are thinking :).
Glenn Condron
+1  A: 

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).

akmad