Posts

Kubernetes architecture

Image
Kubernetes architecture: Kubernetes is mostly used for Orchestration of the container. It is open source. s/w developed by Google -> GO programing language is used to develop K8S -> It is used to manage containers (create/start/stop/delete/scale-up/scale-down) -> It provides framework for managing the complex task of deploying, scaling and operating applications in containers. Advantages: 1) Self healing: If any container gets crashed then it will be replaced with new container. 2) Auto scaling: Based on demand containers count will be increased or decreased. 3) Load balancing: Load will be distrubuted all containers which are up and running. Control node: API Server: Scheduler: It will identify the pending requests in ETCD. with the help of kubelet, It will schedule the task.  Controller manager: It will verify all the task which have been scheduled are working as expected or not etcd: etcd is the distributed configuration store for the entire cluster. It holds the s...

Spring AOP ( Aspect Oriented Programming )

  Cross-cutting concern: Separating the service logic from the business logic is called cross-cutting concern, Clear cut separation will be there. Terminologies of AOP: 1. Aspect: It is the class that provides additional services to the project like Transaction management, security, encode/decode, logging etc. Separating the business logic form the 3rd party service and keeping them in a separate class, that class we call it as Aspect: 2. Advices: Inside aspect, we write logic to give us the  3. Pointcut 4. JointPoint  5. Target 6. Weaving 7. Proxy ============= Need to dump few topics...coming soon =========== 1. BeforeAdvice: Before the business method, the particular advice should be selected and executed. 2. AfterAdvice: After the execution of business logic method,  that particular advice should be executed.  3. AroundAdvice: There will be 3 portions, before executing b.methods...some part of advice will be executed and then b.methods will execute and then...

Load Balancers and Load Balancers Algorithms

Image
 Load Balancers When all components are in same applications, all request comes to same servers then burden will increase on the same server.  More the requests to the server, then the performance at the server side will be slow so the response time is high for clients.                                                                                                                                  Eg: Youtube, Myntra, Flipkart,.......(lakhs of users will send the request still the response time will be uniform for client)  When burden increased on server it will process the request slowly and some times the server might crash also.  To reduce the bu...

Advantages and Disadvantages of Monolithic Architecture

 Benefits of going for Monolith Architecture  Simple for development(becoz all are available in single project): At initial time it is very easy.   Easy for Testing : End to End Testing we can perform.   Easy for deployment : One war file only we have to deploy to server.   Easy for Scaling : multiple server we can spin easily(horizontal/vertical scaling) if requests increases then we can make keep multiple servers through which the scaling can be done to provide good responses to the client.  Disadvantages of Monolith Architecture  Maintenance of the application: If the application is to large and complex, it is difficult to understand. Change Request in the code is very difficult. Some changes in the existing application will have an impact to the other code, Lot of Impact Analysis will occur.   Adapting to New Technology is required: Change in java version and adapting to the version change also will take time. Applicati...

Monolithic Architecture

Image
 Monolithic Architecture In our application, we will have several modules and several components are also available. Components are 1. Presentation Components These are responsible for handling Http Requests. Web applications means front end pages, Distributed applications means Rest Clients. 2. Web Components Responsible to handle user requests.(Servlets basically handles the Requests). 3. Business Components  Responsible to handle the business logic as per the business deals. 4. Persistence Components DAO is responsible for performing DB operations like DML,DDL,TCL,.... 5. Integration Components(Webservices, RestFul Services) Two projects can talk to each other only when we have Integration logic(basically RestfulServices, WebServices,...). 6. Authorization Components Responsible for Authorizing the user. 7. Notification Components Responsible for sending email or mobile message notifications. If we develop all these components as a single project then it is called as " Mono...

Dispatcher Servlet, View Resolver and Handler mapping

Image
  Control Flow of SpringBootMVC ============================ 1. Programmer deploys SpringMVC/SpringBootMVC application in webserver or webapps 2. Deployment activities takes place which involves IOC container creation,DispatcherServlet registration with ServletContainer Pre-Instantiation of Singleton scope spring beans like Controller class,handlermapping,viewResolvers,Service class,DAO class etc. In the mean time necessary dependancy injection also takes place 3. Browser gives request to deployed springmvc application 4. The frontcontroller(DispatcherServlet) traps the request and applies the common system services on the request like logging,auditing,tracking etc,... 5. DispatcherServlet hands over the request to HandlerMapping component to map incoming request with handler method of handler/controller class and gets RequestMapping object from HandlerMapping component having Controller class bean id and HandlerMethod signature(it uses lot of reflection api code internally) 6. Dis...

Difference between SQL and NoSQL

Image