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

The Archive Base Latest Questions

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

I have a program that has a ton of sensors producing data at a

  • 0

I have a program that has a ton of sensors producing data at a fairly high rate, and consumers that need to consume it. The consumers consume at very different rates.

Since I am using IObserver/IObservable, the trivial solution was to simply create a Task for each event and wrap the OnNext() call and the data in a lamda. This worked very well, I was surprised how little overhead there was over raw calls.

The problem is that some of these consumers need the order of events strictly enforced, and cannot miss any events. “PerferFairness” isn’t good enough.

The best solution I have come up with is instead of wrapping the event/OnNext() pair, to wrap an Insert into a ParallelQueue, one queue per consumer, and have a thread on the other end of the Queue to make the OnNext() calls.

Three immediate problems with this approach. It’s much, much slower than the Task/OnNext() wrapping solution. There is no Blocking Dequeue (or is there?) for ParallelQueue so the implementation is a bit tricky. The third is that this seems such a common problem that I can’t imagine there isn’t some way to enforce order that I missed, maybe something like multiple task factories sharing an underlying pool, each Factory with some setting that makes them strictly enforce order.

Anyone know the proper way to achieve what I’m trying to do?

EDIT : Any solution that involves a thread per consumer or producer doesn’t work. Producers/Consumers form long chains, there are hundreds of each.

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

    The TPL DataFlow library might be a good fit for your application. It extends TPL with a dataflow paradigm that allows you to configure a processing graph and run in a high-performance execution environment.

    TPL Dataflow is available as a library on top of .NET 4 and should ship as part of .NET 4.5.

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

Sidebar

Related Questions

I have program that has a variable that should never change. However, somehow, it
This is my problem. I have a program that has to run in a
I have a PHP program that has been written keeping in mind a single
I have a program in Octave that has a loop - running a function
I have a program that (amongst other things) has a command line interface that
Is tight looping in a program bad? I have an application that has two
I have a C program which has a function call that is defined in
I have an application that seems to throw exceptions only after the program has
I have a program that has this code : #include<stdio.h> main(){ int input; char
I have a program that has items with 3 attributes. Name(String) : Count(String) :

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.