Project structure (MVC API, microservice arch.)
19 Replies
I'd like to know if the folder structure looks good here and if it make sense the i split each controller/service
that repo doesn't exist
hold on yea it's private ðŸ˜
@Jimmacle try now
I'd certainly utilize the global exception handler instead of writing the
try..catch...return 500
manually in each action
Nice services, I like that you're not falling for the generic repo trap here
Although I'd definitely utilize asynchronous code
Far as the structure itself goes, it seems pefectly fineIs this a C# specific idiom?
ASP-specific one, I'd say
Exception handling middleware already exists, it already returns an error 500 whenever an exception occurs
Why not use it?
(i'm kinda learning c# on the spot mixing Rust experience and some little java i learnt at uni, so yh i might not know about specific patterns)
For learning on the spot, it looks really good
Yeah im literally picking up C# as im writing this project (should be a microservice based app). I have to be fair, the syntax is quite similar to Java and C++ so its not very complicated.
Well it's definitely not microservice-based lol
I had some issues with entity framework while configuring the relationships at the beginning.
Having a service folder with multiple services in it doesn't qualify as microservice? ðŸ˜
'Fraid not
Microservice architecture is based on, well, micro services
You have a separate app, basically, that just deals with users
And another separate one that just deals with books
They can connect to the same database, but run completely separately
So that you can, for example, hot-swap a given microservice without affecting others
/books
might have downtime as you're updating it to version 1.1, but user registration and login still works because it still runs on /user
Orelans is the .NET microserfvice frameworkThis def came across while googling but i'm afraid i can't use this as its a uni project (i have to follow certain specs)
ASP.Net Core + EF + Docker + K8s
pretty much that
So multiple executables?
Yep
All synchronized with some message queue, for example
If need be
is it too late to do this?
How would i structure a project like that folder wise?
¯\_(ツ)_/¯
I never worked with microservices
Never intend to, really
Me too, tbh i think the whole MicroService thing is a hypetrain
that will derail anytime soon
I'll have to trash this as well i guess as each micro service would have its own db
Why?
I mean, I guess each microservice can have its own db
But does it have to?
Idk tbh
Change the title of this post to ask for help with microservices, maybe you'll attract people more in the know with it lol