none
What is the purpose of creating Application for StreamInsight app?

    Question

  • Here is the steps I am flowwing to create a StreamInsight applicaiton:

     //connect to SI process
    _server = Microsoft.ComplexEventProcessing.Server.Create("MyStreamInsight");

     //create application inside SI process
        _application = _server.CreateApplication("SensorMonitor");

    //create stream instance using SI Adapters

    //create Query on Stream instance created above

    //Start the query, by referring to application

    Ok, one thing I could not understand is, what is the purpose of creating applicaiton:

     _application = _server.CreateApplication("SensorMonitor");

    ?

    Even if I create another applicaiton by pointing to same StereamInsight server: MyStreamInsight. Under the hoods every applicaiton runs in same StreamInsight engine. So I am wondering what is the purpose of creating Applicaiton and referrign it in the Query.

    Does this means, we can't share data between applications? please enlighten me on the purpose of the creating and using Applicaiton.


    Venkat

    mercredi 22 février 2012 13:14

Réponses

  • StreamInsight only has security around accessing the management web service - you need to be in the local StreamInsightUsers$[InstanceName] group. Outside of that, there is no built-in security model. You can provide a level of security on top of StreamInsight using a principal policy and principal permission attributes, ACLs or through code.

    DevBiker (aka J Sawyer)
    My Blog
    My Bike - Concours 14


    If I answered your question, please mark as answer.
    If my post was helpful, please mark as helpful.

    samedi 25 février 2012 18:22

Toutes les réponses

  • As I understand it, the Application serves as a container for StreamInsight applications on the same server. Let's say, for example, that you have a set of queries that analyze pump data for a single pump. But you have a case where you are analyzing multiple pumps. You can set up each pump with a different application on the same server. Even though the queries have the same names, they will still be guaranteed to be in a unique namespace because of the Application object.

    DevBiker (aka J Sawyer)
    My Blog
    My Bike - Concours 14


    If I answered your question, please mark as answer.
    If my post was helpful, please mark as helpful.

    mercredi 22 février 2012 14:06
  • Venkat,

    The purpose of the  Microsoft.ComplexEventProcessing.Application is to represent a scoping unit in the server that contains other metadata entities (i.e. queries, events, and adapters). This is discussed briefly in the StreamInsight End-to-End Example as well as in the documentation for the Application Class itself.

    I haven't tried to reference a query that resides in another application. From looking at the API, from the current application you are in, you can access the CepServer instance and it's collection of applications and then you can get to it's query collection. If you get a reference to a query in another applciation, you may very well be able to share data. When I have more time, I'll have to give it a shot.

    mercredi 22 février 2012 14:09
  • DevBiker and TXPower125,

    thank you for your reply. Yes, I think Application works just like a Namespace

    Also, there is no restriction in accessing other Application data within other Application. Because Server instance exposes all applications through collection:

    For example, I alreday have SI application (Windows applicaiton) running for Pump1 and now want to monitor Pump2.

    So I create another windows applicaiton, where I create instance of SI server as shown below:

    _server = Microsoft.ComplexEventProcessing.Server.Create("IE11LT91TZ6BSStreamInsight");

    //create application for Pump2

    _application = _server.CreateApplication("Pump2");

    //Access Pump1 application and run query on it..

    _server.Applications["Pump1"].Queries["Pump1Query"].Start()

    So there is nothing stops us from using another Application data/resources. Applicaiton is used only for Scoping.

    I hope we are on the same page. thanks


    Venkat

    jeudi 23 février 2012 07:16
  • Did you try to share data across the applications?
    jeudi 23 février 2012 14:24
  • Hi TXPower125,

    not sure whether I want to really share the data across SI "Application"s. But I think there is no restriction, becuase being in one application I can access other applications collection and can run the queries.. (i mean we can really  access all metadata of other application, being in another applicaiton)

    When I say application, I am referring to:

    _application = _server.CreateApplication("Application1");

    and offcourse this code has to run with in a process (for example Windows app or Console app)


    Venkat

    jeudi 23 février 2012 14:34
  • Venkat ... take a look at my original post. The application is a container that provides a unique namespace. It's not a separate app domain or process. Just a container. And because the application provides the namespace, you need to create it and it is required for all queries.


    DevBiker (aka J Sawyer)
    My Blog
    My Bike - Concours 14


    If I answered your question, please mark as answer.
    If my post was helpful, please mark as helpful.

    jeudi 23 février 2012 15:26
  • Thank you all for clarifying this to me.

    So if multiple SI applications (may be from different projects) uses same StreamInsight Engine, there may be chances that one application can access other application meta data like queries etc., (may be accidentally or wantedly). it is not like MSMQ, where I can't access the Queue created by another user unless I have permissions to access it.

    I am trying to identify the Security requirements/considerations for SI applications. As per my current understanding there is no security mechansims to secure SI Applications or its meta data. Do you agree with me? or my understadning is not correct?

    Thanks.


    Venkat

    vendredi 24 février 2012 04:27
  • StreamInsight only has security around accessing the management web service - you need to be in the local StreamInsightUsers$[InstanceName] group. Outside of that, there is no built-in security model. You can provide a level of security on top of StreamInsight using a principal policy and principal permission attributes, ACLs or through code.

    DevBiker (aka J Sawyer)
    My Blog
    My Bike - Concours 14


    If I answered your question, please mark as answer.
    If my post was helpful, please mark as helpful.

    samedi 25 février 2012 18:22