Code Monkey home page Code Monkey logo

orgnalr's People

Contributors

bbehrens avatar dependabot[bot] avatar hbsteel avatar koenbeuk avatar liammorrow avatar renovate[bot] avatar svella-at-nice avatar tecnocrata avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

orgnalr's Issues

[TEST] More Test cases

Ideally we can get some integration tests going that will check all the various message passing / recovery mechanisms

[FEATURE] Engage with Orleans Discord channel in show-and-tell

Microsoft had previously blessed the SignalR.Orleans backplane as an official backplane for SignalR. https://learn.microsoft.com/en-us/aspnet/core/signalr/scale?view=aspnetcore-7.0#third-party-signalr-backplane-providers I was thinking it might be a good idea to try and engage with the very active Discord community for Orleans https://discord.gg/vByufzUJ and find out what all might be required for this project to get the same. There's some obvious low hanging fruit like documentation and testing but wanted to ask first and see if that was a direction you'd be interested in the project going. To my knowledge it's the only functioning Orleans 7 backplane and has the benefit of not requiring Streams. Potentially even more attractive now that streams has been split off into a separate nuget and the underlying tech they used (SimpleMessageStreams) replaced with Broadcast channel. The SignalR.Orleans team has been completely unresponsive to discussions about upgrading to Orleans 7 and I've gotten no traction in the Discord channel about it either.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • Update dependency @types/react to v18.2.79

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

docker-compose
example/tic-tac-toe/docker-compose.yml
  • node 20
dockerfile
example/tic-tac-toe/TicTacToe.OrleansSilo/Dockerfile
  • mcr.microsoft.com/dotnet/aspnet 8.0
  • mcr.microsoft.com/dotnet/sdk 8.0
example/tic-tac-toe/TicTacToe.SignalRServer/Dockerfile
  • mcr.microsoft.com/dotnet/aspnet 8.0
  • mcr.microsoft.com/dotnet/sdk 8.0
github-actions
.github/workflows/build.yml
  • actions/checkout v4
  • actions/setup-dotnet v4
.github/workflows/release.yml
  • actions/checkout v4
  • actions/setup-dotnet v4
.github/workflows/test.yml
  • actions/checkout v4
  • actions/setup-dotnet v4
  • irongut/CodeCoverageSummary v1.3.0
  • marocchino/sticky-pull-request-comment v2
npm
example/chat-app/ChatApp.Server/ClientApp/package.json
  • @microsoft/signalr ^8.0.0
  • jquery ^3.6.0
  • merge ^2.1.1
  • oidc-client ^1.11.5
  • react ^18.2.0
  • react-dom ^18.2.0
  • react-router-bootstrap ^0.26.2
  • react-router-dom ^6.3.0
  • react-scripts ^5.0.1
  • reactstrap ^9.1.3
  • rimraf ^5.0.0
  • web-vitals ^3.0.0
  • workbox-background-sync ^7.0.0
  • workbox-broadcast-update ^7.0.0
  • workbox-cacheable-response ^7.0.0
  • workbox-core ^7.0.0
  • workbox-expiration ^7.0.0
  • workbox-google-analytics ^7.0.0
  • workbox-navigation-preload ^7.0.0
  • workbox-precaching ^7.0.0
  • workbox-range-requests ^7.0.0
  • workbox-routing ^7.0.0
  • workbox-strategies ^7.0.0
  • workbox-streams ^7.0.0
  • ajv ^8.11.0
  • cross-env ^7.0.3
  • eslint ^9.0.0
  • eslint-config-react-app ^7.0.1
  • eslint-plugin-flowtype ^8.0.3
  • eslint-plugin-import ^2.26.0
  • eslint-plugin-jsx-a11y ^6.6.1
  • eslint-plugin-react ^7.30.1
  • nan ^2.16.0
  • typescript ^5.0.0
