All Projects → gcsuk → Achievements

gcsuk / Achievements

Licence: other
A micro-service to listen to Azure Service bus for "Achievement Unlocked Events", process them, and emit a message to listening clients via SignalR

Programming Languages

C#
18002 projects
TSQL
950 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects

Projects that are alternatives of or similar to Achievements

online-training
Online Training website using ASP.Net Core 2.0 & Angular 4
Stars: ✭ 26 (+100%)
Mutual labels:  signalr, netcore2
SignalR-Core-SqlTableDependency
Shows how the new SignalR Core works with hubs and sockets, also how it can integrate with SqlTableDependency API.
Stars: ✭ 36 (+176.92%)
Mutual labels:  signalr, netcore2
TraceHub
Centralized and distributed logging for Web applications and services, extending System.Diagnostics and Essential.Diagnostics, providing structured tracing and logging withou needing to change 1 line of your application codes
Stars: ✭ 22 (+69.23%)
Mutual labels:  signalr
QrF.Core
基于.net core 2.2 的微服务框架
Stars: ✭ 19 (+46.15%)
Mutual labels:  netcore2
Chatazon
Implementing websockets in .NET Core
Stars: ✭ 19 (+46.15%)
Mutual labels:  signalr
PugetSound
PugetSound allows you and your group to enjoy music together using Spotify.
Stars: ✭ 52 (+300%)
Mutual labels:  signalr
AngularAspNetCoreSignalR
Build a simple chat app with Angular and ASP.NET Core SignalR
Stars: ✭ 12 (-7.69%)
Mutual labels:  signalr
IMO-Maritime-Single-Window
An IMO coordinated project developing a generic Maritime Single Window.
Stars: ✭ 18 (+38.46%)
Mutual labels:  netcore2
arcus.messaging
Messaging with Microsoft Azure in a breeze.
Stars: ✭ 20 (+53.85%)
Mutual labels:  servicebus
ObjectRepository
EscapeTeams In-Memory Object Database
Stars: ✭ 23 (+76.92%)
Mutual labels:  netcore2
Liquid-Application-Framework
Liquid Application Framework documentation, useful links and sample project
Stars: ✭ 467 (+3492.31%)
Mutual labels:  servicebus
rename-tool
一个基于 .NET Core 2.x 实现的项目重命名工具
Stars: ✭ 16 (+23.08%)
Mutual labels:  netcore2
signalr
SignalR server and client in go
Stars: ✭ 69 (+430.77%)
Mutual labels:  signalr
AzureFunctionExtensions
Set of Azure Function Extensions: Redis output and IDatabase resolving, HTTP calls, etc.
Stars: ✭ 32 (+146.15%)
Mutual labels:  signalr
azure-service-bus-go
Golang library for Azure Service Bus -- https://aka.ms/azsb
Stars: ✭ 67 (+415.38%)
Mutual labels:  servicebus
aspnet-core-react-redux-playground-template
SPA template built with ASP.NET Core 6.0 + React + Redux + TypeScript + Hot Module Replacement (HMR)
Stars: ✭ 78 (+500%)
Mutual labels:  signalr
Ubiety.Xmpp.Core
XMPP library for .NET Core
Stars: ✭ 32 (+146.15%)
Mutual labels:  netcore2
azure-big-data-starter
A boilerplate project for Azure Big Data PaaS services
Stars: ✭ 13 (+0%)
Mutual labels:  servicebus
jQuery-datatable-server-side-net-core
A simple Visual Studio solution using jQuery DataTable with Server-Side processing using .NET 5
Stars: ✭ 71 (+446.15%)
Mutual labels:  netcore2
dotNetify-react-native-demo
DotNetify + React Native + .NET Core demo
Stars: ✭ 43 (+230.77%)
Mutual labels:  signalr

Achievements

The achievements repository is a microservice designed to listen to Azure Service bus for "Achievement Unlocked" events, process the event (saves it to azure table storage database) and emits a message to listening clients via SignalR

The idea behind this service is to allow any web site to "fire-and-forget" an event and let this take care of storage and management, and telling users of the achievement.

There is also a management API for CRUD operations against Achievements and Unlocked Achievements

This is a small learning project for using Service Bus and SignalR together in .NET5. It works, but it isn't optimised for production use. I will make changes over time but it is not "supported." Having said that, and PRs opened against it will be reviewed and merged if they add value.

Credit to @davidfowl for help when I was completely stuck getting the Service Bus handler to talk to SignalR (Stack Overflow)

Pre-requisites

  • Visual Studio 2019 (16.8)
  • .NET Core 5.0 Runtime (wherever you deploy it)
  • Knowledge of .NET configuration

Setup

  • Clone the repository
  • Create a service bus namespace in Azure
    • Note the Primary Connection String in Shared access policies > RootManageSharedAccessKey
    • Create a queue called unlockedachievements
  • Create a storage account in Azure
    • Note the Connection String in Access Keys
    • Use Storage Explorer to add a table called Achievements
    • Use Storage Explorer to add a table called AchievementsUnlocked
  • In a user secrets file, set the TableStorage and Service Bus connection strings - do not fill in the entries in app.settings and commit these to your forked repo, they are there to be overridden by Azure Configuration transformations not development. Look here https://docs.microsoft.com/en-us/aspnet/core/security/app-secrets for more info
  • In a CLI navigate to the wwwroot directory and run npm install
  • Create a Web App in Azure
    • Add both connection string entries to the ConnectionStrings section of Application Settings
    • Ensure Stack is set to .NET and .NET Framework Version is set to .NET 5 in Configuration > General Settings
    • Set Web Sockets to On in Application Settings

Running

  • Run the application.
  • Navigate to index.html
    • You should see a Start button. Click that.
    • Open the console (F12) you should see that SignalR is connected.
  • Open a new tab, navigate to /swagger
    • Create an achievement called "Learner" using the POST endpoint in Achievements section.
    • Open the Demo section and execute POST /demo/events/send.
    • Return to the other tab and in the console you should see the achievement details printed to the screen - this pops up then disappears so be quick!
    • Use the GET endpoint of the User Achievements section of Swagger to verify the achievement is in the database.

Notes and future improvements

  • UserId is currently hard coded to Learner in demo sender.
  • Use the UserAchievements CRUD endpoints to remove Achievement "Learner" for User "1" in between calling the demo event sender, as otherwise it will think there is nothing new to add and nothing will happen.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].