Forums notification service [modified]
-
- I am building a discussion forums website similar to CP forums - I have a search page where the user can save its criteria in something named
SearchAgent
- ThisSearchAgent
fires itself periodically and if it found new results it shall notify its owner My idea is: - I will create a windows service on the server side - On that service I will create an event handler for the clock tick - Each period of time X, I will fire allSearchAgents
and if any returned new results, the service will notify the owner of thatSearchAgent
If I missed something, please correct me before I start. Thanksforeach(Minute m in MyLife) myExperience++;
modified on Sunday, November 30, 2008 7:03 AM
-
- I am building a discussion forums website similar to CP forums - I have a search page where the user can save its criteria in something named
SearchAgent
- ThisSearchAgent
fires itself periodically and if it found new results it shall notify its owner My idea is: - I will create a windows service on the server side - On that service I will create an event handler for the clock tick - Each period of time X, I will fire allSearchAgents
and if any returned new results, the service will notify the owner of thatSearchAgent
If I missed something, please correct me before I start. Thanksforeach(Minute m in MyLife) myExperience++;
modified on Sunday, November 30, 2008 7:03 AM
I don't know why would you need a timer. Since you are storing the messages to a database, you obviously have code which handles the replies. Can't you simple add email sending to this part of your application (when a reply is stored). Depending on your solution, you can send the message from .Net code or from database when a row is added.
The need to optimize rises from a bad design.My articles[^]
-
I don't know why would you need a timer. Since you are storing the messages to a database, you obviously have code which handles the replies. Can't you simple add email sending to this part of your application (when a reply is stored). Depending on your solution, you can send the message from .Net code or from database when a row is added.
The need to optimize rises from a bad design.My articles[^]
You are right I just tried to simplify me request, but the actual situation is as follows: - I have a search page which allows the user to save the search criteria in something called SearchAgent. - The user can enable that SearchAgent to fire itself and notify him if there is new messages in the result. - The service I try to create is to fire that SearchAgent and send the notification.
foreach(Minute m in MyLife) myExperience++;
-
You are right I just tried to simplify me request, but the actual situation is as follows: - I have a search page which allows the user to save the search criteria in something called SearchAgent. - The user can enable that SearchAgent to fire itself and notify him if there is new messages in the result. - The service I try to create is to fire that SearchAgent and send the notification.
foreach(Minute m in MyLife) myExperience++;
Okay, I see. With those requirements, I think your original concept sounds reasonable. Only thing that comes in mind is that if you create a windows service for this, the mechanism is vulnerable if the service stops for some reason. Also you may have problems if you want to use several servers to divide the load between servers. Which server has the service or if they all have it, how to prevent a situation where all services make the same queries and send emails. So basically what I'm trying to say is that if you can somehow put the search mechanism to your application logic or into the database your solution could be more scalable. For example, in database you could have a job which searches for messages to notify and writes information about them to a separate table, kind of a queue. After that your application side checks the queue and sends the emails (part of normal message processing) or the database can send them if you want (of course this is database dependent, but at least SQL Server and Oracle can handle this).
The need to optimize rises from a bad design.My articles[^]
-
Okay, I see. With those requirements, I think your original concept sounds reasonable. Only thing that comes in mind is that if you create a windows service for this, the mechanism is vulnerable if the service stops for some reason. Also you may have problems if you want to use several servers to divide the load between servers. Which server has the service or if they all have it, how to prevent a situation where all services make the same queries and send emails. So basically what I'm trying to say is that if you can somehow put the search mechanism to your application logic or into the database your solution could be more scalable. For example, in database you could have a job which searches for messages to notify and writes information about them to a separate table, kind of a queue. After that your application side checks the queue and sends the emails (part of normal message processing) or the database can send them if you want (of course this is database dependent, but at least SQL Server and Oracle can handle this).
The need to optimize rises from a bad design.My articles[^]
Thanks for cooperation
Mika Wendelius wrote:
After that your application side checks the queue and sends the emails
What you mean by application side? Remember it is a web application. the application logic runs only when a client logs in to my website. So, I think that windows service still better
foreach(Minute m in MyLife) myExperience++;
-
Thanks for cooperation
Mika Wendelius wrote:
After that your application side checks the queue and sends the emails
What you mean by application side? Remember it is a web application. the application logic runs only when a client logs in to my website. So, I think that windows service still better
foreach(Minute m in MyLife) myExperience++;
By application I meant the web server since you have two layers where to implement the logic, web server (either in the code serving the web client or in a windows service) or database.
The need to optimize rises from a bad design.My articles[^]