Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3314344
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:13:18+00:00 2026-05-17T22:13:18+00:00

Hey I have the following situation: a WinService which is processing some stuff from

  • 0

Hey
I have the following situation: a WinService which is processing some stuff from a queue, writing to other tables (during processing) and after it finishes it deletes the entry and moves to the next one.

I would need a mechanism to determine if the instance is alive and going and if not to start or wake up a second instance.

What I’ve thought so far is to have two instances going on where each tries to pick up stuff from the queue and process it (tries- as in see if it can- like no keepAliveFlag is set or lastUpdateDate of a record is too long ago). There could be the situation when they process the same record- this is the disadvantage.

For this above proposed solution, I would also need a sort of mechanism in the case when an instance tries to write a keepAliveFlag and does not succeed to stop.

Aside from this solution, there is also the solution for the instance to constantly write stuff into db and the second instance to check if new stuff is written and if not wake up or launch the second instance. But several problems may appear: what happens if the former master wakes up? And in general this second scenario seems harder to implement correctly.

Now the question: what would be the correct pattern to implement this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T22:13:18+00:00Added an answer on May 17, 2026 at 10:13 pm

    What one of my teams does at the moment is this:

    • On each machine, install an instance of a monitor (itself a Windows service).
    • This monitor reads (from a central database) the list of local services that it should monitor.
    • It also reads the working/non-working hours for each local service that it’s monitoring.
    • Then it monitors each service for regular heartbeats (and other status messages).
    • If a local service has not started during its working hours, the monitor starts it.
    • If a local service is running but not heartbeating, the monitor restarts it.
    • The monitor logs in the database the state of each service and sends info/warning/alert messages as appropriate.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey guys. I have the following situation. I want to use a TypeDescriptor to
Hey there, I'm trying to make a site which have following: News, Products, About
Hey guys I have the following code working which is sending a GET Request
Hey right now I'm using jQuery and I have some global variables to hold
Hey, Lets say we have a query which generates list of city names as
Hey - I have the following method on my UITableView controller public void RemoveEventFromList(Event
hey I have been trying for hours and I don't understand why the following
Hey everyone, I have the following 'users' table in MySQL: CREATE TABLE `users` (
Hey Guys I have the following simple Code : WhereAmIViewController.h #import <UIKit/UIKit.h> #import <CoreLocation/CoreLocation.h>
I have the following JSON: { @id: hey there, id: hey there 2 }

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.