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

  • SEARCH
  • Home
  • 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 6966347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:10:48+00:00 2026-05-27T16:10:48+00:00

The wording of the question doesn’t necessarily do the issue justice… I’ve got a

  • 0

The wording of the question doesn’t necessarily do the issue justice…

  • I’ve got a client UI sitting on a local box with and a background windows service to support it while it performs background functions.
  • The client UI is just the presentation layer and the windows service does all the hard hitting action… so there needs to be communication between the two of them. After spending a while on google and reading best practices, I decided to make the service layer using WCF and named pipes.
  • The client UI is the WCF client and the windows service acts as the WCF host (hosting locally only) to support the client.

So this works fine, as it should. The client UI can pass data to the WCF host. But my question is, how do I make that data useful? I’ve got a couple engines running on the windows service/WCF host but the WCF host is completely unaware of the existence of any background engines. I need the client’s communications requests to be able to interact with those engines.

Does anybody have any idea of a good design pattern or methodology on how to approach facilitating communication between a WCF host and running threads?

  • 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-27T16:10:49+00:00Added an answer on May 27, 2026 at 4:10 pm

    I think that your best bet is to have some static properties or methods that can be used to interchange data between the service threads/processes and the WCF service.

    Alternatively, the way that we approach this is through the use of a database where the client or wcf service queues up requests for the service to respond to and the service, when it is available, updates the database with the responses to those requests. The client then polls the database (through WCF) on a regular basis to retrieve the results of any outstanding requests.

    For example, if the client needs a report generated, we fire off a request through WCF and WCF creates a report generation request in the database.

    The service responsible for generating reports regularly polls this table and, when it finds a new entry, it spins off a new thread/process that generates the report.

    When the report has completed (either successfully or in failure), the service updates the database table with the result.

    Meanwhile, the client asks the WCF service on a regular basis if any of the submitted reports have completed yet. The WCF service in turn polls the table for any requests that have been completed, but not been delivered to the client yet, gathers the information from them, and returns them to the client.

    This mechanism allows us to do a couple of things:

    1) We can scale the number of services processing these requests across multiple physical/virtual machines as the workload increases.

    2) A given service can support numerous clients.

    3) Through the WCF interface, we can extend this support to any client platform that we choose to support (web, win, tablet, phone, etc).

    Forgot to mention:

    Just because we elect to use a database doesn’t mean that you have to in order to implement this pattern. You can easily implement the same functionality by creating a static request collection that the WCF service and worker service access in much the same way that we use the database.

    You will just need to be very careful about properly obtaining and releasing locks on the static properties to avoid cross-thread collisions or deadlocks.

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

Sidebar

Related Questions

Referring to question Spring Autowiring stopped working on GAE I ask: why doesn't AppEngine
Sorry about the wording of the question, I don't really know how to put
Sorry about the wording for my question title. I have a basic HTML anchor
UPDATE: I've changed the wording of the question. Previously it was a yes/no question
I'm sure this was asked somewhere in another question, but the wording used there
I got question about log4net is it working on IIS 7,5? I read lot
This question is based on my previous question which I got a working answer
Related question: CreateProcess doesn't pass command line arguments . Is there a difference between
I'm not even sure how to begin wording this question, but basically, I have
I've posted a question yesterday but I just realized that the answer doesn't seem

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.