Coder Social home page Coder Social logo

chatneat's Introduction

ChatNeat

Build Status

A small PoC/example chat service based on Azure SignalR, powered by Azure Functions and Azure Table Storage. It has no authentication, and should not be used by anyone.

Requirements

Running ChatNeat.API locally

ChatNeat.API is an Azure Functions project, and can be run locally with any of the following:

The following variables must be defined in /ChatNeat.API/local.settings.json:

  "Values": {
    "AzureWebJobsStorage": "an Azure WebJobs connection string",
    "AzureSignalRConnectionString": "an Azure SignalR Service connection string",
    "FUNCTIONS_WORKER_RUNTIME": "dotnet",
    "CHATNEAT_TABLE_STORAGE_CONNECTION_STRING": "an Azure Table Storage connection string OR ",
  }

The CHATNEAT_TABLE_STORAGE_CONNECTION_STRING variable can theoretically also point to an Azure Storage emulator, but that hasn't been tested. The emulator has some known differences in behavior compared to a real Storage account, so all testing was done against a real Storage account.

Once set up, run the ChatNeat.API project via VS2019, VS Code, or func start --build.

Deploying ChatNeat

Every commit to the master branch is automatically built by Azure DevOps, and deployed to Azure. See azure-pipelines-backend.yml for details on the build process.

For details about the Release process, see the Azure DevOps Releases page.

The connection string environment variables are set in Azure on the Functions app directly.

Testing ChatNeat

The API is deployed to https://chatneat.azurewebsites.net. Documentation for the API is available via a Swagger page.

In addition, two mobile clients are available to facilitate more natural testing. There is a Windows 10 UWP client, and an Android client, both available on the Releases page, along with installation instructions.

Table Design

Azure Table Storage is NoSQL based, and each table has what is effectively a composite key made up of two columns: a ParitionKey and a RowKey. With that in mind, ChatNeat has three kinds of tables:

  • A single AllGroups table that tracks every currently active Group.
  • An arbitrary number of Group tables. Each table's name is that Group's unique ID. Each Group tracks three things:
    • Its own name and creation time.
    • All current Users.
    • All Messages.
  • An arbitrary number of User tables. Each table's name is that User's unique ID. Each User tracks only one thing:
    • All the groups it currently belongs to.

chatneat's People

Contributors

pingzing avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

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.