Respondida UDFs accessing network methods

  • miércoles, 20 de junio de 2012 7:32
     
     

    Hello,

    Is it possible to invoke in the LINQ query a UDF that accesses a network functionality and provides an aggregated result?

    E.g., for events on the stream that fulfill a filter, I'd like to call a method provided by a web service (or any other type of network service, communicating over http, etc.) and output its result in the payload. Invoked methods could be different, in some scenarios, i.e., they could depend on the current event arriving on the stream

    Thanks


Todas las respuestas

  • miércoles, 20 de junio de 2012 20:09
     
     Respondida

    Certainly, it's possible. I'm not sure that it's a good idea to make a network call in a UDF due to the latency and the potential time that it would take. Typically, you would want your UDF's to be as fast as possible to minimize their impace on the overall latency of the system.

    With UDF's you also have the make sure that you understand that you can only return 1 value, not an entire payload and that value has to be a valid StreamInsight type. If you need to create a whole new payload or return multiple values, you will probably want to look at a UDSO.


    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.

  • jueves, 21 de junio de 2012 9:48
     
     

    Latency was my main concern, but it's good to know that it's doable.

    Thanks for your response.