TYoemtais.z
TYoemtais.z
CC#
Created by TYoemtais.z on 4/22/2024 in #help
Redis or database for cache, distribiuted lock, signalR scale-out?
I think when we have more than 30 pods of front api and over 80 pods of other services, distributed cache is a must. We will also have more than 1000 busines customers and over few milions of end users. We are creating new architecture/infra from scratch. So the table with cache will have millions of rows of valid keys so searching in database will take time. Also dozens of connections only for cache is not optimal IMO. We are thinking with my devops what to use for redis cluster or just stay with single instance but it's a different question.
40 replies
CC#
Created by TYoemtais.z on 4/22/2024 in #help
Redis or database for cache, distribiuted lock, signalR scale-out?
I asked and complexity and overkill is the reason
40 replies
CC#
Created by TYoemtais.z on 4/22/2024 in #help
Redis or database for cache, distribiuted lock, signalR scale-out?
And what do you mean with that?
40 replies
CC#
Created by TYoemtais.z on 4/22/2024 in #help
Redis or database for cache, distribiuted lock, signalR scale-out?
And I think it's mainly because throughout his career he used regular cache as memory cache, not as distribiuted and only short polling
40 replies
CC#
Created by TYoemtais.z on 4/22/2024 in #help
Redis or database for cache, distribiuted lock, signalR scale-out?
The argument is mainly that it adds complexity to the project and is overkill, that redis is used for other things and there is no need to use it here.
40 replies
CC#
Created by TYoemtais.z on 4/22/2024 in #help
Redis or database for cache, distribiuted lock, signalR scale-out?
And yes, short pooling is such a bad idea, but my tech lead is very skeptical of SignalR and Redis. But thankfully, it's my decision for this project.
40 replies
CC#
Created by TYoemtais.z on 4/22/2024 in #help
Redis or database for cache, distribiuted lock, signalR scale-out?
Thank you very much for such a detailed answer. I would really like to go for Redis; database caching seems to create more issues than it solves.
40 replies
CC#
Created by TYoemtais.z on 1/30/2024 in #help
Clean architecture and EF entities as domain models
I probably have a big bias when it comes to this. I'm very comfortable working on entities from EF and it's possible that I'm just looking for confirmation that it's not a bad thing.
15 replies
CC#
Created by TYoemtais.z on 1/30/2024 in #help
Clean architecture and EF entities as domain models
I use DTOs when it comes to external communication. Only I feel that creating an additional domain model just to keep it "clean" is time consuming and problematic. In case my domain is 1 to 1 with the database anyway, using EF entities is great. I can save a lot of time. EF keeping track of changes is indeed a double-edged sword, on the one hand it greatly simplifies and speeds up the process of writing code, on the other hand you should always remember to save changes only in the main path. And yes, this could cause a problem someday that you would have to spend time on, and separating the data model and the domain model would help. But in such situations, don't we forget how much time and effort we have saved? I have a big headache when it comes to this, on the Internet I come across different opinions when it comes to EF entities as a domain.
15 replies
CC#
Created by TYoemtais.z on 1/30/2024 in #help
Clean architecture and EF entities as domain models
Ok, thanks!
15 replies
CC#
Created by TYoemtais.z on 1/30/2024 in #help
Clean architecture and EF entities as domain models
I mean the main question I included in the main post. That is, in a nutshell, is it wrong to work directly on entities and you need to map them first to models that do not have a link to the repo.
15 replies
CC#
Created by TYoemtais.z on 1/30/2024 in #help
Clean architecture and EF entities as domain models
@jcotton42 could you tell me what is your opinion about adding mapping to additional model? Besides vsa
15 replies
CC#
Created by TYoemtais.z on 1/30/2024 in #help
Clean architecture and EF entities as domain models
Yep, but I'm just trying to divide the domain into such parts that relate to the functionality, a little bit like in VS. But what pains me the most is the possible abandonment of EF entity tracking. It seems to me that I will have to spend a lot of time on it for something that is unlikely to occur. That's why I wanted to ask experienced C# programmers. I have a lot of experience in the front end, where just everything was modular.
15 replies
CC#
Created by TYoemtais.z on 1/28/2024 in #help
Polymorphism in C# makes no sense
The solution is good, although it causes a large code add-on. Apparently I am used to more flexible languages 😛 Anyway, thank you
23 replies
CC#
Created by TYoemtais.z on 1/28/2024 in #help
Polymorphism in C# makes no sense
I can specify any engine but then I cannot use methods of this different engines. Like bugatti.Engine.WorkOnShittyEngine(). I'm only limited to use things that IEngine provides. I thinks this is what limit the flexibility of mine code.
23 replies
CC#
Created by TYoemtais.z on 1/28/2024 in #help
Polymorphism in C# makes no sense
I know, I understand the error. But it just doesn't make sense to me. Since Engine implements IEngine, it completely meets its requirements. Wouldn't it be much more useful if it were truly polymorphic? I do not understand why in this case it was done this way.
23 replies
CC#
Created by TYoemtais.z on 1/22/2024 in #help
API does not store keys from IdentityServer to validate tokens
Thank you for your reply. But the keys on my IS do not change, it is closed to the outside world so I would like to use the offline_access capabilities. Since in my case the API can validate the token by itself having the obtained keys from the IS why should it do it for every request?
3 replies
CC#
Created by TYoemtais.z on 9/28/2023 in #help
❔ Weird issue with MediaR pipeline.
Ok, found the issue. In new version, there is need to change:
public class UnhandledExceptionBehaviour<TRequest, TResponse> : IPipelineBehavior<TRequest, TResponse> where TRequest : IRequest<TResponse>
public class UnhandledExceptionBehaviour<TRequest, TResponse> : IPipelineBehavior<TRequest, TResponse> where TRequest : IRequest<TResponse>
To:
public class UnhandledExceptionBehaviour<TRequest, TResponse> : IPipelineBehavior<TRequest, TResponse> where TRequest : IBaseRequest
public class UnhandledExceptionBehaviour<TRequest, TResponse> : IPipelineBehavior<TRequest, TResponse> where TRequest : IBaseRequest
3 replies
CC#
Created by TYoemtais.z on 8/30/2023 in #help
❔ Proper email backround service arch
Firing rest call to main app you mean?
6 replies
CC#
Created by TYoemtais.z on 8/30/2023 in #help
❔ Proper email backround service arch
I'm rather thinging where should I keep logic for that. It's start to be a little large monolith. But because of clean architecture it's rather loosely tho.
6 replies