How to simply test streamInsight installed succesfully?

Answered How to simply test streamInsight installed succesfully?

  • Friday, February 22, 2013 11:13 PM
     
     

    Hello guys.

    I just installed streamInsight 2.1 server in my local machine. And I kicked off the SI windows service running. Now how can I use client to verify this is working? Any endpoint or simple approach I can check? my instance name is "SI21"

    I use "Event flow debugger" to connect to "http://localhost/StreamInsight/SI21". It error out "access denied". Any one has good suggestions?


    Derek

All Replies

  • Monday, February 25, 2013 2:32 PM
     
     Answered Has Code

    Derek,

    Have you created a StreamInsight application and exposed the management service? You must have a StreamInsight application running that exposes an instance of the management service. You'll also need to make sure your application has the proper permissions to expose a WCF endpoint. The quick and dirty way to get this working is to run as administrator.

    // create instance of the StreamInsight server
    using (Server server = Server.Create("SI21"))
    {
        // create instance of the management service
        var host = new ServiceHost(server.CreateManagementService());
        host.AddServiceEndpoint(typeof (IManagementService),
                                new WSHttpBinding(SecurityMode.Message),
                                "http://localhost/StreamInsight/SI21");
    
        // open management service
        host.Open();
    
        // create StreamInsight application
        Application application = server.CreateApplication("MyApplication");
    
        // define a point streamable source
        IQStreamable<long> source = application.DefineObservable(() => Observable.Interval(TimeSpan.FromSeconds(1)))
                                                .ToPointStreamable(e => PointEvent.CreateInsert(DateTimeOffset.UtcNow, e),
                                                                    AdvanceTimeSettings.IncreasingStartTime);
    
        // define an observer sink
        IRemoteObserver<long> sink = application.DefineObserver(() => Observer.Create<long>(e => Console.WriteLine("OnNext - " + e),
                                                                                            ex => Console.WriteLine("Error - " + ex.Message),
                                                                                            () => Console.WriteLine("OnCompleted")));
    
        // bind the source to the sink and run the process.
        source.Bind(sink).Run("MyProcess");
    
        // wait for the user to press any key to shutdown
        Console.ReadLine();
    
        // delete the application
        application.Delete();
    
        // close the management service host
        host.Close();
    }

    • Marked As Answer by Derek Dai Monday, February 25, 2013 4:34 PM
    •  
  • Monday, February 25, 2013 4:35 PM
     
     
    Thanks, I will try this. if this is the only way to try, I would be curious why there is not an easy to verify this. Once DBA installed this, I have to provide a compiled "program" to test this out.

    Derek

  • Monday, February 25, 2013 5:48 PM
     
     
    Also, because you are added to a group with access to the StreamInsight management service, you do need to reboot before trying to connect to the management service. This is a Windows Thing(tm) ... that's how you'll get the token associated with your SID.

    DevBiker (aka J Sawyer)
    Microsoft MVP - Sql Server (StreamInsight)


    Ruminations of J.net


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