Converting a Monolithic Application into Microservices in ASP.NET Core (The process I follow)
HTML-код
- Опубликовано: 8 фев 2025
- #microservices #aspnetcore #dotnetcore
In my last video, I walked through what is my understanding of microservices. Based on my readings and practical implementations. What worked for me and the philosophy I follow when building microservices.
In this video, I will walk through breaking out a microservice from an existing monolithic demo application.
The goal of this video is to show the process I follow when breaking out microservices from an existing monolithic application.
In this video, I also talk about using Dapper, which I do not cover in this video. But here are the link of a couple of my videos on Dapper:
• ASP.Net Core with Dapp...
• ASP Net Core with Dapp...
I also talk about microservices resiliency and using Polly. Here are the links for a couple of my videos on Polly:
• Microservice resilienc...
• Microservice resilienc...
This video does not cover all aspects, but what is the general direction I usually take when building microservices. Please provide your thoughts and questions in the comment section below. And I will attempt to answer all of them to the best of my ability.
Great videos man. You are one of the best teachers i came accross because every suggestion and explanation you give comes purely from the heart. Thank you very much.
@C T, thanks for watching!
i write rarely comments on youtube, especially when it comes for coding, tehcnologies and etc.
BUT your series about microservices... IS THE BEST ONE, could not skip to tell.
@Alexandr Laketych, thanks for watching! I appreciate you taking the time to provide feedback!
I dont mean to be so offtopic but does any of you know a way to get back into an instagram account?
I stupidly lost the login password. I appreciate any assistance you can offer me
@Finnegan Joshua instablaster :)
@Cullen Gunnar thanks so much for your reply. I found the site through google and I'm waiting for the hacking stuff atm.
I see it takes a while so I will reply here later when my account password hopefully is recovered.
@Cullen Gunnar it worked and I actually got access to my account again. Im so happy!
Thanks so much you really help me out :D
you're the most underrated tech channel! Whatever you speak comes from sheer experience and not from docs! Huge respect!
@Siddharth Dwivedi, thanks for your kind words!
Hi Sir, This is a great tutorial! Very helpful! Can I request you kindly to upload both the solutions to GITHub? 🙏
Thanks, very clean and neat explanation.
Great video, It was Valuable and Informative
Thanks!
@DotNet Core Central Nice work you are doing here. Mine is not that of a big issue. I would just like to request for you to name/arrange your videos in order. It's a bit hard jumping from video to video seeing which one follows which. E.g
1) RabbitMQ .... Part 1
2) RabbitMQ ... Part 2
...
6) Ocelot
@NIMROD MAINA, thanks for the suggestion, I will do that.
Great hard work for us. thank you so much
@ShahRukh Khan, thanks for watching!
Hey! Thank you for your videos and tutorials. Where can I find the source code, so I can also do the exercise here at home? Thank you.
Many thanks for your video Sir. Please are you able to share the code of the Ecomm application as a monolith and when you break it up into a service. many thanks for your kind consideration and look forward to hearing from you.
Thank you sir!!!
Most welcome!
Hi Choudhury, Thank you for your nice tutorial. I wonder if you have the solutions of the Monolithic and Microservice Applications available for reference.
Great tips thank you
Great Videos. Appreciate the effort!!
However I have one confusion. You have added User name and Product name in Order service DB itself but if for some reason, the product name/username changes, we would have to change it in both places and that violates the fundamental concept. Also if order detail service is dependent on user/product service for attributes, how should it actually get the data.There could be thousands of rows in order detail and if we fetch attributes from another service in iterative manner, it would be distareous. PLs suggest
nice explanation. can u create a video for creating a micro service connecting to web api and mongo db as a database approach
With this architecture, you would have to host two applications? One would be the wrapper that accepts the api calls and the other would be the actual api that is making the call to the database?
@Sam Haider, no, you will make multiple microservices, there is no need for any wrapper.
Vast knowledge you have, where did you learn all these from?
@Anubhav Debnath, thanks for watching! I have been in this industry coding along for more than 20 years, learned everything as part of the job and a lot of reading :)
@DotNetCoreCentral Thank you! for such a wonderful series. Very well explained.
Is there any way to access the code or if we can get reference.
Any github link!
Will be really great for everyone. :)
I should have the code, I’ll check and let you know
Hi @dotnet core central kindly arrange videos in order, you did a lot of work but i guess all are not reflected in your playlist or vedios section. just saw 4 more links in the description section :-)
@Zeeshan Asghar, thanks for the suggestion, I will do that.
can i get github link of this project
Hi, i need a complete code of extracting microservices from monolithic.
@Maryam Munawar, the code for this demo is available in my Github repo. github.com/choudhurynirjhar/reactive-microservice-demo
Practically order service should be transient, correct? Because we don't want to share the order with multiple users' requests!
@Shreyas Jejurkar, correct when configuring in Dependency Injection container. Thanks!
@@DotNetCoreCentral yeah, you can also use HttpClientExtensions so that you can do client.GetFromJsonAsync() directly, rather than getting the response and then deserializing into objects. Just add System.Net.Http.Json to the project.
@@shreyasjejurkar1233 thanks for the suggestion! I will definitely use this going forward.
The approach that you use here to merge/join data between Microservices is called Selective data replication, correct ?
@Manuel Guerrero, thanks for watching the video.
This is kind of SDR but not exactly the same based on my understanding of SDR. SDR is a concept replicating selective data sets to a secondary database.
Whereas here we have multiple domain-driven microservices, which are keeping data necessary to their own domain, which is of course sent from the primary data domain. But not for the purpose of the data replication, but more for supporting the other domain with its need for functionality.
Please let me know if it makes sense. I am more than happy to hear your point of view. Thanks!
@@DotNetCoreCentral Yeah make senses, I was just looking for information about Microservices and I found a couple of articles that said that we shouldn't make merge/join between tables in different Microservices, because how you have been saying, a mc should work on its own.
So I would the same technique you used here, I am going to create table that has the necessary fields so it won't have to go to another service to get data or something like that.
I don't know why I keep thinking that I may later go to look data to another Microservices and I would have to make a join which I think its wrong.
Can i get real world use of microservices according to me breaking entity doesn't makes sense
@Rushang Panchal, thanks for watching the video. In this example, I did not break out the entity but essentially broken out the domains. And that is what we usually do in real-life is breaking out the domains and create services based on domains or sub-domains. I hope this answers your question.
Hi , where can I find Ecomm monolithic application source code?
@George Zarogkikas, thanks for watching! Here is the repo: github.com/choudhurynirjhar/reactive-microservice-demo
can we get a code ?
how to authenticate user in microservices
it depends on how microservices are implemented, if they are behind an API Gateway, in that case the authentication will be managed by the API Gateway.
@@DotNetCoreCentral can u make an dedicated video on it ... Will be great full
@Dot net core central. I Want to implement this code on my machine . I Also send u emaiL about the work kindly response asap.
@Dotnet Core Central Kindly share the code of this vedio.
@Maryam Munawar, thanks for watching! The source code is available here: github.com/choudhurynirjhar/reactive-microservice-demo
please sample code sir
Can you please share the source code of this.
@Siva Shunmugam, this is where you can get the example code: github.com/choudhurynirjhar/reactive-microservice-demo
First comment 😊
@Muhammed Shuhaib, thanks!
It would be nice if somebody did a real world example with business logic instead of these simple data type microservices. These are simple that anyone can do, try something more substantial.