 So, so it's been there so technology we are in such a world like we started luckily in 1999 where we were trained on design patterns object-oriented analysis and design Java 1.2 1.4 and the JavaScript was naive and client-side validation Ajax was new and we all knew was XML XSLT and if you can do XML Transform that on browser HTML gets generated you're thrilled about it go to interview question They say XML what is down-passer? What is tax-passer? That's the first set of interview questions that we get it No, XML is nowhere, right? So now everyone talks about json javascript everywhere javascript now Python javascripts are competing between each other So I was loyal to Java so even though they give projects something on dot-net or something I will use something or the other in Java and Statically typed I was started in Emax editor then in move to Eclipse and then without that IntelliSense that is working. I don't want to write any code. That's why I became handicapped and Then javascript came and you're everyone started to move to HTML 5 javascript And I was stuck with Eclipse editor with IntelliSense all these javascript guys and Python guys are opening a notepad and then started coding fast So I was like oh man I was like from Emax to Eclipse and I'm handicapped. How do I write to Java script code? So 2010 I think the Haskeek Started and then HTML 5 conference was there. I was like a javascript Learner only written client side validation. I went to Kiran and then said what editor do you use? You know, I don't know notepad is a little scary for me and all that stuff. So they said notepad I'm fine notepad Emax and all that stuff. So Javascript there's no clear API documentation, right? At least Java you can open the API documentation know the method contract, you know this is So what I know is W3 schools no one told me about Mozilla developer network, which is the Nowadays I tell Mozilla developer network don't go through anything tutorials point W3 schools Everyone start doing it and then Mozilla developer network. They kind of forget it. So that's how it started, but now With Oracle acquiring Java and all the changes that are happening to Java I'm now very loyal to javascript Now javascript they are starting to put type script and all the Java players are bringing into javascript. I hate it So I normally like I stick on to angular one as well So angular because hangar six is statically typed with type script and all Java concepts and other things I'm seeing it. So we are happy with javascript the original javascript the original angular JS because it is dynamically typed And it's free of thought and you can turn out code faster Only thing is suddenly core dump will come but that is hidden by PM to that's what I'll be showing it through So no core dump to the user But in between you can see the error logs in the back and file that so many times it is crashed Why unreferenced variable some comma is missing some spelling mistake is there So those kind of things are there the problems that we are living with it So with that, I'll just explain to you like how javascript I'm convinced that such a Javascript can be used to think big in javascript in Java. We are actually building enterprise applications So be it for stock exchanges like a back-and-complete settlement System is all in Java with the all the integrations and web services that are there You've got enterprise application server So their whole thing is matured enough to handle all the components and framework that are there for enterprises So now javascript is all open you just go and search for javascript framework you get hell a lot of things Sorry to use that Okay, so now so increase tooling. So that's what I could see it from 2010 now I I got to see all the tools that are there that were there for Java is also there here We are using Maven for build automation. You have a handful of build automation tools that are there They've got J unit testing. They are J unit and all the J unit mark Mocky to and all that stuff but here you get complete set of tools with all the Mocha Chai framework Karma protractor and all this stuff on the UI so complete stack can be test automated So I got all the tooling support the Jenkins support Javascript based continuous integration So I can create a Docker image out of the Javascript based Application that is there. So I got a complete tooling support Then why not have a complete enterprise application built on Javascript So we need to see not just apps and tools on Javascript But you'd like to have high-grade or highly scalable extensible Enterprise grade application that should be built in Javascript. That's what my advice to all the Javascript community out here And our frameworks you have got all open source stuff You can assemble everything more richer language features object oriented and functional programming We play around with it right now. So you have functions you pass it around callback functions even callbacks So and then the object oriented stuff to make it modular and reusable. So So I could mix Java and functional programings and then get all the stuff Java 8 introduce functional programming I'm not Questioning or debating about my good old friend, but yes Javascript is there with rich language language features that are there And more reliable better programming server-side middle-ware has come now So yeah, if you want that error handling and exception handling You have to follow certain best practices can embrace typescript if you wanted to get into more reliable server-side code but yes, you can support both the Conventional Javascript as well as the typescript wherever the critical pieces are there where you want to as he mentioned defensive programming So either use defensive programming or go to typescript where it is more structured and schema driven stuff so with this So one of the things that the challenges we had was the development team was pretty much freshers right and it was one year Two-year-old and we had to have a training for them to build enterprise application So if I start with Java, then I would train one on middleware one on the front end one on the back end So but now when we choose a Java to stack So it's one single technology and no one is going to take over it I think because the web rules that so It's going to be as a business perspective So you can go and bet on JavaScript and build the expertise and the team around that and then have your complete stack on one single technology Now I have a team who can juggle between layers can work on front and once you can work on back back in I can work on Integration layer who can also work on the mobile stuff, which I'll also kind of highlight and introduce to you so all on one single technology and then training and now Ours is mostly like a student internship crowd that get converted into an employment So it's something like where the students also can be taught But nowadays if you see it most of the students which I interact with are dealt with C sharp and dot Java and Python they look at JavaScript like something like mundane stuff where the only HTML Javascript They don't relate to a Javascript as a server-side kind of a framework. They just look like website PHP Javascript That's all they think about in JavaScript So I would expect them to think more big bigger stuff do bigger stuff in Javascript So before I go into this kind of a presentation where I will be highlighting a enterprise grid application and the architecture which I kind of put there It is kind of correlated we can draw an analogy between this enterprise application to any other enterprise application The overall approach towards building an architecture and solving it it remains the same So what we are done is so we A higher education institution has got these distinct functions Right, you have to work with an education institutions to have a feeling for it I was working in mostly a corporate 18 years the last two and a half years with the education institutions closely the departments and committees are all very well Structured and well bordered as well They wanted that kind of a control to their department and admissions department don't they want the complete control of data They want the complete control of processes. They want the complete control of any innovation that comes to the process as well So similarly you have got students management curriculum design faculty staff management and so on peace collection academic administration Examination placements events grievance alumni hostel the list goes in on and on and When you build solutions for that Everyone asked me a senior management as we're not even going to go to market I'll complete this module that model. They say that no way it's going to go on forever and then that's So then we need an architecture which needs to be extensible at the same time integrated as well, right? So we need to have such an architecture Which is going to be extensible Scalable and you should have peak loads because all these modules have got certain peak loads where students only they pay The fees in the last minute, right? Admissions and applications they buy it only when the results are announced at that particular point of time Right, and then you have got examination the uploading of marks happened during the last day by all the faculty for all the students And then you have data which is cut across academic years and years and years of students data Attendance data the behavior data the events that they have kind of conducted You should ask the security of an education institution How many events they conduct because they lock the rooms and unlock the rooms they say that only 10 days the rooms are free Exporting Diwali and other Shankaranti and all that stuff. So every day there are events happening from every department and program All these data has to be collected and that has to be used across academic years for mining the information that is there. So then Finally they need website which needs to be latest trendy and all that stuff plus all the information that is happening inside Has to be reflecting in the website as well. So the complete solution. There is no PHP there People said website PHP and all the PHP framework. We said no, we wanted again node.js And handle bar.js to be the back-end template and then the front-end is simple J query and other plugins that are there So it's also node.js including the internal Automations plus the external website is all driven by node.js server and Around 15 microservices and plus the website which is going to be running on the node.js So and with only one machine till now because it's a very predictable load, you know, how much the user basis, right? It's 12,000 odd students and 1000 odd faculty and so that is the user base that you are going to cater to so 32 GB machine one single commodity server one lakh rupee that is all that is required and People from other cloud vendors like Amazon as your try to kind of tell education institutions to buy their solutions and all that stuff to get Kind of Dependent on that particular platform. There's a recurring cost that is involved, right? So you need to pay them every other day, but they get grants So why not put a commodity so if it has to be scaled only during those things you just scale the micro service Vertically and horizontally and spin off another instance and then do it at that particular spike load So rather than actually having a heavy server and then investing too much on that so So it's well-defined clear ownership of data predictable peak average workload that are there So you can play around with the environment deployment environment So when the workload is that admissions is done the admissions Iqo service doesn't require such a footprint, right? So a fees collection only when those fees due date comes in you can only have that particular higher-end instance for fees collection Right, so we need that kind of a scale up and scale down kind of a mechanism in the overall architecture But that should be independent of other functions, right? A student management is something that cut across is all the timeline So it's going to be like it's going to be a constant load But whereas the other modules will be having a peak load and an average road or downtime through which you can optimize your architecture, right? So Again, we have to cater to multiple education institutions. So engineering education Arts and science got medical college. You've got pharmacy Paul taking the different varieties of higher education institution Every other institution have their own schema, especially when it comes to student or curriculum or faculty and so on so you need to have a kind of schema list stuff and Now with UI framework that have come in you can build a dynamic UI, right? But the only thing that we wanted to avoid is a relational model for it So just because you know, you'll keep on doing relational model again and again and normalizing it So we tend to go with a non-relational data model for it loosely coupled because every other module has got a huge road map Like for example placements has got a huge road map So I should be able to have a dev team which is independent of other modules So that they can kind of innovate and then build modules or features it on top of every module that is there So admissions is again another one, right? There are startup companies which are focused on admissions application There are startups which are focused only on placement, right? But now what we are trying to do is one Single product suit which on JavaScript and everything is kind of isolated and independent but it integrated and I'll talk about how we have integrated so we can talk about rabbit MQ or API based integration and Distributed deployment, right? Sometimes they would like to say some of the modules can be on public Some of the modules have to be local, right? For example, events can be on public And then some of the modules the curriculum and other stuff They don't want to make it public because some of the things are intellectual property as well How the program curriculum is being designed? So an architecture which should be an agnostic in terms of deployment is also very necessary So in terms of it so some of the peak loads if you are not able to handle it in our server We can move that to a cloud or AWS or instance on AWS or Azure and then have that running on the cloud Remaining thing can be running on premise. So we should have a deployment environment Which can scale and then be cloud agnostic aspect So that should not be manual and that should be an automated deployment that should happen That's why we have leveraged Jenkins and Docker and then went ahead with the continuous delivery pipeline that is there, right? Another thing is education institutions are very concerned about recurring costs, right? Your total cost of ownership should be very less So you can't have a licensing cost that is going to come as much money. That's a gap You should try to get that right rather than giving it to some other software It's all you that's one of the reasons where everything is open source out here. So Rapid prototyping and when you are customers or scholars and professors, it's very difficult to convince them Because they are teachers, right? They are always right Customers are always right But you have someone who are scholars when they say that okay when you go as a vendor or service provider You are a student to them Right. So they say that okay do this and do that stuff and I need it tomorrow Okay, it's like an assignment giving it to you. Okay, so we'll do it So now we get a rapid prototyping something we'll do you guard inside So and then say download PDF and get a PDF that whether it's from the file system or whether it is from the It depends on the time, right? So but yes, so you need you have to work with something which is rapid as well as Fast prototyping that is required for them to see it in short. We can't talk technology to them They are scholars in their own disciplines. You can't go and then say micro services This is API driven. This is rest and that is graph QL and all that stuff They say that what is all that stuff they are talking my language, right? I want this screen I want this report tomorrow. I wanted to send it to some university. They've asked me to submit it. That's it So single sign on a cross-function. They don't remember they use a name and password remember, right? They keep the username password same and then because they are not computer savvy because I work with these kind of Education institutions where they are very much into still the registers sell the forms paper driven manual driven But they're very meticulous about it They write it so neatly software and it goes and then kind of renders of complete user experience UI UX guy designed it They say that my register is perfectly see this. I have used the scale I had drawn all the margins and then I put all the title the A3 size a double the A3 size and then they maintain it Now get me the report in your this small screen. It should be responsive in mobile also say and Yeah, such kind of stuff So these are a few challenges, but another thing is deadlines are real deadlines. We're working with corporates So your deadline is like, okay, sir. This is not working your QA is doing the testing and The testing certain bugs have come so we'll postpone it to some two three things are critical bugs Are there system will fail other ways? It will crash So they say the okay a stable system is very essential Please go and then release it after two three days But here it is like fees all the students have to pay it on the 10th of say January So your system has to be up and running. They'll say in my years One particular student was sitting around like your software was generating it in the wrong room In my 52 or 25 years of career. Never ever. I have had this kind of a scenario first of time And I put this software. I got this scenario. So so they are so meticulous about it So you can't make mistakes. It should be they expect an error-free software Which is really ideal and then it should be delivered on time before five o'clock in the evening I never released software before sunset To be very frank. I have opened up QA guy at two o'clock or three o'clock in the morning Hey, come on test my software and then release it because according to the process the QA guy has to do a manual testing And then only has to be released. So that kind of a process was there So we were always having this all this two o'clock three o'clock releases, but this is one thing that is there So now coming back to design principles right so So even though you've got a lot of frameworks. I Because we were brought and brought up with certain fundamentals and foundations that embraced Application design and I really use that whenever you go and then build any other fancy stuff, too There are this can be the single responsibility principle even though it's for object orientation class design and all that stuff You can define it and abstract in such a way that is applicable to architecture also at all levels So inversion of control dependency injection interface over implementation the fundamental principles which we have applied in our overall architecture and microservice Because it's highly maintainable testable loosely coupled. There's something attractive that is coming in excuse me. There's something really attractive Really wait. It's all start-up. I have certain starting trouble, but yes afterwards. We'll when the JavaScript comes in I'll really yeah, so loosely loosely coupled independently deployable Organized around business capabilities because here I don't have a bandwidth I don't have a reason to go to senior management To go and say my architecture doesn't work and I need to go and then redo the stuff They don't appreciate at all. So I need to be cautious at the same time need to be risk Taking as well. So we said our overall architecture. I can't change my pillars so and so for right I can change framework today. I can put angular tomorrow I can put react or view or whatever it is But my foundation should not change right then there's a these are the basic principles that one has to use it So when an architecture has to be first brought in so Yes, now comes Java script press microservice because we as a solution architect We don't want to give solutions, which whatever we know, right? We are not doing justice to what the problem domain is So you need to be convinced that your technology is going to really solve the problem And it is like a jigsaw puzzle where you assemble it and then keep it it should be perfect Right and so I'm convinced after seeing it working and seeing it You know extending into multiple other modules that javascript plus microservice can do wonders for enterprise great application as well Because the overall approach is divide and conquer right for any problem-solving technique divide and conquer works a lot Right, even if you wanted to climb up too many things you want to climb up step by step Isn't so a javascript and microservice will enable you to build all this stuff So I will be going through a typical microservice Front-end. I'm not going to touch that because it's very debatable Someone will say angular someone will save you someone will say react someone will say vanilla javascript, right? So so I'm not going to touch that you use any framework that is there because at the end of it it should be a good UX responsive design mobile first design and nice colors as Customer pleases and whatever it is give teams so that they can choose their own colors, right? So but I will stick to the back end predominantly a back-end service We have chosen MongoDB experts in Angular and Node.js. So this is our Foundation for every micro service. This is the stack All right, the UA alone changes Because the framework version keeps changing the UA sometimes material design someone will say that we'll put material design for some modules Because the audience is different for events. It should be jazzy for admissions It should be something else for a particular curriculum. It should be something else because the target audience is different Right, so maybe the UI and other things will change but the foundation still is MongoDB express angular and Node.js And we are happy with it. So we are using MongoDB native driver Because we are not using Mongoose because Mongoose is again a schema driven. It does validation and verification But when you have your complete back-end Then you have got an application layer if no one touches the back-end data directly Very ideal, isn't it? So it will always go to database and then change the data and then say, okay, it's working But yes, if no one touches it, then your whole validation verification can happen on client-side and server This is logic. So you can do away with the Mongoose validation that happened So our doubt layer code is nothing you have one single code and then that works for all the collections So you don't have to keep writing all the Crud and other aggregate queries for every collection that is there you reuse across all the micro service So our service code is the most simplest thing, right? You have to put an APA put some business logic that is there and then have your doubt layer Which doesn't change copy paste, right? I'll I've shared all those things in the has geek as in the GitHub as well I'll give you the link for it. So and then I'll go through a few things. So I'll have So this is the doubt layer my laptop to zoom in Apple Windows is good one, but I'm skipping it even though it is dead. I am just keeping it. No for moral boost And the thanks to a teacher for lending me is laptop. So this is this is a simple one But we are use closures here. So you just have to have this particular class and Whoever wants to use it can pass the collection name We catch it Fine. So this is all the credit operations. So it uses something called get collection name So you get the closure collection name. So who are wants to use it? So we can Okay, so this is only the closure all the credit methods are there if any doubt layer wants to use it so you go back and with the doubt and just one single Now so you just pass the collection name all the credit operations are there, right? So this is a doubt layer or a back in layer. So and then we also use grid FS. So you can go to Currently we are storing all the binary data or attachments out here and so it's a once download attachment or upload attachment and then you have got an attachment idea put that one and then you have the Rest API for downloading and uploading any attachment. So there are no need to write repeated codes for attachments at all So we use drop zone and for the front-end supple again So it's again reusable across all the layers wherever you want attachments. You just put this code It's going to work. So this also shared you can have a look at it. What is all tab equivalent in? I'm making it interactive like this. So what is all tab equivalent in Apple? There's no all no I used to mouse and keyboard Okay, fine Yes developers are used to all tab Control all day. These are the two keys that we use it. Now. He's telling shake it Okay, let me try it in the next slide, but yes So a doubt layer because we used generics in Java. So like you saw JPA and other stuff So you pass the entity which is relational entity and then the primary key data type so that the complete Set of credit operations and now is kind of automated it because you need a primary key type because get fine by primary Key is one thing and then you have to have the type of your Entity class that need to be passed so that all the credit operations can take an entity and do it in Java We just passed the closure and then MongoDB was happy to take it the next thing is Whenever we give project the first two screens that initially people are creating is login screen and user screen user management And that itself will run for two months All right, the project will start when the project is going to end for an internal so then luckily Unfortunately with all the OAuth and other stuff come in key cloak. I should have key cloak Namaste to it. It's it's doing wonders for it So why I'm telling is because you just don't you don't need to build any user authentication screen at all Very very simple. I'll kind of have a few screenshots. That's also shared with in the In the github so every micro service is a key cloak client and running on different port So what key cloak expects is something like a URL Which is the base URL for every client and you can specify client specific? Authentications that are required you can also specify client specific roles that you want and then you have users Associated with the groups and groups to the roads the login screen can be themed So doesn't it doesn't look like a key cloak at all right? It is your brand you can put it and then the login screen is really nice. It doesn't look like your other Third-party provider which has that other traditional legacy login screen, which you find it difficult It uses free market template for creating your login theme and then it is really nice. So We use one user realm. So if you want multiple institution, you can also have hierarchical realm as well Right, you can have multiple realms for each institution They have got support for even an hierarchical limb or multi-tenant architecture for also for the realm So for example, I got education station one two three all belong to the same Management you can also have different realms for each institution and have a multi-tenant that will work for all these people and They expose a rest API so you can create a user on the fly So you have a user which is created by the respective modules you have roles that are changed So you have a rest API through which you can go and then Contact the API and then create the user remove the user disable all the stuff So students discontinuing going out coming in faculty getting added all the stuff and then faculty moving from one department to another Department the role getting changed all those things are integrated with the system with key cloak as an API Key cloak also gives a JavaScript adapter both on the client side as well as on the server side So we can put a client side authentication We use angular key cloak and then tied on with the client side token based authentication And we also use key cloak server side API to go and then have your middle where Authenticating the user who is there so no need to build user screen at all So these are the initial friction that we had we removed it by using key cloak and let me shake fine Let me do my conventional stuff of escape button and And Yeah Good, so now. Yeah, thanks So now if you go to So now this is the Relate all the topics that I have got everything has got the presentation slide and the other stuff So you can go to off using key cloak And you got certain So you got login theme so you can set your own login theme So you can go and create your own themes and then you can attach it to a particular realm So each realm you can specify. What is the login theme that is there? So advantage is you can't access any of the application without logging in right? So you don't have to worry about I click on this check whether it's authenticated or not and all that stuff You don't have to worry about it at all You just have to put this particular plug-in on the front end and it will take care of ensuring whether the token is there alive Or not the other ways it will automatically redirect to the login screen and get it there. So there's one thing and So one is the theme part then you got client List so for every microservice you got you can see that this is the list of Clients that are there for every microservice and for each client You've got the client specific client settings that are there. This is something important where you can have client specific Roles and then you can say for this particular module these put a group has got these roles So you can associate them so we can go and control the authentication authorization at every module level So you don't have to write any piece of code for it So all these things are there only thing that we do is hide and show in the UI if you wanted or in the back End you can go and then check what roles are there for the logged in user you are done with it so So I'll leave it to you can go through them and One of the things that I also have shared is the code fragment which is there on the client side So what we do is we don't bootstrap angular on the upfront We first go to key cloak authenticate everything and then create that particular authentication tokens everything into a separate module out there and Again then use this particular module as a dependency into the Application module that is there. So it gives you a certain callback mechanisms for login when the token is expired when the token is kind of Refreshed and so on so you can here you can see it on all success where then you go and then bootstrap your module so you can go and then bootstrap it and So this is when you say angular element dot ready You go and then say angular bootstrap with that will document by that time the module is also Initialized with the token and you'll be able to use it. So this is what we do on the client side So this is how we have integrated the key cloak with the angular part and that's it So no need to worry about any other login screen You just have to pass certain credentials what user realm you wanted to connect to and what is the IP address in which the key Cloak is running only these two things are essential. So what is the client? So which is accessing the key cloak. What is the user realm or repository to which you wanted to get it authenticated? What is the IP address of your key cloak server? These are the three configuration settings that we wanted to provide and On the server side You've got you got the HTTP request. So so I have got Admin client so you can have create user code and all this stuff that is present out here We are using a rest API of your key cloak and then we have got users to group association and finally you have got So this is the one where you want to verify and request you send it throughout headers in your HTTP request as a header that is there and then you go to author and then check whether the token is pretty much valid or not So a security expert out here might kind of go and then scrutinize it It is serving our purpose because no student is going to hack our software right now But yes, you look into it or why you're getting into OWASP standards and all this stuff But this is working for us and on the service aid aspect So whether it for authentication or authorization to check if the rule rule is present for accessing the service or API We use depend on key cloak and the middle where to do it for us. So now So this is one thing and The next thing is so the now coming to integration. We have got all the Modules and microservice that are there, but we need an integrated system that is needs to be present So I hope everyone are aware of rest client inside your service aid code So if you want a synchronous call when you say synchronous integration I wanted a result upfront like as soon as I make a call I want the result so that I will be able to process my business logic. We use an API integration use a plane traditional rest client note rest client and then connect to the API and then get it We pass the same author which we receive for our request and then send it to the other microservice So the same author is being shared between microservice through the server and we are able to integrate via the API So this is one kind of integration But when you want to have batch jobs which can run at the end of it and then you want to communicate between these service We use something like a client ID or API key. So it's something like one secured key Which you can generate for every microservice. So you authenticate based on the API key that you need to do Another thing which we are fond of from a Java perspective is having an enterprise service bus On in microservice, it's like an event bus. So you divided everything, but you need to kind of unite them and integrate them Right, so you need to have event bus So because you have got two types of integration one is point-to-point on pubsep Point-to-point is something where I wanted to specifically tell that this particular student is dropped out He wanted to change it something else Or a particular fees collection has happened and you wanted to go and update certain things Or I change a particular Who is going to be kind of resigned or inactive? So I need to have both point-to-point which is like a queue and pubsep, which is like a topic So these two the kind of integration mechanism is very well required to make it loosely coupled Right tomorrow I can plug in any module and then put it into pubsep So everyone case kind of gets to know about that even because the moment a student is Deactivated or debug because of mall practice. You should not be accessing any other system that is there, right? I divided all the microservice, but I should not allow him to log in I should not make him access any other features that is present and I should ensure that he doesn't figure in any of the reports One student if it comes in it gets escalated to principal and senior management. You are the answerable They'll say that I don't want to use the software at all. I'll go to the register system. So that's right So you should be very very Though you have the luxury of dividing into multiple microservice But it should be integrated and the status of every entity should be maintained across it And the messaging system the event bus is not running. That means you have to Kind of other modules should not work. It's like your heartbeat that is going to be there So we have used rabbit MQ and we have also put even gateway a generic framework on top of rabbit MQ So that as an application layer, you don't have to worry about too much of bookkeeping stuff So right now you can go and check this npm repository and So there is a particular code. I have also placed the same thing in the In the github as well. So now I'll just give you a glimpse of what a sender a receiver will do, right? So so Messaging so you got this Even gateway PSG. This is the module that we have developed as an adapter to communicate with rabbit MQ It's pretty simple working on event emitter or Logic that is present out there. So Send event is like a point-to-point. So you want to send an event So you kind of create a particular message an event and then send it to the MQ So that Q will go to will be listened by only a particular only one can consume that event It's not like multiple. It's not like a broadcast. So when you send an event It's going to be processed or consumed by only one person. It's like a first come first serve If multiple people is listening on the Q whoever is going to consume that message is going to take it and then consume it. So This is send event So this is what a rabbit MQ part of assert Q and send to Q that is present out there Publish event is like a pops up kind of a thing where you publish a particular event Whoever is subscribed to it can go and then get that particular event So it's like a one-to-many if one microservice is publishing something I want other microservices to go and then listen to it and then consume that and then put some bookkeeping You have it. We have compromised normalization. So there is redundant data across microservices We don't want just because I wanted I have an ID student roll number I want to go and get this name and other a branch and other stuff. I don't want to do a call So there are certain common information frequently accessed information. We have replicated in other microservices So we don't go in for other microservice for every other detail We compromise that because you have the code application layer. So you can control what goes in what goes out So we have compromised redundancy or normalization or performance and other integration issues that are there So then we have got receive event and all these things are generic. You don't have to write anything, right? This is all there. So subscribed event. So as a subscriber you are subscribing to it So what will it do is it will emit the event? So once you subscribe something and then even comes in from the message queue It emits that event and your application code can listen on that event and then go and then do the process right, so this is the Library that you can use it and as a sender I will just show you what it requires from a sender perspective Sometimes when you are working in dev mode, you might not work in an integrated mode, right? You can disable and enable AMQP so that you don't have to Run always in integrated mode. So you can disable that as well. So this is our adapter So we import that particular library The only thing that we require is nothing but the URL in which the MQ is running and then what events you publish What events you receive? Right, that's it. So you don't and you get corresponding event callback that is going to be there It because it's all string based the emitter is just the string-based thing on a particular event I'm going to get a particular callback. So So here if you see it even gateway on import enrollment Right or selection changed. So I am going to get an event from see dropped out From some other module someone is dropped out. I get that event now I go and then say that a dropped out message has come or event has come So, what do I do? I go and emit it internally to my micro service and internally I will go and then handle this particular event consume all the message that comes in Only challenge that we faced is what kind of model or data model that is going to come in the event So that is something which you document it and exchange it So in that way it is going to be there But in Java you will have a Java class you go into it and then you'll be able to find it out But if you make it more type specific or type script you can go and then look at the Structure of that puller event. So this is what a sender perspective where I will go and then say emit it or As a receiver I go and then consume that and then publish it internally So this is a piece of code that you have to write when you're working with a rabbit MQ But this is what we have used to integrate it as synchronously You don't have to be bothered about whether other micro service running or not Right, you can brought it bring it down and then the message will be relying on the residing on the queue And then when the message micro service comes up the message gets delivered So our synchronous we use rest API call for asynchronous We are using this kind of an event bus leveraging rabbit MQ the performance is very good So you can have thousands of messages if it is unreliable in the sense no persistent But if on the reliable queues around 300 500 messages per second So you can send them and you'll be able to do it. That is rabbit MQ comes with the monitor also So you can have a console go there and then find out what kind of messages have been Received what is still getting clocked. So you'll be able to set that up and then do it so this is what we have used for integration and Next thing is about logging So this is something where every other freshers or junior developers have to give me get groomed So they should use logging effectively right because lock fails can be used for analysis It can also be used for diagnosis as well because when it is running in protection server You definitely require logging so we have used logging but logging not just one log file But you're divided into different log files with different different Configurations for different set of use cases when you're sending an SMS or an email It's a different log file because we would like to see whether SMS is gone or not But it will be mostly bulk and at that I don't we don't want it to get clogged with the other log fails that are there so So we have used locks so you can have a logging configuration. I think we have used rollback Rolling log stream and then stream based logging that are there. So the configuration is given again in the GitHub that is being shared so you can have a look at it and So that is one thing and Very essential is PM2 which hides the crashes which we have made or because we Like it's been two years. We have to build all these modules one and a half years all the modules And it should be up and running so we work to build the module parallel to the Deadlines that are there so that we build fast. So in that rush there are a few core them to also that has happened So all those things will be able to get it from the PM2 log, right? We have something like you can go and check out this link So we switch between customers based on an environment variable the corresponding configuration file and the setup files get changed Based on the environment variable. So you can go and then use the ecosystem.config.js So if you have used that Only few minutes Just couple of things so So this is the file where we go and then specify What is the environment variable? What is the microservice that you wanted to access and what is the port number in which it is going to run? so everything is configured out here and Then PM2 does the remaining stuff. So PM2 has got much more capabilities You can have process management. You can have clustering and all that stuff. So you don't have to bother your engines The same port it will run and it will leverage the Node.js cluster and then have Your throughput based on the number of cores of CPU that is present in your system So leverage PM2 as much as possible the link that I have shared is going to Give you all the details about PM2 The finally at the end of it you wanted to assemble them and then for the end users It shouldn't look like a microservice is running the whole stuff, right? So that is where your engines comes into play. So So we are using HSHTPS and then engines is used as your HSHTPS Sorry SSL terminator. So inside everything all the microservice everything is HSHTPS So only the front-end part is the engines where the SSL Is going to be certificates are registered and HSHTPS is going to get connected It also access reverse proxy so that you don't have static files, which are downloaded by every other client So all the common JavaScript files Library files and back and all the teams and everything it's going to be served through the engines that access a reverse proxy And then this is the one where I'll just show you the Fine at the end of it. I'll show all the stuff. So engines has got a config I'll just show you how all the microservice are put in the engines sites available config file I'll also show walk through a Jenkins file how we have had a Jenkins pipeline for all the microservices So that everything is automated right from your deployment of Build to the deployment. We are not you automated the unit testing yet, but it will be done. So So that is there. So Docker is the Jenkins pipeline takes care of Docker image also being created So you get a Docker image at the end of it MongoDB is kept in a separate in Docker image and then the all the other microservice code will be kept in the other Docker images that are there. So at the end of it, what you get is nothing but a working Docker image that is there the things to be explored our Kubernetes or Docker swarm So through which you can have the Docker images going through the other parts of it as well So other thing is one thing that I really rely on as PDF Whatever we do in the software at the end of it, they require a PDF report which can be printed and then filed Right and all the fancy report that I mentioned has to be appearing in the same way in the PDF as well Right. So subscripts are subscripts. So you have got syllabus book that is coming in We wanted to automate the whole stuff coming from the system We wanted the all the exceeding arrangement that are there fees were paid and not paid everything has to come in the PDF so I We are personally satisfied with PDF because it's all server-side PDF that is getting generated though We have got client side but clients machines are 2g VRAM machines We can't send all the data there and then allow the data table or phantom js to generate the PDF So we rely on huge amount of data to be Converted or exported to PDF. So one single click they wanted the complete institutions examination seating arrangement across all the programs For all the batches. So it's too heavy in terms of I know client side So we rely on a server-side PDF generation and PDF kit is very raw in terms of the control that you get in PDF So you can put where the page page nation should come at the page break to come What page sizes you want how you want to orient your text something is vertical something is horizontal or you can't rotate it Colors and shapes and polygons everything you are able to achieve it the last site native script and angular So we are into native script last two months and two and a half minutes So it is nothing but a completely because there was a react native that is there You've got Zambarin other framework, but we don't want to after learning angular js We don't want to learn another framework on JavaScript. So developer failed the native script and angular works well So we did a POC and it's all fine now. It's into production. So native script and angular is very well So it's all HTML CSS it gets converted into the corresponding native code And then but only drawback is the size of the file The APK is other things minimum. It's 35 MB or 40 MB up only that So if you're building a very small apps very pinpointed apps It's fine to go with the native application building But when it comes to a really enterprise application where you have got multiple modules and you want to scale it up I think you can't have a development cost which is kind of recurring on every platform and a different different framework So your web code your mobile code running on same single technology and learning on same stuff It's been amazing to be there with JavaScript. So thank you all It's all shared you can in the interest of time if you have any doubts, you please write to me I'll definitely respond and so it's pleasure to be part of has geek and then present in front of you. Yeah, thank you