Monday, March 10, 2025

Cloud

 Examples of cloud-native technologies that are widely used

1. Containerization

  • Docker: A platform for building, shipping, and running containerized applications.

  • Podman: An alternative to Docker for managing containers.

2. Container Orchestration

  • Kubernetes: An open-source system for automating deployment, scaling, and management of containerized applications.

  • OpenShift: A Kubernetes-based platform with additional enterprise features.

3. Service Mesh

  • Istio: A service mesh that provides traffic management, security, and observability for microservices.

  • Linkerd: A lightweight service mesh for Kubernetes.

4. Serverless Platforms

  • AWS Lambda: A serverless compute service that runs code in response to events.

  • Google Cloud Functions: A serverless execution environment for building and connecting cloud services.

5. Monitoring and Observability

  • Prometheus: A monitoring system and time-series database.

  • Grafana: A visualization tool for monitoring metrics.

  • Jaeger: A distributed tracing system for microservices.

6. CI/CD Tools

  • Jenkins: An open-source automation server for continuous integration and delivery.

  • Tekton: A Kubernetes-native CI/CD pipeline tool.

7. Cloud-Native Databases

  • CockroachDB: A distributed SQL database for cloud-native applications.

  • Cassandra: A NoSQL database designed for scalability and high availability.

8. API Gateways

  • Kong: A cloud-native API gateway for managing APIs and microservices.

  • Apigee: A Google Cloud API management platform.

Thursday, November 20, 2014

JSP



Include a file Translation time- %@ include file="test.txt" %

Include a file Request time- jsp:include page="header.jsp" Include a file Request time using JSTL tags - c:import url="http//:url" @page import - import java classes Shell Scripting - runs in unix server to cleanup the log files, run processes at system startup, file transfer

Servlet



Lifecycle - create() -> init() -> service() -> destroy()

Object creation - same object accessed by all requests

Connection Pooling - object created for each request and container manages the objects

redirect - continues execution of request and control goes to the specified URL

forward - internally navigates to an other page with the same URL

Sunday, November 2, 2014

EJB



EJB - server side component that runs on the application server and container provide transaction management.

Types - Entity, session and MDB.

Types of session bean - Stateless and Stateful session beans.

Life cycle - setEntityContaxt() -> create() (ejbCreate() + ejbPostCreate()) -> remove() (ejbRemove())

Connection Pooling - no need to query database every time a client calls EJB

Bean managed persistence - disable the automatic container manged persistence and use manual queries to update database.

Serialization - in case of RMI, we can transfer EJB objects from one JVM to another and so we need to use serialized objects.

Java Beans VS EJB - client side vs server side beans.

MDB - Message Driven Bean is used by JMS queue. onMessage()

Design Pattern



Observer - whenever an subject object changes state observer object will receive notification

Decorator - bufferedReader and bufferedWriter are examples

Singleton - only one instance per application

Factory - creates object from static factory objects - improves caching, immutable objects are created

Session Facade - it provides a wrapper class of session beans for entity beans

Session Facade Implementation - value object class with getters and setters of required session attributes

JSF



Life cycle - Http Request -> Restore View -> Apply Request Values -> Process Validations -> Update Model Values -> Invoke Application -> Render Response -> Faces Response

Advantages over STRUTS No need of form beans, DTO class and POJO. We can use backing beans that are managed by JSF container.

SCOPES - Request Scope, session scope and application scope

Spring MVC


Lifecycle - HTTP Request -> DispatcherServlet -> Web Application Context (Handler Mapping, controller, view resolver) -> View Response
JNDI lookup - provides an entry point to all db objects in servlet
Tiles-defs.xml - all the jsp and view definitions
Spring Singleton - declare bean as singleton scope
Bean Scopes - singleton, Request, Session, Universal Session
Create Immutable class - all methods private and static, no setter methods for variables, no subclass to override methods
@Autowire in java or autowire="asSetter or Contructor" in XML - scans for the components needs to wire the object in the package - add components to the context file
IOC - create a class and add it to spring context xml file - the class gets added to the spring container and Inversion of Control is achieved Bean Context and Application Context