Coder Social home page Coder Social logo

bitfox-git / azurebroadcast-functions Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 1.0 90 KB

Serverless Azure SignalR service made easy. Predefined Azure Functions in combination with a client library

License: MIT License

C# 100.00%
signalr azure serverless

azurebroadcast-functions's Introduction

Part of the Serverless Azure-based .Net 2.0 Standard Broadcast solution. See this client library repository for more.

Build status

Bitfox.AzureBroadcast.Functions

These Azure Functions are part of the Bitfox.AzureBroadcast feature and should be used in combination with a Azure SignalR service in Serverless mode and the Bitfox.AzureBroadcast.Client for easy real-time messaging in .Net 2.0 Standard solutions. For example: Desktop applications (WPF/WinForms) in need of an easy interclient communication, comparable with UDP broadcasting on a local network.

Sample usage

In any .Net 2.0 Standard solution:

    var client = new BroadcastClient<string>('endpoint-of-azure-functions','hostkey');

    client.onMessage = (msg, info) => { 
        //do something useful with received messages;

    }

    client.Start();
    client.Broadcast("Hello World!");

Requirements

Setup an Azure SignalR service

  1. Create the Azure SignalR service in Azure Portal
  2. Change the service Feature Flag
  3. Copy and save the service endpoint in settings/key menu for later use.

Setup an Azure Functions endpoint

  1. Use the Azure portal to setup an Azure Function.
  2. Within the created Azure Function navigate to Platform Features / Application Settings.
  3. Add new Application Setting with the name AzureSignalRConnectionString and the value of the Azure SignalR endpoint as recorded in step 3.
  4. Deploy the functions (see below)
  5. Write down the default host key found when you click on manage on one of the deployed functions.

Deploy a release

Use the latest release on Github tab releases to get the precompiled functions as zip. Upload the zipfile in the Azure Portal.

Build and Deploy of the Azure Function

Clone this repo. You will need .net 2.x SDK for building.

dotnet restore
dotnet build
dotnet publish --configuration Release

Deployment options

  1. Deploy from Visual Studio Code

Install the Azure Functions extension, this allows easy deployment directly from vs-code.

  1. Zip file deployment.

Download the latest release zip file s.zip from the GitHub release tab. Go to https://.scm.azurewebsites.net/ZipDeployUI and drop the zip file.

  1. Use the Get publish profile option in the overview page of the Azure Function in the Azure Portal. Publish with MSDeploy.

Test your deploy

Go to the Azure Portal Function Go to the info function, this function is reachable anonymous, without a host key. And click 'run'.

azurebroadcast-functions's People

Contributors

voslucas avatar

Watchers

 avatar James Cloos avatar  avatar

Forkers

lulzzz

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.