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
- Editado stefancelmicsisfant miércoles, 20 de junio de 2012 7:36
Todas las respuestas
-
miércoles, 20 de junio de 2012 20:09
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)
If I answered your question, please mark as answer.
If my post was helpful, please mark as helpful.- Marcado como respuesta stefancelmicsisfant jueves, 21 de junio de 2012 9:48
-
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.