example/tic-tac-toe/tictactoe-frontend/package.json
  • @microsoft/signalr ^8.0.0
  • @testing-library/jest-dom ^6.0.0
  • @testing-library/react ^15.0.0
  • @testing-library/user-event ^14.0.0
  • @types/jest ^29.0.0
  • @types/node ^20.0.0
  • @types/react ^18.0.0
  • @types/react-dom ^18.0.0
  • react ^18.2.0
  • react-dom ^18.2.0
  • react-scripts 5.0.1
  • typescript ^5.0.0
  • uuid ^9.0.0
  • web-vitals ^3.0.0
  • @types/uuid ^9.0.0
nuget
example/chat-app/ChatApp.GrainInterfaces/ChatApp.GrainInterfaces.csproj
  • Microsoft.Orleans.Sdk 7.2.6
example/chat-app/ChatApp.Server/ChatApp.Server.csproj
  • Microsoft.Orleans.Client 7.2.6
  • Microsoft.AspNetCore.SpaProxy 8.0.4
example/chat-app/ChatApp.Silo/ChatApp.Silo.csproj
  • Microsoft.Orleans.Server 7.2.6
example/tic-tac-toe/TicTacToe.Interfaces/TicTacToe.Interfaces.csproj
  • Microsoft.Orleans.Sdk 7.2.6
example/tic-tac-toe/TicTacToe.OrleansSilo/TicTacToe.OrleansSilo.csproj
  • Microsoft.Orleans.Server 7.2.6
example/tic-tac-toe/TicTacToe.Shared/TicTacToe.Shared.csproj
  • Microsoft.Orleans.Sdk 7.2.6
example/tic-tac-toe/TicTacToe.SignalRServer/TicTacToe.SignalRServer.csproj
  • Microsoft.Orleans.Client 7.2.6
src/OrgnalR.Backplane.GrainAdaptors/OrgnalR.Backplane.GrainAdaptors.csproj
  • Microsoft.Orleans.Sdk 7.2.6
src/OrgnalR.Backplane.GrainImplementations/OrgnalR.Backplane.GrainImplementations.csproj
  • Microsoft.Orleans.Sdk 7.2.6
src/OrgnalR.Backplane.GrainInterfaces/OrgnalR.Backplane.GrainInterfaces.csproj
  • Microsoft.Orleans.Sdk 7.2.6
src/OrgnalR.Core/OrgnalR.Core.csproj
  • Microsoft.Orleans.Sdk 7.2.6
  • System.Text.Encoding 4.3.0
  • System.IO 4.3.0
src/OrgnalR.OrleansSilo/OrgnalR.OrleansSilo.csproj
  • Microsoft.Orleans.Server 7.2.6
src/OrgnalR.SignalR/OrgnalR.SignalR.csproj
  • Microsoft.Orleans.Client 7.2.6

  • Check this box to trigger a request for Renovate to run again on this repository

[DOCUMENTATION] Need Example Project

We need some sample projects that highlight how to use OrgnalR.
A SignalR server, and an Orleans Silo should be configured to use OrgnalR, perhaps adapted from example projects in SignalR core.

[BUG] Can't add OrgnalR Nuget package to Service Fabric service (stateless, ASP.NET Core web application)

Describe the bug
Nuget package installation fails and rolls back. There's a conflict with this package which is used by the generated code for a new project: Microsoft.ServiceFabric.AspNetCore.Kestrel.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new Service Fabric Application in Visual Studio.
  2. From the cluster project (orange icon): right click, Add, "New Service Fabric Service...".
  3. Select "Stateless ASP.NET Core", provide a name "Test.SignalR", and hit the Create button.
  4. Attempt to add the SignalR.Orleans Nuget package to the new ASP.NET Core service project.

Expected behavior
The Nuget package is added and can be used.

Having trouble getting chat app to run

I tried to fire up the ChatApp example and I can't get it going. Here's everything I tried:

Open chatapp solution in vs 2022
Configure multiple startup projects -> 404

Manually run the ChatApp.Silo and ChatApp.Server projects via dotnet run - This works, but I can't get hit a URL

Manually run the ChatApp.Silo and ChatApp.Server projects via dotnet run then run yarn start for the chatapp project

That brings up the chatapp html page but it can't connect to the backend stuff

image

I tried running things in VS code and couldn't get that to work either.

Am I missing a short path to victory here?

[BUG] OrgnalR waits 5 seconds to get cluster client rather than using lifecycle

