Posts

RMI

Understanding RMI (Remote Method Invocation) Understanding RMI (Remote Method Invocation) Remote Method Invocation (RMI) is a Java-based API that enables objects in different JVMs to communicate over a network. How RMI Works 1. Client Request: A client invokes a remote method through a stub. 2. Stub & Skeleton: The stub (client-side) serializes the request and sends it over the network, while the skeleton (server-side) deserializes it and calls the method. 3. Network Communication: The request travels over TCP/IP using Java Remote Method Protocol (JRMP). 4. Execution & Response: The server processes the request and sends the result back to the client. Key Components of RMI Stub: A proxy on the client side that sends method calls to the remote object. Skeleton: The server-side component th...

Proxy

Understanding Proxy Servers Understanding Proxy Servers A proxy server acts as an intermediary between a client and a destination server, handling requests and responses to improve security, performance, or privacy. How a Proxy Functions 1. Client Request: The client sends a request to the proxy instead of the destination server. 2. Proxy Server: Intercepts, inspects, and forwards the request to the destination. 3. Destination Server: Processes the request and sends a response. 4. Proxy Response: The proxy may modify, cache, or simply forward the response back to the client. Types of Proxies Forward Proxy: Used by clients to access external resources. Reverse Proxy: Used by servers to manage incoming traffic. Transparent Proxy: Passes requests/responses unchanged but may log or filt...

TCP IP Model

TCP/IP Layer Breakdown Detailed TCP/IP Layer Breakdown Sending the Request (Client to Server) Application Layer (Client Side): The client application (browser, API client, etc.) initiates the request for a service or resource. Protocol Choice: The application decides the protocol (HTTP, HTTPS, FTP, etc.) and breaks the URL into components (protocol, host, port, etc.). TLS Security: If using HTTPS, the data is encrypted using TLS. Transport Layer (Client Side): The data is segmented using TCP or UDP, depending on the service. Internet Layer (Client Side): IP headers are added for routing. Link Layer (Client Side): The data is framed for local network transmission. Client LAN Router to Internet Client LAN Router: The router ...

HTTP vs Sockets

HTTP vs Sockets HTTP vs Sockets Understanding the Differences between HTTP and Sockets HTTP Level: Application Layer (Layer 7) Communication: Request-Response (one-way) Connection: Short-lived (stateless) Protocol: HTTP (TCP-based) Use Cases: Web requests, APIs State: Stateless (unless using sessions) Scalability: Scalable for large requests Socket Level: Transport Layer (Layer 4) Communication: Full-duplex (two-way) Connection: Long-lived (persistent) Protocol: TCP/UDP (lower-level protocols) Use Cases: Real-time apps, custom protocols State: Stateful (persistent connection) Scalability: Scalable for real-time, long-term comm. Created by Your Name. 2025. ...

Network programming in Java

Java Network Programming Roadmap Java Network Programming Roadmap Phase 1: Foundations of Networking Networking Basics (OSI, TCP/IP, Protocols, Sockets, Ports) Java Networking Essentials (`java.net` package, URL, Proxy, etc.) Phase 2: Core Socket Programming TCP Programming (Client-Server, Multi-threading, Streaming) UDP Programming (DatagramSocket, Broadcasting, Multicasting) Hands-on: Chat Application, UDP Notification System Phase 3: Advanced Networking Concepts Asynchronous & Non-Blocking I/O (NIO, Selector, Buffers) Java RMI (Remote Method Invocation) Hands-on: Scalable Echo Server, Remote Object System ...

Network Programming: Introduction

Network Programming Unit 1 Unit 1: Introduction to Network Programming 1.1 Network Programming Features and Scope **Features:** **Inter-process communication:** Enables programs running on different machines to exchange data. **Distributed computing:** Allows tasks to be divided and executed across multiple machines, improving performance and efficiency. **Resource sharing:** Facilitates sharing of resources like files, printers, and databases among networked devices. **Remote access:** Enables users to access and control computers and devices remotely. **Client-server architecture:** Provides a framework for building distributed applications with clear roles for clients and servers. **Scope:** **Web development:** Building websites and web applications. **Game development:** Creating multiplayer online games. **Cloud computing:** Developing cloud-based applications and services. **Internet o...

Network Programming Syllabus

Network Programming Syllabus Unit 1: Introduction 1.1 Network Programming Features and Scope 1.2 Network Programming Language, Tools & Platforms 1.3 Client and Server Applications 1.4 Client server model and software design Unit 2: Internet Addresses 2.1 The InetAddress Class: Creating New InetAddress Objects, Getter Methods, Address Types, Testing Reachability and Object Methods 2.2 Inet4Address and Inet6Address 2.3 The Network Interface Class: Factory Method & Getter Method 2.4 Some Useful Programs: SpamCheck, Processing Web Server Logfiles Unit 3: URLs and URIs 3.1 URIs: URLs and Relative URLs 3.2 The URL Class: Creating New URLs, Retrieving Data From a URL, Splitting a URL into Pieces, Equality & Comparison and Conversion 3.3 The URI Class: Constructing a URI, The Parts of the URI, Resolving Relative URIs, Equality & Comparison and String Representation 3.4 x-www-form-urlencoded: URL Encoder and URL Decoder 3....