Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Forums notification service [modified]

Forums notification service [modified]

Scheduled Pinned Locked Moved ASP.NET
sysadmindiscussion
6 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Muhammad Gouda
    wrote on last edited by
    #1

    - 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 - This SearchAgent 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 all SearchAgents and if any returned new results, the service will notify the owner of that SearchAgent If I missed something, please correct me before I start. Thanks

    foreach(Minute m in MyLife) myExperience++;

    modified on Sunday, November 30, 2008 7:03 AM

    W 1 Reply Last reply
    0
    • M Muhammad Gouda

      - 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 - This SearchAgent 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 all SearchAgents and if any returned new results, the service will notify the owner of that SearchAgent If I missed something, please correct me before I start. Thanks

      foreach(Minute m in MyLife) myExperience++;

      modified on Sunday, November 30, 2008 7:03 AM

      W Offline
      W Offline
      Wendelius
      wrote on last edited by
      #2

      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[^]

      M 1 Reply Last reply
      0
      • W Wendelius

        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[^]

        M Offline
        M Offline
        Muhammad Gouda
        wrote on last edited by
        #3

        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++;

        W 1 Reply Last reply
        0
        • M Muhammad Gouda

          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++;

          W Offline
          W Offline
          Wendelius
          wrote on last edited by
          #4

          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[^]

          M 1 Reply Last reply
          0
          • W Wendelius

            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[^]

            M Offline
            M Offline
            Muhammad Gouda
            wrote on last edited by
            #5

            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++;

            W 1 Reply Last reply
            0
            • M Muhammad Gouda

              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++;

              W Offline
              W Offline
              Wendelius
              wrote on last edited by
              #6

              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[^]

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups