locked
StreamInsight dynamic queries RRS feed

  • Question

  •  I am looking for information about how to create dynamic queries using the newer StreamInsight 2.1 reactive extensions model. Specifically, I would like to use the CreatQuery() method or something similar (within IQueryable) with IQStreamable. Within the workflow I am creating, this new query would be inserted into StreamInsight as a standing query. I have done quite a bit of research but have not found a solution. Also, most of the documentation appears to reference what is now a "legacy" adapter model. Any help would be appreciated.
    Thursday, July 2, 2015 5:30 PM

Answers

  • Hi!

    I was in the same "boat" as you - i.e. had the requirement to be able to inject queries dynamically in the StreamInsight engine, without recompilation etc. We did quite a lot of research, dabbled with Roslyn for dynamic compilation etc., but after a while we gave up. It might be possible, but the effort to do it is way too high (in our opinion).

    What we did in the end was to change CEP engine completely, to a product called NEsper (.NET version of Esper). It is now in production and works really well. If we now where to look at it again, we might go Azure and Stream Analytics, but that is not a given.

    Niels


    http://www.nielsberglund.com | @nielsberglund

    Friday, July 3, 2015 3:40 AM

All replies

  • Hi!

    I was in the same "boat" as you - i.e. had the requirement to be able to inject queries dynamically in the StreamInsight engine, without recompilation etc. We did quite a lot of research, dabbled with Roslyn for dynamic compilation etc., but after a while we gave up. It might be possible, but the effort to do it is way too high (in our opinion).

    What we did in the end was to change CEP engine completely, to a product called NEsper (.NET version of Esper). It is now in production and works really well. If we now where to look at it again, we might go Azure and Stream Analytics, but that is not a given.

    Niels


    http://www.nielsberglund.com | @nielsberglund

    Friday, July 3, 2015 3:40 AM
  • You would use Subjects for this. A subject allows you to publish the results of a stream as an observable that can be reused by other consumers. There are a variety of use cases for subjects; this is just one of them. Like queries in the adapter model, they can be consumed by multiple consumers. Unlike queries, they can also have multiple publishers (sources). Also, unlike queries, the producers and consumers can come and go at run time.

    DevBiker (aka J Sawyer)


    Tuesday, July 14, 2015 2:16 PM
    Moderator