Azure / azure-functions-signalrservice-extension

Azure Functions bindings for SignalR Service. Project moved to https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/signalr/Microsoft.Azure.WebJobs.Extensions.SignalRService .
MIT License
97 stars 48 forks source link

Add a JavaScript sample to demonstrate SignalR Trigger #103

Open zackliu opened 4 years ago

zackliu commented 4 years ago

Related to #101

The RP demonstrate SignalR Trigger usage in JavaScript. As far as I know, non-C# Functions has more limitation, so that binding data can not be bond to function's parameter directly. Instead, binding data are retrieved through context.bindingData.<parameter-name>.

davidfowl commented 4 years ago

Here's my port of SignalR to node for insipration:

https://github.com/davidfowl/signalr-ports/blob/master/signalr-node-server/app.js

I wonder how close we can get to this with the existing functions APIs.

zackliu commented 4 years ago

We can develop a serverless SDK for node just like what we've done for C#. Then we can git rid of output binding and use syntax like chat.clients.all.send('send', message);. However, for the input side, unless there's an entrypoint for us to customize cross-language invocation, the experience hard to be improved.