none
Installing Windows Service on load balanced servers RRS feed

  • Question

  • I need to create a Windows service that will monitor an Oracle database and report the status to a file/ Event viewer on a peiodic basis. The database server and the windows service are on different servers. 

    Is it possible to install/ configure the windows service on two load balanced servers and report the status only once. Is it a good design as well or not?

    Thanks
    Ashok Bohra
    Wednesday, September 30, 2009 6:30 AM

All replies

  • Yeah, nothing wrong with that, so long as you're not making any assumption with state information that exists on one machine, and is not available on the other.

    The database will point to either a single instance, or a cluster address, so that will be fine.

    You obviously need to take care of the calls being thread safe - for example you could cause locking with one service if both detect a change in the monitored files, and act upon it, one service will get the lock, the other will get blocked.

    Please tell me a little more about the file / event viewer?  How would this work?  Is it simply reading the database, and presenting the file or event viewer with the data?  If that is the case, the only issue you may face is dirty reads, but that could also occur with a sinlge service, so you should have designed for that eventuality?

    Hope that helps,

    Martin.
    MCSD, MCTS, MCPD. Please mark my post as helpful if you find the information good! http://www.consultantvault.com
    Wednesday, September 30, 2009 7:52 AM
  • Thanks A lot.

    It is simple reading database and presenting the same to event viewer. The presentation of data happens based on the fullfillement of a certain condition. This condition will not occur normally but is an exception case. The windows services will be reading the database on a periodic basis to check whether the condition has occured or not. When the data is presented a notification is generated and this should happen only once for a set of data. We do not want to generate multiple notification for the same duration or same set of data. 

    In other words can we check whether the other service has already presented the data in the event viewer or not. 

    Thanks
    Ashok Bohra
    Wednesday, September 30, 2009 9:23 AM