reinaldyrfl
reinaldyrfl
Explore posts from servers
CC#
Created by reinaldyrfl on 1/22/2024 in #help
✅ Growing memory issues for ASP.NET Core App
No description
30 replies
CC#
Created by reinaldyrfl on 12/29/2023 in #help
✅ Passing realtime data from Worker to ASP.NET Web API
I'm working on a stock broker company, currently working for the stock chart infrastructure. I need to connect to the realtime data feed server via a single TCP socket (the server's using C++), and fan out the stocks data in realtime via WebSocket to the frontend client (which is just static HTML/JS also statically served by ASP.NET Core). One thing that bugs me and the team is: how do we properly transfer the data from the Worker instance to the Web API instance, so that it can be properly being fan out? At first I was thinking of using System.Threading.Channels, but having it as a singleton that used by both the Web API and Worker doesn't makes sense to me, as I suppose the class will be created twice on the Web API and on Worker (or did I got it wrong?). I don't want to add another external infrastructure like using Kafka, Rabbit, or Redis pubsub, I want to avoid more latency. So the questions would be: 1. How do I properly transfer (and possibly fan out) the data being consumed by Worker instance to the ASP.NET Core instance? 2. Is using System.Threading.Channels the best way to achieve this? On other language, I'd use channel in Go and std::sync::mpsc in Rust.
6 replies
CC#
Created by reinaldyrfl on 10/13/2023 in #help
✅ How do you create custom authz/autho in ASP.NET Core?
As far as I know, on the internet there's only an implementation for JWT authentication. Yet, I need totally custom implementation that's not related to JWT at all. I have an additional case that every static file visit should also be authenticated (the specification said so). According to my implementation, anonymous access should be allowed. But for unknown reasons, I got empty content with 401 status code for any page and any method. I think I'm missing something, yet I don't know what it is.
21 replies