MicroServices Q&A with JavaBrains | Live

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay is it live yeah so it seems i'm live uh i got the notification on the screen great uh so welcome everyone uh i hope uh you can properly hear me you can probably see me so today we have a very interesting session normally we don't go live in the morning but today is different right it's very interesting because it's a it's a topic which everyone wants to know about uh so of course we are not going to talk the entire thing about the topic which is micro services uh last week when i went live there were so many questions on microservices i'm not the best person to answer that so i thought hey let me pick up the expert and who else who can talk about this topic who so we have an expert and i hope everyone knows it knows him and so we have kojic here from java brains uh so hi kaushik hello and thank you so much koshek for coming live uh i know so you are in u.s it's this you just completed your work and uh thank you so much for giving your time and uh i hope you are excited to answer the you know questions on microservices yeah no time is not a problem always happy to um you know try and answer the problem that i have is in calling me an expert in anything i am certainly not and i'll probably prove it by by talking a little bit you will know that i'm knowing an expert but i try my best let's leave it at that great of course every answer will be helpful uh so so even before we start coaching you know you want to before we answer because i can see a lot of questions are coming up on multiple platforms here yeah and it's very difficult to actually cover track from which platform you're getting questions so before going for the questions i have some questions for you so i want to know more about you of course we had a talk outside this live stream but so my audience is excited to know about you because you don't reveal everything on the on youtube right so i'm not sure because i have seen some of your lives and then somewhere you don't reveal everything so i want to know so let's reveal that here uh so apart from youtube so what else you are busy with so what koshek does in the entire day so how do you know we have this amazing question videos on youtube how i spend my spend my day yeah yeah yeah a 24-hour uh slice of life of a youtuber yeah it's not it's not a lot of fun um i am actually um a full-time employee of linkedin um youtube is not my main gig i work as a staff engineer at linkedin and i work at uh the the us office which is a headquarters in sunnyvale uh apart from that when i have time when i'm free i do make youtube videos because i like teaching um i also like to read and i also like to make music um or at least something that i i consider it music maybe others who listen to it may not think so but i like to make music uh on my computer using uh software synthesizers there is this thing called uh daws digital audio workstations which allow you to track uh entire tracks on your own uh without needing a performer so i do that in my spare time yeah so why don't i mean are we expecting a new channel now java brains music of course yeah no no way no the thing is i find it hard enough to publish my uh my java videos on youtube there's a little bit of performance anxiety i don't know if you uh encounter that and i mean anytime i post a video there's always this thing in the back of my mind like okay is this good or is it bad will i get trashed for this so it's there's always that bit of performance anxiety very common i guess cause shaking in fact when i upload the videos i have the same uh thing in fact let me tell you uh from last one year i'm not posting a lot of videos it's not because i don't want to post videos i'm very busy i'm in that phase now when i'm doubting my own skills or if i make a video will will they like it so i have created so many videos and scrapped it i'm not uploading it on video on youtube you should just post it the thing is the longer the gap is the tougher it is to get started so i would recommend just posting it your viewers will will love it there's a reason why they've been following you so you should you should not doubt yourself just post it sure sure we'll do that and someone says dj kaushik so now that can be your channel name say that when you listen to my music for sure you say that now but you'll regret it i'm excited to listen to one of the tune at least maybe after this live we'll do that now okay great and uh so so currently you are in the java stack right in fact the i started my career with watching your videos uh on spring and other technologies especially southwest jsp i forgot to mention that as well uh so when i was learning jsp specifically jstl i'm not wrong uh so i love the content so apart from java so you are into java what what else you want to explore in coming in future i've been doing a lot of javascript as well uh i do full stack development so i've been doing front-end as well i seriously got into angular got pretty good at it but after a while like somehow stopped because work switched to a different direction uh these days i mean playing around with react uh i'm also playing around with the jam stack um so it's um it's pretty interesting it's it's javascript and then um i don't know what a ism is markup so basically the idea is you you make static websites and you use uh javascript to make it rich functionality which is which is pretty interesting you don't need a huge full-blown server uh running and serving your apps all the time you just stamp out multiple copies of your html pages and then you have a static site ready to go for your whole app it's pretty cool oh okay that's that's amazing it's xaml right api yes yes thank you javascript api and markup so you you write you start with markup files and then um you use apis to provide functionality and then javascript runs on the client side which which provides that to the users that's amazing yeah that's amazing in fact now since you mentioned javascript uh you know uh i did multiple projects initially when i started my career and then i was supposed to use everything because of course when you work on a project you can't skip technologies but the moment it comes to education with the moment it comes teaching i never touched front end so i used uh all the front-end technologies while i was making projects but not for teaching because i i never liked any of the technology that i will make a video because it takes you know it needs passion excitement for the technology to make videos so when i started with javascript in fact i started making videos for javascript again i scrapped it because it was not something i was enjoying so i don't want to post first three videos and say hey that's it bye bye so how do you keep motivated to work on front end as well or do you really like it that's why you're doing it or it's something you want to have it uh for yourselves i do i do like it a lot uh i i totally get what you're saying uh front-end technologies have a very sharp shelf life you you know if i remember to make a video today uh like six months from now people will be like oh this was six months old so it's probably not gonna apply they're not gonna watch the video it's it's that it's that fast uh but the thing that i like about front end is that it's more immediate it's more responsive like you can you can build a user experience and see it right so as back-end developers you don't get to see the result of your uh work right your result of the work is like a json object which is not which is not very exciting to see but if you build like a full application end to end and you actually see the ui it i don't know it's it's a very satisfying feeling that's what i like about front and i understand it's not for everybody but that's what i find appealing about front-end work so in fact i was talking to one of my colleagues last week and then we were discussing on the same topic about should i start making videos on the front end as well and then she mentioned she liked my spring course which is on udemy the only thing she didn't like is the front end so i was teaching spring and then the moment you know you see the output it's on a blank screen a wide screen where you can see the text that's not something people enjoy right so i'm thinking uh maybe from next week i might uh i want to but uh due to time constraint i'm trying to upload videos on javascript let's see if that goes well i wish you the best good luck thank you so much so we've got cyanide party who says ipl dashboard by koscheck really good series for react and java in fact i have that's amazing series akashic i was just having a look on that day thank you and thank you sign up and i think we should be taking the questions now sounds good okay great so someone asked the question i just it's it's very difficult to keep a track so let's start with this question uh kosher this is from naresh and the question is difference between api gateway and a unica server i guess before this question we have to first have a very basic question which no one is asking here what are microservices what are microservices i'm just going to plug my video i have i've made a video on microservices on my channel just go watch it i explain everything that well okay i'm going to try and give a brief one-minute explanation because microservices is it's hard to define it it's the idea of having separate apps breaking down an application into separate apps and having them be standalone independent apps but they work together to farm a bigger cohesive app for many years the default practice has been you want to build an app you take a code base you get like this deployable thing you deploy it right it's always been that one-to-one mapping but with microservice you kind of break that and you say okay i want to make an app but then there are like 10 different apps that i need to build and they all need to work together to provide the service that we want to give to our users so that idea of breaking that down into smaller services is called microservices the term microservice is a little bit misleading because you tend to think it's too small micro is like oh it's very very small doesn't have to be very small it's like having that distributed system and you know separating the responsibilities is really what microservices is but that's amazing it's difficult to put a technology definition in one minute right yeah very much true okay so in fact you know everyone you can actually join this live session you can come on this print and you can ask the question the way that the way we did last time so i'm posting a link in the uh chat window and you know question it's very tricky to manage people and then i don't know who will come up on the screen and give bad words so well i promise i'm not gonna give i'm not gonna say anything uh rude or uh bad words i think i don't know i i hope i'll try my best yeah please join that wait uh so we have another and the question is uh okay we have seen this question but let's answer the difference between api gateway and a unica server yeah naresh api gateway is a concept and an implementation that you typically need to have in a microservice eureka server is uh actually an actual implementation of that concept okay api gateway is a concept it's basically like a a gateway to let calls into your microservice ecosystem and eureka server is one of the several technologies that you can use to implement an api gateway if that makes sense oh perfect perfect uh i have another question which is actually my question as well okay so this question is from shubham and question is i have experience of spring mvc i have learned spring boot what should i go for next i'm confused is microservices very hard microservice is not hard the problem with microservice is that there is a lot depending on implementation how you implement it up to springboard right starting with java starting with programming up to spring boot there's always a right answer right you got to build something that is the way to do it and this you know you have small variations but then roughly it's about you know you do it in a certain way you get a certain output but with micro services there's a lot of variables involved okay so you're building uh springboard applications for an e-commerce company but how you design it really depends on a lot of other factors what is the scale what is the team size like how many autonomous teams are there what is the peak traffic what is the budget that you want to set for the cloud there are so many questions so many variables and your micro service architecture is going to depend on the answers to those variables okay so if you have two big teams the way you would design it would probably be a little different from if you had like 10 small teams okay the cost will make an impact are you going to deploy it on aws or azure or whatever else like what's the budget you're looking at so to get a point where there isn't a right answer as a developer and as an architect what you need to know is okay what are the criteria and what are the decisions i need to take for those criteria that's where things become a little bit tricky and contrasting with you know the single monolith programming where you just do one thing get one output and then you're done so that's the tricky part about microservices uh and a lot of it comes from experience so i would say if you're comfortable with springboard kind of get better at it learn the associated technologies with springboard because bring is an ecosystem there's a lot of other technologies and uh go work for a company that uses microservices so that you can learn from experience see how experienced folks do it and maybe pick up learnings along the way um that would be my recommendation yeah in fact that's very important right once you learn it's it's important to implement and the moment you implement on your own machine you don't actually understand what you're doing so you have to actually work on the enterprise project to get the gist of it how things works out because if you if you work on your own machine and if you are taking your own use cases it might not be the best suited use cases for microservices and you will think hey you know let's build one of the application which is which works much better than this one but enterprise are different requirements and they do it very efficiently absolutely great uh so in fact you know koscheck's the last time when i went live and then someone asked the question on microservices that's that's why we are going live today and the person is saying let me just pick abhishek on the screen so he asked me the question on microservices i thought hey let me just get some expert oh i know we are not experts in any technology but we'll try to answer hey naveen i am kosher big fan of both of yours and i think the moment i got this youtube notification that you guys are going live i immediately joined so this is like yeah it is a great opportunity to be here and discuss these questions with you guys really appreciate whatever you guys are doing thank you for that so my question for project is uh so as we know previously we really landed from monoliths to microservices architecture i think a decade ago everybody was in monoliths and then the journey started when folks started going into microservice ecosystem so what i feel now is the situation is every company has got their own microservices so if you consider large retail or large e-commerce company let's just take an example of amazon they may have got around 50 plus micro services so if for such a huge organization which has got tons of tons of micro services and if new developers in the team join uh they need to build new capabilities uh as an api or endpoints in the existing ecosystem of microservices then for those developers who are really new to the company who are really new to the projects etc etc how do you enable discovery of these micro services given there is really a jungle out there there are 50 micro services thousands and thousands of api points so how can as how can i as a developer can go and identify okay these are the end points which exist already so i need not develop this again so are there any tools available in the market to do such things or you really need to build something of your own to get the sort of helicopter view for this jungle of microsoft that's a great question um thank you for thank you for asking the question and thank you for enabling me to show up on the channel if the credit goes to your question then i definitely appreciate it and thank you back um it's a it's an interesting question because um i feel like that is a problem no matter how you do this okay imagine we are not using microservices and it's a monolith okay how would you know what services to call in a monolith and what apis are available right it's the same it's the same problem it's just that it's it's showing up in a different way but it's the same problem uh a lot of it has to do with the the culture of the company it's a it's more of a people problem so it's basically how how well documented the code bases how well documented the apis are the other thing also is that one of the advantages of microservices is that smaller teams get to do whatever they need to do okay so it's like you have um if you were to say monolith is kind of like a jungle um micro services are like you have smaller pockets of teams in small small villages and they just go talk to someone else in another village only when they need something from that village right otherwise they are self-sufficient in their own thing so if you were to join amazon as uh in the payment processor team and you have to do something with payment processing you know that the code is maintained by your team right it better be maintained by your team you're doing payment processing work you should not be talking to somebody else that's that's your team's concern if you're uh if you need to call api from the shopping cart you know that there is a shopping cart team who's going to do that right the api boundaries and the team boundaries um kind of align you you must have heard of conway's law right they kind of match and that is the first clue that i would i would take like okay i need an api which team is very likely to be working on it so let me go talk to that team so i would draw that parallel to identify it but otherwise i would say it's a common problem independent of microservices whether it be a monolith or a microservice you always have a problem of finding out in a big organization who owns what and it's a bit of a people problem that you'll have to solve no matter what yeah i mean in my organization the problems that i face let's say there are a lot of api endpoints are available there are good api endpoints that are available and if i if i'm a consumer of those api endpoints by any chance if i'm building any sort of administration tool any sort of dashboard and i want to use those apis i need to do so many communications with those guys those teams understand the request response structure and whatnot just to get a good hold on the api so okay yeah there are there are a few uh documentation um tools available if you use something like swagger are you familiar with swagger right yeah yeah um so swagger and i'm gonna explain a little bit for the sake of the audience so swagger is a way in which you can uh you can add a library to your api and then the library detects your rest api endpoints like for example uh yeah uh thank you m ram kishore that's exactly the right so you uh it exposes documentation automatically right because people can look at a spring mvc controller and know what is the request and what is the response right the tool kind of prepares that in a nice format consumable format one of the formats is uh html so you can load that in a browser and see that you don't request and response you can even send sample requests and responses that's one way you can do it that is when you know what the api is and you need to know learn how to use it right you don't even know what the api is that's a bigger problem and that's where i talked about it being a people issue yeah right yeah i think for large organizations there are so many hybrid categories half of the teams are writing their specifications api specifications it's ragged half of them are writing it in drama and half of them don't really write anything any sort of specifications so that's where you'll really land into problems and how to do that to enforce communication just to solve the problem and but thank you appreciate your response thank you thanks for asking uh the thing about um microservices and you know there's all this buzzword about autonomous teams right teams are autonomous they get to do whatever they want that's uh not always a good thing like for example in this case if all teams are doing whatever they want it becomes a mess to work with each other right so you need some kind of consistency but then at the same time you also want to enable teams to do uh what's good for them that's a it's a balance it's a balance okay so we've got a question here uh question which is what's the swagger alternator swagger alternative i remember i was using this one thing which really sucked i in doesn't come to mind there was there was one which was bad i have only used swagger i haven't used anything else um i'll see if i can if i can find it and maybe post it uh as a comment to this video later but i haven't i haven't found a lot of alternatives here in fact i only heard about swagger not other technologies maybe i don't even use swagger much that's why i don't even search for the alternatives when you have the best one why to look for other one yeah i i see a couple of people mention about uh postman and fiddler those are clients those are not documentation uh tools those are ways for you to send api calls what swagger does is not just make you allow you to send api calls it documents the api which is the primary use of swagger you know sending api calls is just one of the side features but the main feature is seeing what apis are there and you know what to send to them right great in fact someone said navigate silent of course right when you have an expert on the panel why i would say something my job is to ask questions that's it in fact we got a super chat here from john and the question is okay so john is using searching's photo as the dp that's great uh so python django was a springboard developer uh i don't know um it depends on what what language you already know john what what are your skill sets in addition to being uh the world's best batsman uh if you uh if you already know python then django would be your best bet if you know java then spring boot is your best bet the thing is with python what i've noticed is it's not that prevalent on the server side uh if you're going server-side and building like microservices are back-end apps you have more scope with java than with python if you're going python route you might want to go somewhere like in the data science side or the ai side not so much web apps and server side so because of that i would lean towards spring boot but go with what language you already know i hope that answered the question yeah right that answers uh there's another uh is it called open api by any chance uh check the alternative for swagger someone said on the chart i i don't know i don't know enough of it to comment so no no no no no uh so yeah so i forgot to thank uh to come on the screen uh he just left there let me get another guest uh and uh and the guest is mother sudan who is also a youtuber who's also a trainer namaskar uh hello sir hey hi uh just to give you a brief cause check uh you you have written a book on java 11 right i forgot the book number there was a number uh you're asking me yes yes yes yeah yeah yeah i've written a book in java nine uh germany and then uh the removal of that book was mandatory yes and mother is a mutual architecture databases manage data is the trickiest part of microservice architecture usually the ideal scenario is you have separate databases for each microservice and uh is it stored on a single databases or they are hosted on different servers um the way you split it can depend on what your uh what your appetite for distributed systems are you can say i want to put everything in one server but just have separate schemas that is fine uh you can have separate servers and put them in separate data centers you can have that partition different servers for databases might get difficult it is better to again the scope and the expansion of application besides that whether these databases will manage yeah it depends on how much of granularity you want see the whole point of microservices is have clear boundaries between services okay you need to know that if service a is calling service b it can only be via this this or this channel not through anything else having a common database is going to break that promise because one service can insert something into the database and another service can kind of get the data from the backend and you're not following that contract right so you basically have coupling in microservices without even knowing it right that's the reason why they say you separate databases out if not have separate servers at least have separate schemas or at least have separate uh i think some some databases have like table table spaces or something like our name spaces where you separate out tables it's on the same schema same server but you separate it out so that you know that a single data element is not being read by two microservices or written by two microservices just to get that separation so that is a recommended way of doing this but the problem with data is most databases are relational databases okay that's the key relation everything is related everything is tied together this table has a foreign key to that table and that guy has a referential key to this guy so how do you separate it it becomes more of a challenge when you have a monolith and you're trying to move to microservices the biggest pain that i've had in my experience uh building microservices is the data how do you split the darn thing so that's a challenge but different people tackle it differently they kind of gradually start moving data gradually create a new schema it's how you want to do it is upload up to you but the idea is have clear demarcation and not have two services read or write possibly read or write to the same table or the same row that's the idea lots of thanks for these insights it was really helpful for me as well as someone who is uh ms architect thank you thank you for that thanks for asking the question oh thank you so much thank you great uh i know you're tired so there's so many questions so many things oh no no no i can't i can keep going i'm loving this i'm loving this i'm happy to answer questions oh great so we have another from utkarsh and the question is it's been six months now uh working in service by service-based company with a primary skill set being java full-stack developer how can i get progress further in my career maybe the same thing was there with me when i started my career i guess there is it's a common thing that you can do to get progress uh in your career no matter what stage of the career you're in and that is to be mindful of your your career trajectory and your learning trajectory be mindful and conscious of what you're learning and what you're improving and what do i mean by that i spent my first few years of my career in the service industry as well i started my career in tcs and then switch to infosys very popular names and very common modules of employment and allocation of work in these companies you are treated as a resource right somebody who can code and then your people are going to search for projects and they're going to fit you wherever it fits right the optimization that the company performs is to make sure that there is as minimal people on the bench as possible right if somebody is not working then it is a it's a liability for the company right so they want to put as much as they can so since the optimization is happening from that perspective it may not always be in the employee's best interest i'm not saying that they're going to ignore your best interest but when there is a balance it's going to lean towards companies best interest than yours and it stands to really i mean it makes sense right why would somebody why would a company sacrifice their interest for the benefit of the employee it has to be a win-win so as somebody who works in a service industry i would say be conscious of what your learning path is and where it is going okay so if you're not happy with the project that you're in or if you're not happy with the career trajectory that you're going in so far then see what you can do to change it okay let's say you want to be a java developer a java full stack developer and somebody puts you in something which is not related to your career path speak to your manager see if you can find a way out okay i mean there's always a way out you can quit the job and go apply somewhere else if you're good at your at your skills that's what i did yeah well there you go so um that's what i would say uh have have a clear idea of what your career path should be what your learning path should be make sure you're good at that because if you're not good at that you won't even have leverage there okay make sure you're good at that and make sure whatever course your service company service based company is taking you through is aligned to your path if it is not speak up and and call it out oh great great in fact uh that's what i did when i started my career i was into a project which i was not enjoying i had a word with my manager he said wait for six months or one year then we'll give you the project which you like and then the problem is if i wait for one year i might not be in the sync of with the technology which i which i loved so i moved i moved to different company yeah yeah great uh so we got a question from abhi now it's not a question but it's a super chat and says from my first salary small gift to my gurus uh okay so we know the amount which you sent only goes to my channel so so maybe koscheck we will we will distribute this later no that's that's fine that it's the thought that counts every now thank you yeah yeah right thank you so much abhinav uh let me just get nikhil on this twin sorry for that hi nickel uh you're not audible i guess you are a nude so i've admitted you no you are still on new testament is still on mute yes yep yes you're already hi nikhil hi kofi how are you i'm doing well for you yes sir yeah how to get a software engineer job in usa from india tell me about your journey uh i didn't get a software engineer job in the us from india so um i wouldn't be able to answer that question um i would love to talk about my journey in a separate context the thing is i i cannot say this as an answer to this question because that will somehow imply that i'm recommending you go with the way that i went okay a lot of what happened in my life is just circumstances it just happened at the time and then as a result i was kind of like going with the flow a little bit there okay uh that will not apply um for everyone and a lot of there is a portion of that which was which was very traumatic i hope that doesn't apply to everyone because it was a very difficult situation that i had to get out of okay so um that's the reason why i don't want to get into my uh my personal journey as an answer to that question okay uh what i can tell is um with the kind of companies at least the kind of product companies that are that are coming up in india and they're becoming really popular in india i would question the need for getting a job in the u.s like why are you looking for a job in the u.s is it because you want to work in a company with that kind of a culture or do you it's not the company and it is more of like you want to work in a physical location which is the us and the company culture doesn't matter because if it's the company culture you're not going to lose out on a lot by working for one of the uh you know global companies which is already in india it's pretty much the same culture i'm not talking about just us based companies all of these mncs they make sure that their company culture is consistent across different global locations okay so if your location if your choice of a job in the us is just coming to the u.s then i i don't have an answer for you i hope that makes sense i can give you an answer but this is the best i can do thank you thanks yeah thank you otherwise you can just do your ms in us that's what my friends did they completed the graduation here they went to u.s for completion of masters then they got a job they got a job there and after a few years they came back to india yeah ms is a little uh i don't know it's a little tricky right now with the pandemic so uh if you're considering that also watch out for the impact of the pandemic that would be my advice yeah right yeah that was great thank you for your suggestion thank you thank you nico thank you we have alok who has a question on microservices so let me get alook on this screen ah look you are on mute uh sorry welcome hey look hey yeah how are you guys yeah so like i am a beginner in microservice and i have a like a decent knowledge on microservice the only case you know where i uh failed to understand things in microservices on a security part so uh like as a micro services they say like it is a a stateless uh basically uh so like how do we maintain the user uh you know information across uh the micro service consider like you have like 10 micro service and like uh user microservices one but we might need uh information in uh like some service uh like you know so how do we maintain uh the information across that um that's a great question that's a great question can i ask can i ask you to go on i'm hearing my own um yeah thank you so um that's a great question because um with the monolith it is obvious that every every part of the application needs to know who is logged in right there has to be this state and all these different services talk to that state and like okay i need to fetch user data okay for which users there's always that context behind it but with micro services there are two ways to approach this right first is to carry that information everywhere via a stateless protocol like oauth okay uh are you familiar with oauth i see you in nodding your head so uh oauth is one way in which you can carry uh logged in information or state or state about authentication throughout these different services that's one way to do it right every service that talks to everything else carries that what token with it and that gets propagated throughout the system that's one way the second way is to say i'm going to maintain state for only the services which actually need it and let's say there's a certain service which is um which which truss okay let's let me put it this way so you have uh like you're making a call to a web tier and that web tier is making a call to service a to service b to server c okay service a and the web tier and service a knows that you are a look you have signed in and you have an authenticated account service c is doing something a little low level okay it's basically getting i don't know um let's say product information or something like that i'm using an e-commerce example okay it needs to know it needs to send that information for some service that it trusts but it doesn't need to know that it is actually a lock who's asking it it doesn't care who is asking as long as whatever is being asked of it it returns it's good okay it's returning product information it doesn't matter if it's a look or kashuk or naveen it just needs to send it so that service can go okay i trust service b so as long as it's service b who's asking this data i'm going to give it to service b so from service b to service c the user context is not being passed okay does that make sense so the the strategy is to use and propagate the user context only for services which have a different behavior depending on the user and for services where all it needs to do is okay is the user logged in if not don't bother me you can have that check up front in your chain of services and have the latest services not bother with it at all as long as the call is coming from b i know that b has taken care of it or a further down the chain has taken care of it so i'm just going to respond it doesn't matter who the locked in user is so that's another way of avoiding having to propagate state across yes please yes please so like uh if you thought we go with the second approach don't you think i mean it will be a performance issue uh being like a straight uh full approach um second approach you see an impression [Music] it is like you were telling about uh uh a property propagating user information using that process this is first process second thing is you making the micro service estate with the help of uh you know passing the user context uh like that so basically on the second approach don't you think it will be a performance issue yeah no i'm just about uh so the second approach i'm not saying user context is being passed the second approach i'm saying the user context does not need to be passed for services which doesn't need it okay so for for a shopping cart service the shopping cart service needs to return the shopping cart for a look so it needs to know it is a look who is logged in right but let's say there's another service which requires that somebody has to be logged in it doesn't matter who and the data doesn't change that thing doesn't even need your context in the first place right it doesn't care if it's alok or naveen or kaushik that's what i'm trying to tell you for those things the context doesn't even need to be passed so you send the context only for services that need it and for services that don't need it it only does this based on the trust of the calling service it's basically like okay the service b is calling me and i trust service b so i'm going to return the response i'm going to assume that service b or service a or whoever has done the login check and it wouldn't have called me if the login itself hadn't passed so as long as the call is coming from b i trust it i give it the response i hope that makes sense so it's not the context isn't even being passed so you optimize on that thank you oh great so that was very technical at one point i lost i lost the communication okay great thank you allah for the question uh we have another super chat from a common man and the question is i'm a jar developer yeah developers are common people uh just creating mvc rest and soap even not spring board micro services okay what courses do i learn in usa as i got the h1b h1b okay the good news common man is that spring boot and micro services are all the same irrespective of whether in the us or in india or anywhere else in the world it is the same thing the same courses it really doesn't matter where you're taking the course from as far as what courses to take i have to put us you know you know shameless self plug i have a few uh courses on spring boot and essentially three series of uh courses on microservices all available for free on my channel java brains definitely check it out uh you don't have to pay a penny to take those things thank you i basically walk you through the process of building a springboard application and from there there are three levels of microservices where we actually build an app in the microservice architecture so i would recommend checking it out uh if you don't like uh my style of teaching you can you can pick up any good um i do i i have springboard videos oh yeah yeah yeah you should definitely check out uh mr telusco springboat videos as well i'm sorry uh you you you should find uh one of our teaching styles uh suitable for you so definitely go with whatever whatever yeah hopefully yeah great uh thank you common man for the super chat as well we have another question which is from akshay when to use service mesh in microservice uh you use service mesh when you feel the need for a service mesh and for that you need to know what is the need for a service mesh um the thing about the good thing about micro services is you basically have this autonomy right a lot of small small teams doing their own thing not having to rely on something else they're independent they're fast great stuff but the problem is there are certain common things among all these services which were not a problem in monolith okay but now they're a problem in microservices for example logging for example security stuff like that which every application needs every microservice instance needs now in the monitor you just implement it once just one thing monolith you're done but now you have 10 micro services you need to do the same thing for those 10 things right 50 micro services again the same crap for those 50 different micro services it's it's painful that's where a service mesh comes in where you basically isolate that out and have this one thing which controls how that cross-cutting concern or that side concern is implemented in each of those service instances so when you feel like the number of micro services that you have is too much and if you feel like the things you need to do for each of those micro services you are doing it again and again over and over and it's too much then you say okay i'm going to introduce a service mesh and i'm going to have that take care of the cross-cutting concerns oh great don't use service mesh because you want to use service mesh there has to be like a justification for you feel the pain because you add service mesh guess what that's one more thing you have to maintain right so um yeah cool huh okay so now next we have mario mario was there in the last live as well if he has a question oh can you hear me yes we can hear you hey hi thank you very much for for having me on again java bringing the goat right here um so i just i just had my my question so so i had one one of my friends you know he he got a job in fintech as a software engineer and so he was focused on javascript and like on the learn stack and then they came at him and they're like oh so you're good we love you also um learn java you know but now he's getting paid to learn java so what do you say now with like certain candidates right they're worried like hey man i'm learning javascript or python but i'm not picking up java and what is your opinion on like how the field the need for java is especially with companies like fintech they use like all this legacy software you know what are kind of things that people are ignoring that that people aren't really talking about in the in the space with java um yeah good question it's um if if some company pays you to learn something that's like i would jump on it that's awesome right our software industry is one of the few industries where that happens in most other industries you you are expected to know your stuff before you earn your first paycheck so if the company says hey you're good in javascript but when you learn server that's that's a great opportunity you get paid to learn but as far as learning java itself is concerned java is still the the number one choice for backend uh server-side development uh python hasn't caught up javascript has kind of caught up only because there's a bunch of front-end people now doing back-end stuff and they already know javascript so they're trying to improve the the back-end technology of java javascript to make it match java but even then java has a significant performance advantage java has a significant advantage in terms of being a good language for large code bases enterprising code bases with a lot of features like type safety and compile time checking and all that uh and also like you mentioned java has is an overwhelming uh you know choice for all of those fintech companies and all the companies that have large code bases have already chosen java so that's that's already there so one of the advantages of learning java is that you're in a good position to get a job in one of those hundreds and hundreds of uh enterprise companies which have already implemented java and they need java developers uh what you're going to lose out by learning java is that you're probably not going to be a first choice for a startup job or something which is going to go become the next uber or the next amazon in the year somebody comes to you and says hey what's your technology you say it's java they're not probably not going to talk to you again but apart from that the kind of the career course for java is more of those you know enterprise corporately kind of companies where you do your nine to five have a good work-life balance not too crazy about the latest technology it's a little more stable and um most of the times it's good pay if you're good if you're good at your uh coding chops it's it's pretty good pay so that's the career prospect of uh of learning java i hope that answered your question don't think no thank you very much yeah because you know isn't something that that just surprised me you know he's like yeah man these companies you know they still run on things like java you know super important but thank you for for korean and telugu thank you for having me on again thank you very much thank you so much mario for the question and that's interesting you know so when you have a perspective from the media especially this media can be an institute this media can be online youtube channels uh so example some youtube channels focus more on python focus most on javascript so they by default they have this tendency of blaming java for being a very bad language being a very old language they don't understand that python is older than java so it's just that you know since python is easy to learn they that becomes our first choice but when the moment you get into the enterprise market things are different there you know suddenly you are in python expert and then you go to the fintech company and say hey you know it's everywhere it's java everywhere here so uh so also to be fair the the you know the trend with python has actually started because of uh because of ai and because of data science python is popular because with those two technologies they came to the market a bunch of people who didn't know programming but who had to write code so they were just looking for like okay what's the easiest language that i can write code in and they pick python because java is a little bit overwhelming to somebody who's just starting so that's the whole reason why python is popular in that space and once people learn nf python to realize the limitations of the language then they're going to be like okay we need something better but for most people it's like just get the job done they use python and they they're done with it uh i'm not i'm not hating on python by the way it's a very good language it's just that uh it explains the this is the reason why python is popular in those areas it's beginner friendly all right so in fact i have videos so like we can't say bad things about python [Laughter] great so we have a super chat from ajit uh and the question is suppose uh suppose one of one out of n numbers of microservices is failing or performing slow or not responding so how to manage that well you have uh something called circuit breakers which allow you to um to switch over kind of like circuit breakers and in electrical circuits yes thank you for the answer yes so what you do is you identify what service is actually not responding the thing about micro services not responding is that it's it consumes resources so your service a service b a is calling b now b fails for some reason okay service a who's calling is not going to get an immediate response so we say sends out a call waits till the time out it doesn't get till the timer only then service a can say okay b seems to be down right now the problem is when there are like 100 requests per minute happening 100 requests per second sorry happening and all of them are like a to b all those 100 requests are waiting now what happens there are 100 uh threads on instance a instance which is just waiting it doesn't know that b is down it's just waiting for whatever is the time or duration this is going to block and it is going to consume all the resources and a cannot take on any more okay a is going to be like hey hang on hang on i sent 100 requests to b it's still waiting for a response so unless i get a response i can't do more so that's where you introduce patterns called circuit breakers which which sits in each of these micro services when this in this case circuit breaker at a is going to go okay i send these many requests you can configure this and like none of them returned a response so i'm not going to send more requests to be like an idiot i know i got my i got the message b seems to be down so i'm gonna do uh a mitigation step the mitigation step could be spin up a new instance of b r send a fault response back and say okay b seems to be down i'm going to send the safe response it could be an error message it could be a default message whatever it is you handle the failure that way oh that's a that's a great thing circuit breaker yeah cool in fact you know uh cause shaq so i was just checking the youtube video and uh so i normally we do get good number of uh views and likes but in every live have some dislikes of course we have some meters as well right but this is the first line where we have a lot of likes and now just now we got one dislike but it was all likes you jinxed it you jinxed it now and somebody had it just like just because you mentioned it yeah sorry whoever didn't like it yeah sometimes i know by mistake they click on dislike button instead of like button and make sure that you also subscribe the uh java brains channel forgot to mention that before with that let me just pick up another question from anurag a very common question for me as well what do you uh suggest to learn for a ten plus years experience java guy working in captive bank in india to serve another 10 15 years from now um what are your current skill sets like are you working on um back end you say java so i'm guessing it's back in and some kind of a web application path uh in that case i would say microservice is your uh next best step uh if you're interested in data you can also go the data science route and of course if you're interested in management you can go that route yeah um i think if you're 15 years yeah hopefully it's not gonna result whatever option is not gonna result in a lot of tiers but uh i i would say it depends on what what interests you if web development is your interest there's not a lot of scope in just a monolith you would have to branch out to microservices or try and build something scalable um that would be my recommendation are if you don't want to build a web applications i would say something more like uh you know either the data science side are some some uh data systems maybe like a messaging system or some kind of a distributed systems like we specialize in kafka or specialize in um you know handling large amount of data big data that would be a good next step basically what interests you and one solution for myself as well you can also look at blockchain for the back end maybe since you're into java so you can look at coda so you can write blockchain applications in java so you don't have to learn the entire new language maybe a technology and it should be good uh great so let me just pick i'm not sure if carlos is there in the stream from a long time hey carlos you're there i've just added you to this screen if you're there you can unmute yourself and you can show your face as well hello hey hi hello that was a funny voice coming behind ah sorry that was uh mario i was just speaking to him in the background okay you're still speaking mario you uh we can hear you from from the speaker of carlos oh sorry let me turn that down yeah carlos any questions for the koscheck on any topic uh no not okay just here for to enjoy the session yep um i will say that no i graduated a boot camp and yeah i mean yes that's it oh that's great that's great thanks for thanks for joining being there in the in this stream carlos yeah sorry i was expecting to get get on it no problem i love to give uh surprises to the journeys here great uh thank you so much carlos uh let me pick up some questions so few more minutes uh check i know uh it's been a long day for you no no worries i'm good okay i'm just picking some good questions yeah and we got it here so this question is from nikhil can you suggest one good book for micro services end to end um there are a couple of recommendations i would make there is one which is theoretical and one which is more practical and code based the theoretical one is from monolith to microservices let me see if i can i can pull that up so you can communicate the name of the author as well so this one's uh more theory and uh it kind of talks about the journey of moving from um from monolith to microservices by sam newman okay um s-a-m-n-e-w-m-e and i'm gonna type that in the chat yeah that will be great can i do that here do you know let's see which chart you're referring to uh the okay here the stream yard or yeah the streamer one let me see if i can type that here uh from monolith to services is that a mechanical keyboard yes it's the keyboard yeah do you love the sound that's the reason why i have it i i love it i love it i wanted to buy one uh but then in india we don't have much of the options so we we have some from tbs which is a very mechanical you know it's typical uh government type mechanical people yeah and the other one is not from the branded companies i'm not sure how long it will work okay yeah so you know by any chance you know after this pandemic if you're coming to india that will be nice i'll get a keyboard for you for sure yeah um so this is the one from monolith to microservices by sam newman i hope everybody on the chat sees this the the practical side i would uh i would recommend um the cloud native springboard i think with josh how many of you folks here know josh long he is uh he's an amazing um champion of spring boot so pick up any of uh josh long's book i think he's written something called cloud native uh java cloud native springboard uh which talks about how you can use springboot technologies and build it in a cloud-native way so this includes things like uh all the associated patterns like service discovery fault tolerance uh distributed logging distributed transactions all those stuff so i would recommend you check that out sure i heard that in the only problem is i don't remember the name of the authors i need to check that i read the books i remember the book names but not the author names authors aren't the stars right it's uh it's not like you move you watch a movie and you remember the stars the authors are always doing the background work you're right right that's a good advantage of being on youtube especially when you show your faces example initially when you started uploading videos uh i never saw your face you know there was always a mystery how you look like yeah we i have seen your dp uh but that's like it's that's a very old photo in some party yeah but then the moment you uploaded your first video with with your face that was interesting you know yeah yeah it makes a difference yeah it also sometimes seems like a distractions like you're you're here to learn springboard why do you want to see my face but i learned to overcome that that was the reason why i wasn't showing myself but i learned to overcome that because this is like a personal connection which helps right right and maybe sometimes see i feel we have different types of learners some people want to be very technical they want to just i mean every word which you speak they want it to be technical they don't want anything extra and then there are some people they want to go in a flow they want to enjoy like a movie because the other otherwise they will get bored and they will just leave it yeah and then there are some people that just hear because someone is asking them to do it for them it's very difficult to keep them on the track so father for them i guess face works animation works i'm trying that but then some people don't like it the moment we the moment i show my face they say hey why you are coming in between we want to see the code so everyone have a different perspective and i'm here to cater that audience who are who want to learn technology but they are also uh not very technical so it's actually difficult to manage that uh you know to have that balance or you have to be yeah you know as you say you can't keep everybody happy all the time there's always be someone who wouldn't like whatever whatever you do so try here we try our best that's about it sure true true we got another question from varish uh viresh and the question is microservices versus microsoft and i've not heard about that one that's uh that's a great question so um micro services is the way in which you can um split the application on the server side or at least that's the perceived uh definition for it okay when the microservice conversation started was supposed to be like a vertical slice now think about how that application is built in the monolith either front end the meteor or the service tier and database right you had uh a front-end team like the front-end guys who work on the front-end you have the server-side java you know back-end folks and then you had the database folks that was how things were sliced up but when we said okay we're going to move to microservices and we're going to take you know portions of the app and have different teams work on it now you would expect the cut to be all through right you you basically take one portion of the app so you get a portion of database portion of uh the backend and a portion of front end right that's how it's supposed to be but it didn't end up happening that way it's still like a lot of companies do microservices and they still have like a front-end team separate and they do their own thing which is possible now because there's a rest api communication that happens between the front-end artifact and and the back end and you can almost think of the front end being its own micro service you know it's its own thing but if you were to split the front end into different teams or you want to bring that separation of concerns to the front end as well then you have a problem because unlike the back end where you really it really doesn't matter if you're deploying one server or 10 servers you're just making an api call in the front end it is one page that gets loaded in the browser one single page application that gets loaded in the browser how do you split it how do you have multiple teams working on different technologies and have that happen well the answer for that is microfrontence what you do is you take portion of the app or the portion of the page and build it with one technology you take another portion build it with another technology and your frontend page is going to lower all those different pieces of front end built by different teams in possibly different languages different technologies not languages always javascript but different technologies and then they work together and even communicate with each other that's the concept of micro front ends it's not as popular as micro services still a little bit like yeah i don't want to really do micro front ends people hesitate to do that but for people who do it and companies who do it well this is this is why they do it great so we have so we have solution from arpet uh koscheck make some videos on consistent hashing consistent hashing i've made a video on hashing i have a 10 minute video explaining what hashing is and how it works you should go check it out if you have seen it and you still want more uh details uh put a comment in that video so that i understand what it is that you're looking for right right uh so we have a super chat from bhushan and the question is how about salesforce over microservices developer microservice developer i got five experience in java development currently working on starts one or starts one is still there that was my reaction so um bhushan i would recommend um learning something which is uh a little more current uh salesforce will work but the thing about salesforce is its proprietary and when you choose technology which is proprietary you're limiting the scope of jobs that you can take on uh versus micro services which is useful irrespective of whether the company actually uses sales force or not okay i've seen a lot of enterprise shops where salesforce apis is one of the services that is used in the microservice architecture okay so having choosing microservice is going to give you better scope uh you would choose salesforce only if you're really passionate about salesforce and you already know some and you want to continue that but if you're having an even choice i would recommend micro services but whatever you do please please move away from starts one uh and i'll tell you the reason why i have a struts2 playlist where i made course on starts too which i think was around four years ago or four or five years ago and i stopped at that i started that playlist because nobody was watching those videos because struts2 was outdated four years ago okay four years ago starts to was outdated and now you're working on structs one after four years which should tell you how outdated the technology is so it's not bad it's just that it is not going to look good on your resume if you're looking for another job so i would i would recommend uh learning something a little more uh in news right now right so that was a shock looking at the number so maybe it's a mistake which you which you did maybe it's touch too which you wanted to point out on the on the text it's so it's a very old technology and okay so we got a question we got another super chat from reno very very common question is kosher you know everyone is experienced here and they they're looking for the uh other other options after five or ten years yeah so question from i know is it is it possible to switch from service based company to broadcast companies after 10 years i am good at java please guide me to achieve my target yeah it is very much possible to uh switch from service to product it's just that there is a small mindset change which is mostly after you switch jobs and the interviewing process is a little different as well it's more of like you know hands-on coding being really fluent in java so if you're good at java like you say then you shouldn't have problems switching um i don't know how i would guide you to achieve the target have you ever started applying for product based companies if you have applied and you haven't got a job i would say [Music] analyze your interview performance analyze and look back and see where you failed and go from there one of the things that i mentioned in uh in my live stream as well and i think one of the videos that i mentioned was have a data driven approach to uh job hunting uh when you apply for jobs make uh make like a collect the data okay uh identify what are the interview rounds that you attended what were the questions asked how you performed like great yourself and attend like four or five interviews see where you're scaling like okay this is the part where i'm i'm not doing well right i'm failing in the technical round or i'm failing to answer the question tell me about yourself that's a big problem a lot of people who are good at java will not be able to handle you know that kind of a soft skill question so identify where you're feeling more often and ramp that up that's how you would do better in any interview be it service or product that's what i would recommend start applying and learn from it oh great you know uh today i'm learning so much about micro services next time when i go live and someone is asking a micro service question uh i can really answer that but not new okay uh one last question from the chat uh and the question is since it is getting repeated let me pick that angular and react.js from kaushik what's that is it the question or the suggestion yes i guess koshik has both the series right angular city is also there i haven't i have a course in angular uh with react i actually tried something new i have built uh i have a series which builds an application from the scratch we actually build an ipl dashboard it's an ongoing series which is available on my channel um it's it's a full stack app with uh react on the front end spring boot on the back end we i show you the application built from the like i show you every line of code that i write and we deploy it on aws at the end so i take you through that whole journey so uh check it out if you want to learn react i'm gonna i explain along the way how the react app is built and why i do those things so yeah if you want to learn react please check that out right so i've shared the link of caustics or java brains channel on in the chat window just thanks you want to search it out okay great uh now let me just get some last guest on this screen uh for the question and then we are done i know we tried to answer most of the questions uh it's difficult to answer everything right so so i'm not sure is it monu is available on on the camera and santosh if you can get your camera on i can get you on the stream yeah mono is here hi hello say hi [Music] yeah i am four years experienced java developer and and i'm an early subscriber of data and um in my courses i'm working on crawling datas from messaging systems like slack and google chat like that and i'm good the data structures are not very good at algorithms as i was listening actually you said we can i'm very much looking to do that could you uh write some steps on how to move my carrier towards have car messaging system and big data like that because like uh i'm already working on running a huge amount of data from messaging systems like slack and data i'm looking to make a next step towards could you please guide me on this sure um so what experience do you have with data crawling can you can you elaborate on that so you're you're you're building a system which which consumes the slack messages actually i built a connector which actually uses the connector from slack and google chat to call the message with messages and files from data sources and brought those data back into our like cassandra and solar to show that on the vault like that okay okay uh so that's uh that's a good first step to getting into uh big data what i would recommend is learn about other uh big data technologies there are different ways of storing data there are different ways of sending data from one place to another different ways of processing data and transforming data right all these each of those four things that i said there are like five technologies to do each one of them and the the next step is to identify what are the problems in that space why you have all those different technologies and about that one thing i would recommend give me a minute yes read this book okay it's called designing data intensive applications this is kind of like the the original guidebook to any kind of data science related knowledge uh it's a very comprehensive book and it doesn't this is not like a coding book right it doesn't teach you how to code it tells you what kind of systems are available and why you would choose one versus another what are the challenges involved this is actually a good book for anybody who wants to get like a a senior role they're applying for a for a product company and you know a senior role uh the company the interviewer is going to ask you how do you build systems that scale okay so uh this is a book which explains about the choices and the trade-offs that you have because again for those kind of questions there isn't one right answer you're like well how do you scale well it depends on what you want scale and what is it that you're willing to pay as a trade-off right so it's all about trade-off so you the next step is to identify what the trade-off is where you need to make certain trade-offs and you know understand the systems there so read that book learn about different technologies to handle data that would be a good one yeah yeah sure and naveen i'm a big fan of this channel telescope because before two years when i was searching for a job i was going through your java tutorials right now i'm at our developer with us here's experience it was very simple as a professor it was uh you know we don't want to get too much into that technical so that we get you know it becomes too much technical to uh get frustrated with java so it was very clear after point of time which made me to get into this kind of jobs and thank you very much for the channel and thank you kosi for the day oh thank you thank you so much thank you so much thank you that does motivate me to make more videos at the start i was talking about i mean that phase of not making much videos but you know comments like this or you know when you mentioned that because the videos were helpful it does motivate me to make more videos so thank you so much for that sure right and be sure to if you come to kaminadu were making a meet up in hyderabad like that uh yeah there was a plan of doing a india tour for with for the meetups but then pandemic happened and now let's wait for the dynamic to get and we are doing the live the virtual meetups uh every week okay but yeah physical meetup once the pandemic gets over once everyone is vaccinated because the situation in india is very worse now okay let's say everyone get vaccinated let's the situation get under control then we can meet of course yes assume thanks yeah thank you so much one last question koshek uh before we end this live i know we are enjoying it i love to learn new technologies right yeah so question uh from how do you pronounce that name louise louisville blues can one of you please do a needed cryptography knowledge it's hard to learn and resources are rare uh do you have spring security content basics very basic okay uh definitely check it out uh louisville blues i also have a a series on spring security um it's a playlist on my channel um i do cover uh oauth i do cover spring security in in considerable detail i i build uh spring security with spring boot i cover both like uh user password uh way of authentication uh using oauth or jwc for our database so um yeah it's there check it out and again if that's not what you're looking for uh please let me know in the comment yeah and that's very important you know we do read the comments i mean it look like we don't reply at least when i'm talking about myself i don't reply to comments much but i do read all the comments and that's what helps me to select my next topic so when i know the demand we we actually work on that even if we don't use that thing in our technology in our projects now since it's a requirement we have to learn we have to work on it at least i'm from my side i'm not sure how koshik's approach for the new videos but uh yeah it's it's very similar i look at i look at uh comments but again from from my end it's a little bit uh tricky because i have a full-time job as well i just do this in my in my spare time so i cannot make all the contents that have been requested of me uh but i i try and i always uh watch your you know the comments that you post for uh ideas for what to make next absolutely yeah right perfect huh so that was interesting cause a lot of questions answered i know we are not able to do all because it's really very difficult to answer with every question uh but i enjoyed uh some for sure next time when i go live and there's a question on microservices if there's repeated question i can answer that if there's a different question then i have to again thank gosh jk i need you here please uh you know as long as you will have me back i'm happy to be here and answer questions uh very grateful for the opportunity oh that's great it's my pleasure to have you on this platform uh it's a lot of things to learn in fact i i do go to your channels often to see what you're what you're learning now which will which helps me to also understand okay this is something we can use it in the java.javastack so yeah that's great of course again thanks for being here again we'll connect maybe on your channel or my channel and we'll have fun thank you so everyone i hope you enjoyed uh hit that like button if you enjoyed write comments what next you want if you want kaushik to talk on some other topic on this channel let us know uh i will make sure that he is here i will ping him so that he will say yes i'm coming don't worry so we'll do that so yeah that's it everyone thank you for being there for one half okay so one hour 25 25 minutes that's a good one so that's it everyone bye-bye thank you so much bye-bye thank you
Info
Channel: Telusko
Views: 85,088
Rating: 4.9546485 out of 5
Keywords:
Id: 9eqrhe2XMbA
Channel Id: undefined
Length: 84min 49sec (5089 seconds)
Published: Wed Apr 21 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.