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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:42:42+00:00 2026-06-13T09:42:42+00:00

Maybe this can be done without StreamInsight, but I’m curious. I have an application

  • 0

Maybe this can be done without StreamInsight, but I’m curious.

I have an application that is populating a table with “messages” (inserts a row in the table).

I want to create a monitoring application that monitors this table for the rate at which messages are “arriving”, and how quickly they are “processed” (flag gets updated).

As this is a vendors application, I don’t want to drop in a trigger or anything. But I can query the db and the table has a PK using an identity column.

How can I get to a hopping window query? I would love to show a line graph for the say the past 30 minutes showing the rate of messages coming in, and the rate at which the messages are process.ed.

  • 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-13T09:42:43+00:00Added an answer on June 13, 2026 at 9:42 am

    Depending on what information is captured in this table of messages, I think you could probably do this faster by just running a SQL query.

    If you are still wanting to use StreamInsight to do this, here’s some code to get you started.

    var app = Application;
    var interval = TimeSpan.FromSeconds(1);
    var windowSize = TimeSpan.FromSeconds(10);
    var hopSize = TimeSpan.FromSeconds(1);
    
    /* Replace the Observable.Interval with your logic to poll the database and
       convert the messages to instances of TPayload. It just needs to be a class
       that implements the IObservable<TPayload> interface. */
    var observable = app.DefineObservable(()=> Observable.Interval(interval));
    
    // Convert the observable to a point streamable.
    var streamable = observable.ToPointStreamable(
                e=> PointEvent.CreateInsert(DateTimeOffset.Now, e),
                AdvanceTimeSettings.IncreasingStartTime);
    
    /* Using the streamable from the step before, write your actual LINQ queries
       to do the analytics you want. */
    var query = from win in streamable.HoppingWindow(windowSize, hopSize)
            select new Payload{
                Timestamp = DateTime.UtcNow,
                Value = win.Count()
            };
    
    /* Create a sink to output your events (WCF, etc). It just needs to be a
       class that implements the IObserver<TPayload> interface. The
       implementation is highly dependent on your needs. */
    var observer = app.DefineObserver(()=> Observer.Create<Payload>(e => e.Dump()));
    
    query.Bind(observer).Run();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There maybe some simlar questions to this but I can't see anything that really
Maybe this cannot be done, but please help or suggest how this can be
Maybe this is a poor question, but, I can't find a tutorial or even
Maybe it's because of the dark outside, but I can't get this Position geom_text
I've searched around but I can't find any information about this; maybe I'm not
Maybe I am just falling asleep (or not!), but how can you do this:
all. Maybe i've not googled enough, but i can't find any example on this
I have this action script code that is working perfectly but i am try
I'm not sure if this can be done in javascript without any server. Basically,
Can I use default arguments in a constructor like this maybe Soldier(int entyID, int

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.