Asynchronous Programming in Java

Asynchronous Programming in Java Parallel vs. Concurrent vs. Asynchronous Parallel: Multiple tasks executed at the same time. For example, I can walk and talk at the same time. Concurrent: I can work on multiple tasks, but I can do only one task at a moment in time. For example, I can talk or drink water at a moment. Asynchronous: It just means non-blocking. For example, I can brew a coffee, and in the meantime, I could do something else. responsive preemptive performance For Async programming JavaScript used callback. Callbacks created a problems of its own like callback hell. Promise came to solve the problem. ...

2024-07-21 · 2 min · Ramesh

Aws Questions

AWS Use Case Questions You’re setting up a website for a small shop using AWS. How would you choose the right AWS tools to make sure the website stays fast and reliable, whether there are only a few visitors or a lot of people shopping at once during a big sale? To set up a website for a small shop using AWS, ensuring it stays fast and reliable regardless of traffic fluctuations, follow these steps: ...

2024-07-16 · 13 min · Ramesh

Docker

Docker Installation Storage Storage Drivers Running Images Logging Driver Docker Swarm Namespaces Control Group Image Dockerfile Multi-Stage Build Managing Image Flattening an Image Docker Installation We have two versions of Docker. Docker Community Version (Docker CE) Docker Enterprise (Docker EE) Instalation Guide Ubuntu Debian Storage By default all files created inside a container are stored on a writable container layer. This means that: The data doesn’t persist when that container no longer exists, and it can be difficult to get the data out of the container if another process needs it. A container’s writable layer is tightly coupled to the host machine where the container is running. You can’t easily move the data somewhere else. Writing into a container’s writable layer requires a storage driver to manage the filesystem. The storage driver provides a union filesystem, using the Linux kernel. This extra abstraction reduces performance as compared to using data volumes, which write directly to the host filesystem. Storage Drivers The storage driver controls how images and containers are stored and managed on your Docker host. ...

2024-07-03 · 6 min · Ramesh

Core Java

Core Java Core Java String Concepts HashCode & Equal Methods Immutability OOPS Concepts Abstraction Encapsulation Polymorphism Inheritance String Concepts A String is a sequence of characters. How to create a String object? String literal String s1="Welcome"; String s2="Welcome";//It doesn't create a new instance New keyword String s=new String("Welcome"); //creates object and reference variable Examples:- String s1 = "Hello"; char ch[] = {'H', 'e', 'l', 'l', 'o'}; String s2 = new String(ch); String s3 = "Hello"; String s4 = new String("Hello"); String s5 = new String("Hello"); System.out.println(s1 == s2); // false System.out.println(s1 == s3); // true System.out.println(s4 == s5); // false HashCode & Equal Methods Default implementations of equals() and hashcode() methods: ...

2024-05-29 · 3 min · Ramesh

Apache Kafka Crash Course

Kafka - Distributed Stream Processing System Kafka is an open-source distributed streaming platform. In simpler terms, it’s a system that excels at handling large amounts of data that is constantly being generated. This data, often called streaming data, comes from various sources and needs to be processed quickly and efficiently. Push Poll Model Kafka Components Kafka Broker Default port 9092 Producer: Producer produces content Consumer: Consumer consumes the content The producer/Consumer creates a TCP connection to the broker, which is bi-directional. That means both producer and broker can send and receive data from each other. ...

2024-04-27 · 4 min · Ramesh