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 8069403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T13:00:31+00:00 2026-06-05T13:00:31+00:00

I have 2 programs A, B. If A finishes, I want B to know

  • 0

I have 2 programs A, B. If A finishes, I want B to know that and start to run, using data from result of A.

A is a .NET web application. I think that’s not kept alive in memory all the time, right? Only alive if requested from browsers, right?

Before, A and B are the 2 functions of the same program. But B program fails sometimes due to business reasons. And even if B doesn’t fail, it’s time-consuming and makes the clients wait for too long and be unhappy. So I separated B out. Clients using A smoothly and are happy. B do staff in background.

My current design is: when A finishes, A saves the data into database. B is a windows service. It checks the database every 5 minutes and start to run if finds new jobs. A, B doesn’t know each other.

The boss asked why idle for 5 minutes? I answered because that’s the simplest way of implement some of our business. I didn’t design much.

So I went to read materials, and found that the Observer Pattern seemed like what I want. After several readings, I think the Observer Pattern can only be applied to classes in the same program, and the classes and objects are in memories.

I’m not sure if my question is: Can the GOF Design Patterns be applied to different programs?

or: How does something like RabbitMQ implements this real-time-processing kind of requirements?

I cannot imagine to set check interval of 5 minutes to a really small time period. That’s a lot of burden to cpu.

EDIT: I have come into this explanation about Observer and Publish/Subscribe, which I think is useful to those seeing this thread from search.

http://addyosmani.com/resources/essentialjsdesignpatterns/book/#observerpatternjavascript

Differences Between The Observer And Publish/Subscribe Pattern

The Observer pattern requires that the observer (or object) wishing to receive topic notifications must subscribe this interest to the object firing the event (the subject).

The Publish/Subscribe pattern however uses a topic/event channel which sits between the objects wishing to receive notifications (subscribers) and the object firing the event (the publisher). This event system allows code to define application specific events which can pass custom arguments containing values needed by the subscriber. The idea here is to avoid dependencies between the subscriber and publisher.

This differs from the Observer pattern as it allows any subscriber implementing an appropriate event handler to register for and receive topic notifications broadcast by the publisher.`

  • 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-06-05T13:00:32+00:00Added an answer on June 5, 2026 at 1:00 pm

    You’re right that the Observer Pattern is more for designing OO classes. One pattern that can work between programs is the publish-subscribe model, and I think that would be a good fit for what you describe. Process B subscribes to certain events that are triggered by A. This is typically mediated by a service architecture; eg, process A and B are web applications (or WCF/MVC/Web API), and there’s a third application that mediates the publish-subscribe pattern. So when A completes, it sends an event to the pub-sub service; and the pub-sub service sends out a notification to all subscribers to that event (in your case, application B).

    You can implement this pattern yourself; there are also .NET frameworks such as NServiceBus that implement it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have several programs I want to uninstall from my computer (Windows 7 64bit).
I'm going to have two independent programs (using SqlAlchemy / ORM / Declarative) that
I have a piece of C++ code that generates the data. I want to
In an application that I'm writing I have to load a lot of data
Okey. Here's what I want to do: I have a windows application that sorts
I have two programs, Writer and Reader. I have a FIFO from Writer to
I have two begininer programs, both using the 'while' function, one works correctly, and
I have inherited a few programs from a previous developer who was a little
We have a suite of programs that check for new versions at startup, and
I have a design question. I want some feedback to know if a ThreadPool

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.