How Microservices communicate? API BEST practices | Java | Spring Boot | REST API #3
Вставка
- Опубліковано 8 лип 2024
- How Microservices Communicate ? Microservices inter communication is an important thing learn.
In this Lesson, We will Learn about different Rest clients. We will use RestTemplate and WebClient to make API calls and along the way we will understand why RestTemplate is getting deprecated. We will learn what is a blocking call and why it should be avoided ? Then we will make a comparison between Blocking Vs Non Blocking calls.
In this lesson, We will discover a lot of Microservices coding best practices and will explore a lot of concepts.
Timestamp
------------------
00:00:00 - Microservices Communication Prep
00:04:05 - New API Requirement
00:06:36 - Spring Boot Apps context-path and port configuration
00:12:20 - Building Response Object
00:18:21 - Making Rest client calls using RestTemplate
00:27:15 - Doubts clarification
00:31:09 - Improving our code using RESTTemplateBuilder
00:42:31 - QNA / Doubt Discussion
00:54:15 - why RestTemplate should be avoided ?
00:57:55 - what is thread per request model ?
01:03:53 - What is a blocking call ?
01:08:22 - Dynamic port allocation in spring boot
01:15:39 - Blocking Vs Nonblocking call
01:19:31 - Building Reactive apps using spring web flux
01:24:00 - Rest calls using WebClient
01:43:37 - THE END
#JavaMicroservices #SpringBoot #SpringCloud
In this series of Sessions we will learn to create Microservices using spring boot and We will Implement spring cloud to resolve the known challenges during MS development.
This course will get you started with Microservices, for in-depth Microservices hands-on you can check out the below paid course : Course Name : Spring Boot Advanced + Microservices Bootcamp (Running Batch)Mode : Live / Self-Paced
www.seleniumexpress.com/cours...
#Microservices #SpringBoot #SpringCloud #java
For more free / paid courses visit
www.seleniumexpress.com
LINKS AND FREE LEARNING RESOURCES
========
Watch my new mock interview series for java developers
• Java interview questio...
Watch Spring boot Hot topics
• @Reposicotry Vs @Servi...
Java Interview / Question and Answer series
• Java collections inter...
Explain spring Bean Lifecycle
• REAL-TIME: Spring Bean...
spring core
• Spring framework tutor...
spring mvc
• Spring MVC course intr...
spring mvc intermediate
• [INTERMEDIATE] Spring ...
Spring JDBC
• Spring JDBC Course Pre...
spring live project
• #1 Build and Deploy A ...
SPRING SECURITY COURSE[NEW]
• Spring Security Course...
For more courses visit
www.seleniumexpress.com
Any time you are getting stuck with issues, Feel free to ask for support.
You can send mail to seleniumexpress@gmail.com
you can ping me on my Facebook page
/ seleniumexpress
Make sure to join my private Facebook page (Ask me here)
“SeleniumExpress - Support"
/ 187000222361579
you can ask for support in my website forum
www.seleniumexpress.com
Subscribe to my youtube channel
/ @seleniumexpress
Follow me on Insta
/ selenium_express
Webclient is non blocking in nature but as of my knowledge if we use .block() it blocks the current thread and becomes blocking in nature . If we have to use non blocking feature we should return a Mono or Flux.
Hi Manamohan ! Thanks for the correction. I went with the flow and used block () to remove the error as I already had the AddressResponse written in return and forget to explain it further. I noticed the same thing during editing but forgot to add a text annotation as well.
Pinning this comment. Thank you.
Hello Abhilash, thank you for making this types of videos with such deep explanation ❤️ and replying to my comment it means a lot . I do understand it not just a one line code change to magically move the synchronisation process to asynchronous, there are a lot of changes required and your explanation you just showed how to use webclient in place of rest template. Once again big fan of your the level of knowledge you have and type of explanation you gave ❤️❤️
@@manamohansamal1040 Thank you Manamohan. Means a lot ❤️❤️
For above case address response isn't mono or flux type it's an entity class, if you return mono or flux it won't accept right, how can we resolve this
I'm telling you, it's sweet. To find this tuto free is a miracle. Well explained with great examples. You hide nothing or neglect any aspect people need to know. Sir, keeping going in this way, i appreciate.
1st half - Done
I have been following all your videos from spring mvc , springboot hibernate to microservices. I truly love the way you teach and everything you teach is very standard and follows industry pattern of writing code. This really helps to understand how it is actaully done at its best. Your depriciated packages elaboration is also appreciated. I would love to lean more new and advance techniques to deal with a programming issue. Thank you for you effort, time and sharing knowledge.
1st Half Done - Clearly understood all the concepts till now, absolutely wonderful session.
1st half - done! Abhilash it's great to learn spring concepts from you, you explain everything in really a good way. I have been following your spring series for 8 or maybe 9 months and found it very helpful. Thanks!
As always deeper and proper explanation of each and every point.
1st half done so clear and detailed tutorial.
Thanks sir for keeping up with your word on regular releasing of videos.Please help us empower with skills by releasing videos in this standard phase.
1st half done. Just hats-off to your knowledge and kindness. It's helping a lot to understand concept deeply. Thanks a lot.
Thanks for this video -In this video, I have learnt about modelMapper, @Value, @Bean, context-path, constructor injection, got introduced to web-client, open-feign (feign client), restTemplate, back-pressure, project reactor, web-flux, etc.
1st half done!!! You are nailing it Sir
You are the best teacher how to explain breaking down the details.
that`s awesome. please do not stop this series.
+100000
1st half done,
I have never seen a person having this kind of teaching skills
1st half done - great teaching so far, as always!
1st half done. Pretty excellent and helpful in understanding the underlying things.
Awesome teaching , please post all the videos.
My 1st-half is done Abhilash, and it was really amazing. I won't have ever received such level of knowledge from anywhere and anyone in the world around. I am watching from Canada and shortly will be ready to get in market for job applications and then interviews.
I find each and every material very helpful, and even if you take a bit more time to explain and the sessions are longer, I feel confident after each session and get encouraged for the next one.
Not even in my bachelors or PG course, I was so excited to learn new, but "YOU ARE A GEM OF A PERSON" which makes me attracted to your next material and I wait for new recorded sessions everytime I am going through your series.
A BIG BIG THANK YOU TO YOU - ABHILASH TILL NOW AND GOD BLESS FOREVER!!
Please also share some links with me regarding interview prep from top to bottom in Java backend (Core to Advanced Java).
1st-half done. great going
1st half Done.., It's helping a lot to understand concept deeply. Thanks a lot.
Excellent session.Explaining in detail. Thanks for wonderful series.
Thanks so much!
1st Half Done brother Abhilash 🙌🙌🙌, every single second is worth listening and watching. Thanks and keep it up 🙏🙏🙏
thank tou for dropping such helpful playlist..!!!!
1st half - done successfully!
Thank you sir for awesome series
First half done!!! I'm loving the tutorial. Good work.
Thanks for bringing such a helpful tutorial. 👍
Great, as always! Thank you for your dedication
❤️
1s half-done thnak you so much for all this courses
Thank you Abhilash
Thank you for this deep explanation about Sync and Async communication between microservices and how can the choice of each approach can increases or decreases the performance of our web application.
Thanks for the video very informative. Please keep making such videos
Superb..Thank you
1st half done sir.... Thank you sir
Finally i found the best tutorial in youtube best to learn and implement, i owe you a lot sir please make videos on kafka using springboot
you are great. please upload more & more videos. eagerly waiting for your next video
its an amazing session
Super teaching sir,I understand all the things, It's very interesting try to complete all the concepts in microservices
very much helpful thanks
Sir please take 2 seperate microservices and reach all the methods get, post, put and delete from one microservices to another ex. Employee should able to update delete add address from employee microservices. Like this. It will really helpful
You are god of Spring !!
Thank you🙏
Awesome explanation
1st hald done abhilash
Amazing video both for content wise as well as quality. Keep continue these. I m moving towards for 2nd half
Awesome keep posting 🔥🔥
Superb explanation bro
For those who have a problem with running some certain service on different ports:
1) Go to "Edit Configurations" near the Run button at the top
2) Click "Modify options"
3) And there in the "Operating System" section, click on the "Allow multiple instances"
Thank you buddy. Helped me so much
your knowledge and the way of explanation is very good
Please do Session for Docker and kubernetes. Your Explanations is clean and clear.
Man great learning with you . Appreciate you a lot 1:46:35
Bahot sahi padhaye ho Bhai keep it up
Really good session
Thanks
1st half done . Thank you so much for this much clear explanation. I am your new subscriber.
Glad to hear,Shiwani!
1st half done.
Awesome explanation..
Thanks Nikhil ,!
1stHalf done video is awesome pls pls upload one more video on microservices
1st-half done.
1st half - done❤
Great teaching ... keep going sir.. Can you please add Springboot series as well, It will be very much helpful to cover those topics as well..
Video introduction music awesome bro
Are you sure, that your webclient example is non-blocking? I believe it's still blocking, because you use ".blocking()". In my understanding, the return type of the function needs to be "Mono" and you should map/flatmap the results within the service.
First half done, thank you sir
My pleasure ❤️
1st half done .
And it is very intresting
Thank you so much for taking time and letting me know a feedback ❤️
pls add more videos in this series, I have finished all
1st half- done
Thanks Abhilash garu for the wonderful series. Can you also do video on Microservices design patterns.
1st-half done
TQ
Thanks abhi❤️
You are welcome!
Awosome😊
Thanks,Nikul.
Tq abilash
1st half done
Hi, is there any chance you do a video on deploying these microservices to docker containers and showing them communicate. That is better than running them in eclipse or any ide. Thanks, you could have a postgres db in a third container as well.
first half done
1st half done.
As always deeper and proper explanation of each and every point.
Thanks Faizan !
please update other videos as well
basant (java techie) and abhilash from odisha .and doing great
Hi Abhilash thanks once again for giving such awesome tutorial, I have one query that will you be also giving Api Gateway and Eureka videos also in this series will it have complete artitechture of spring cloud????
Hi Rahul , Eureka will be a part of this series.
Hi abhilash, if we are not going with synchronous call and not wait for response of other service in this example address service then how we will get the consolidated response??
Thank u abhilash
My pleasure, Santhosh.
Hi..avilash... videos are amazing...are you from Odisha?
Nice mota bhai
Thanks Abhilash, I m from Viet Nam.
Glad to have you here, Nguyen !
hello abilash, pls add all the videos of this series,
Can you please take one vedio testcases using web client and mono and flux
👏🏻👏🏻✌️
Can you please teach AWS also along with microservices
Hello Abhilash, I saw 41:00 where you injected the baseurl and rest template through construtor it looks fine only when you current service is pointing to only one other service thtough rest call (in your case address service)... but there might be a chance where your employee service might need to hit other service rest template from the same service, at that time there might be a problem. I am just saying hard coding them in the constructor might be risky in future
Hello Sorry for posting the comment quickly...my question was raised my Santosh himself...thank you I got the answer
Hi Abhilash, can you show how to call a secured Microservice from another Microservice?
Jvm and Tomcat threads are same or different?
Can you share spring boot videos?
I plan to have 16 microservices. It doesn't make sense to have each on of them run on unique port#. How do I have them share the same port?
Hi I have a question regarding webClient the question is when thread serves another request then how dies it know that its 1st response is ready to serve cleint side . is there any internal process by which it know this response belong to which request
what is difference between creating an object with new keyword and Address address on 23:50
If any course is going tell I will join or buy the course as well
Are you currently working for Sapiens ?
I think we will get only a few demo videos. Right?
Abhilash please give us the Diwali gift and upload some more videos of microservice
@Everyone when i trying to put address-service base url in applicaiton.yaml file it is not working as expected.Can someone tell me how to handle this
Is it complete microServices series