Server:
![Client–server model - Wikipedia](https://upload.wikimedia.org/wikipedia/commons/thumb/c/c9/Client-server-model.svg/1200px-Client-server-model.svg.png)
- A server is a computer program or device that provides a service to another computer program and its user, also known as the client.
- In a data center, the physical computer that a server program runs on is also frequently referred to as a server.
- In the server/client programming model, a server program awaits and fulfills requests from client programs, which might be running in the same, or other computers.
- A server is a computer connected to a network of other workstations called ‘clients’. Client computers request information from the server over the network. Servers tend to have more storage, memory and processing power than a normal workstation.
Client-Server Model:
![Client-Server Model Definition](https://techterms.com/img/lg/client-server_model_1253.png)
- In a client/server network there is one server that is only dedicated to provide services to the other client workstations. You can have multiple servers in these networks but they can not function as workstations.
- The client relies on sending a request to another program in order to access a service made available by a server. The server runs one or more programs that share resources with clients.
- The client server relationship communicates in a request–response messaging pattern.
- TCP protocol maintains a connection until the client and server have completed the message exchange.
- TCP protocol determines the best way to distribute application data into packets that networks can deliver, transfers packets to and receives packets from the network, and manages flow control and retransmission of dropped packets.
![Client-server Application - OOSE](https://madooei.github.io/cs421_sp20_homepage/assets/client-server-1.png)
Server Request Types:
- Static request : There is no change in the content. Client requests a web page and server gets the page back as response.
- Dynamic request : The page content changes frequently. Server may not be able to process the request.
Response for dynamic request:
![Understanding Java Servlet Architecture | by Kewal Kothari | codeburst](https://sandysjava.wordpress.com/wp-content/uploads/2022/02/a7d33-1p3bdluk7wjhfs0n8yjxq_a.png)
- The client sends the Dynamic request to the server.
- Server has web container Which is helper application for server.
- web container uses a file called as web.xml to detect which servlet to call, after that it calls the servlet.
- That servlet process the information(request).
- And then it will send the response to the client.(tbd)
Statically typed programming language and dynamically typed programming language:
Statically typed languages perform type checking at compile-time, while dynamically-typed languages perform type checking at run-time.
Statically-typed languages require you to declare the data types of your variables before you use them, while dynamically-typed languages do not.
Primitive Datatypes :
![Data Types in Java](https://www.tutorialcup.com/wp-content/uploads/2020/07/DataTypes.png)
Data Type | Size | Description |
---|---|---|
byte | 1 byte | Stores whole numbers from -128 to 127 |
short | 2 bytes | Stores whole numbers from -32,768 to 32,767 |
int | 4 bytes | Stores whole numbers from -2,147,483,648 to 2,147,483,647 |
long | 8 bytes | Stores whole numbers from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 |
float | 4 bytes | Stores fractional numbers. Sufficient for storing 6 to 7 decimal digits |
double | 8 bytes | Stores fractional numbers. Sufficient for storing 15 decimal digits |
boolean | 1 bit | Stores true or false values |
public class Library{
public static void main(String[]args){
short age = 50;
int salary = 100000;
float exp=16.8f;
boolean fresher= false;
char emp='C';
Library librarian=new Library(); //"new" allocates memory
System.out.println(salary);
System.out.println(age);
System.out.println(exp);
System.out.println(emp);
}
}
![](https://sandysjava.wordpress.com/wp-content/uploads/2022/02/output-datatype-1.png?w=366)
Features of my Android Phone:
SAMSUNG Galaxy M11 (Black, 64 GB) (4 GB RAM)
Processor Type | Qualcomm Snapdragon (SDM450-F01) (tdb) |
Processor Core GPU | Octa Core 1.8 GHz Cortex-A53 Adreno 506 |
Processor speed | 1.8GHZ |
weight(g) | 197 |
Display Type Size Resolution | 6.40 inch PLS IPS 6.4 inches, 100.5 cm2 720 x 1560 pixels |
Memory | 64GB 4GB RAM |
OS | Android 10, upgradable to Android 11 |
CAMERA Features video | 3 MP, f/1.8, 27mm (wide) 5 MP, f/2.2, 14mm (ultrawide) 2 MP, f/2.4, (depth) LED flash, panorama, HDR 1080p@30fps |
BATTERY CHARGING | Li-Ion 5000 mAh, non-removable Fast charging 15W |
SENSOR | Fingerprint (rear-mounted), accelerometer, proximity |
How to make my computer as server?
We can make our computer as server with the help of Apache software.
References:
Server: https://whatis.techtarget.com/definition/server
Client-Server model: https://www.omnisci.com/technical-glossary/client-server
Servlet: https://youtu.be/OuBUUkQfBYM
Leave a comment