Describe the bug
Right now the backplane waits an arbitrary 5 seconds before subscribing to messages. This is to give the IClusterClient time to be ready - if it's not ready it will throw a null pointer exception (can see this when running the example project and removing the delay).
Delay: https://github.com/LiamMorrow/OrgnalR/blob/master/src/OrgnalR.Backplane/OrgnalRHubLifetimeManager.cs#L81

To Reproduce

  1. Remove the Task delay at : https://github.com/LiamMorrow/OrgnalR/blob/master/src/OrgnalR.Backplane/OrgnalRHubLifetimeManager.cs#L81
  2. Run the example project

Expected behavior
No null pointer

Additional context
Orleans provides hooks into its lifecycle via the LifeCycleParticipant interface. This could likely be used to delay subscribing until it is ready:
https://learn.microsoft.com/en-us/dotnet/orleans/implementation/orleans-lifecycle

[BUG] Potential memory leak

We're using this library in production for sending non-critical signals to users. Over time we notice a degradation in performance and an increase in memory consumption until at some point we get an application restart with an OOM message.

We suspect the problem is with RewindableMessageGrain. As its associated to Clients (which come and go) and persists messages in state, State however is not cleared when the client goes away and will always stay persisted.

2 relatively easy wins would be to never persist when MaxMessageRewind is configured as 0 and to make persistence optional. A proper fix would involve observing the client and clearing state when the client goes away.

We're using MemoryStorage which exacerbates the issue. If we were to use a proper storage provider then we would expect to see an ever increasing db size.

I'm happy to contribute here.

[FEATURE] Support latest version of Orleans

Is your feature request related to a problem? Please describe.
In this commit on June 6 dotnet/orleans@cbee643#diff-1fcbe03001be1589b2f0995d055a1cec02147c50ba2421171f9b895f3d96b65a they enabled the nullable annotation context. This creates compilation errors with the WriteStateIfDirty method.

I discovered this investigating this stack trace running OrgnalR in a project updated to the latest version of Orleans (7.2.1) Here's the stack trace we got

System.MissingMethodException: Method not found: 'System.Threading.Tasks.ValueTask Orleans.Runtime.GrainReference.InvokeAsync(Orleans.Serialization.Invocation.IInvokable)'.
   at OrleansCodeGen.OrgnalR.Backplane.GrainInterfaces.Proxy_IAnonymousMessageGrain.global::OrgnalR.Backplane.GrainInterfaces.IAnonymousMessageGrain.SubscribeToMessages(IAnonymousMessageObserver arg0, MessageHandle arg1)
   at OrgnalR.Backplane.GrainAdaptors.GrainMessageObservable.SubscribeToAllAsync(Func`3 messageCallback, Func`2 onSubscriptionEnd, MessageHandle since, CancellationToken cancellationToken)
   at OrgnalR.SignalR.OrgnalRHubLifetimeManager`1.CreateAsync(IActorProviderFactory actorProviderFactory, IMessageObservable messageObservable, IMessageObserver messageObserver, IMessageArgsSerializer messageArgsSerializer, ILogger`1 logger, CancellationToken cancellationToken)
   at OrgnalR.SignalR.SignalRExtensions.OrgnalRHubLifetimeManagerFactory`1.OnConnectedAsync(HubConnectionContext connection)
2023-07-21 19:39:28.822 +00:00 [Information] [bingodaubcity-server-api] [790c61fc-b067-4c12-9f9d-30df6b663856] [Serilog.AspNetCore.RequestLoggingMiddleware] HTTP "GET" "/Game" responded 101 in 81.2067 ms

Describe the solution you'd like
I'd like for OrgnalR to work with the latest versions of Orleans

Describe alternatives you've considered

Additional context
If you update the Orleans nugets in the OrgnalR project to the latest version, you'll get a few compiler errors related to the aforementioned nullable annotation context. If you pass in string.Empty for state instead of null the compilation issues go away and all the tests pass. I'm not sure if that'll fix my particular issue, but that's probably a fix you'd want to make anyway. I would submit a PR, but it's exceptionally trivial and I'm not certain of just putting in string.Empty is an acceptable fix for the situation.

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.