Professional Documents
Culture Documents
Mamcgreport
Mamcgreport
BACHELOR OF ENGINEERING
In
COMPUTER SCIENCE AND ENGINEERING
Submitted By
MAMATHA G [1JV20CS006]
MEGANA [1JV20CS007]
POORNIMA S [1JV21CS400]
CERTIFICATE
Certified that the Mini Project work entitled “CLIENT AND SERVER
ARCHITECTURE” carried out by MAMATHA G [1JV20CS006], MEGANA
[1JV20CS007], POORNIMA S [1JV21CS400] are bonafide students of Jnana Vikas
Institute of Technology in partial fulfillment for the award of the degree of Bachelor of
Engineering in Computer Science and Engineering of the Visvesvaraya Technological
University, Belagavi during the year 2022-23. It is certified that all corrections/suggestions
indicated for Internal Assessment have been incorporated in the report deposited in the
department library. The project report has been approved as it satisfies the academic
requirement in respect of project work prescribed for the said degree.
1. ________________ _________________
2. ________________ _________________
JNANAVIKAS INSTITUTE OF TECHNOLOGY
BIDADI-562109
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
DECLARATION
We, MAMATHA G [1JV20CS006], MEGANA [1JV20CS007], POORNIMA S
[1JV21CS400] students of 6th semester B.E in Computer Science And Engineering,
Jnana Vikas Institute of Technology, Bidadi, hereby declare that the Mini Project work
entitled “CLIENT AND SERVER ARCHITECTURE” has been carried out by us and
submitted in partial fulfillment of the course requirements for the award of degree of Bachelor
of Engineering, from Visvesvaraya Technological University during 2022- 2023 is a record
of an original work done by us under the guidance of Prof. UMADEVI B E, Assistant Professor
in Department of Computer Science and Engineering, JVIT, Bidadi. The results
embodied in this work has not submitted to any other University or Institute for the award of
any degree.
MAMATHA G
USN: 1JV20CS006
Department of Computer Science and Engineering,
Jnana Vikas Institute of Technology
Bengaluru-562109 Signature of the Student
MEGANA
USN: 1JV20CS007
Department of Computer Science and Engineering,
Jnana Vikas Institute of Technology
Bengaluru-562109 Signature of the Student
POORNIMA S
USN: 1JV21CS400
Department of Computer Science and Engineering,
Jnana Vikas Institute of Technology
Bengaluru-562109 Signature of the Student
ACKNOWLEDGEMENT
A Project work is a job of great enormity and it cannot accomplish by an individual all by
them. Eventually I am grateful to a number of individuals whose professional guidance,
assistance and encouragement have made it a pleasant endeavor to undertake this seminar
work.
I have great pleasure in expressing my deep sense of gratitude to founder Sir C.M
Lingappa, Chairman for having provided us with a great infrastructure and well- furnished
labs.
I would like to express my heart full thanks to Prof. NIVEDITHA S, Head of the
Department, Computer Science and Engineering who has guided me in all aspects.
I would like to extend my thanks to my guide Asst. Prof. UMADEVI B E, who has
guided me in all aspects. I am grateful for her unfailing encouragement and suggestion,
given to me in course of my project works.
I would like to thank to my Family and Friends for their unforgettable support and
encouragement.
MAMATHA G [1JV20CS006]
MEGANA [1JV20CS007]
POORNIMA S [1JV21CS400]
i
ABSTRACT
Client-server architecture is an architecture of a computer network in which many
clients (remote processors) request and receive service from a centralized server (host
computer). Client computers provide an interface to allow a computer user to request services
of the server and to display the results the server returns. Servers wait for requests to arrive
from clients and then respond to them. Ideally, a server provides a standardized transparent
interface to clients so that clients need not be aware of the specifics of the system (i.e., the
hardware and software) that is providing the service. Clients are often situated at workstations
or on personal computers, while servers are located elsewhere on the network, usually on
more powerful machines. This computing model is especially effective when clients and the
server each have distinct tasks that they routinely perform. In hospital data processing, for
example, a client computer can be running an application program for entering patient
information while the server computer is running another program that manages the database
in which the information is permanently stored. Many clients can access the server’s
information simultaneously, and, at the same time, a client computer can perform other tasks,
such as sending e-mail. Because both client and server computers are considered intelligent
devices, the client-server model is completely different from the old “mainframe” model, in
which a centralized mainframe computer performed all the tasks for its associated “dumb”
terminals
Computer graphics started with the display of data on hardcopy plotters and Cathode
Ray Tube (CRT) screens soon after the Introduction of computers themselves. It has grown to
include the Creation, Storage and Manipulation of Models and Images of objects. These
models come from a diverse and expanding set of fields, and include physical, mathematical,
engineering, architectural and even conceptual structures, natural phenomenon and so on.
Computer graphics today is largely interactive: the user controls the contents, structure, and
appearance of objects and of their displayed images by using input devices, such as a
keyboard, mouse, or touch-sensitive panel on the screen. Because of the close relationship
between the input devices and the display, the handling of such devices is included in the
study of computer graphics.
ii
TABLE OF CONTENTS
Chapter 1 INTRODUCTION 1
1.1 Introduction to Computer Graphics 1
1.2 Uses of Computer Graphics 2
1.3 Advantages 2
1.4 Header Files 2
Chapter 4 METHODOLOGY 9
4.1 Introduction 9
4.2 Design Preparations 9
4.3 Determine Development Tools 9
Chapter 5 IMPLEMENTATION 10
5.1 Functions 10
5.2 Design 11
5.3 Proposed System 11
REFERENCES 23
iii
LIST OF FIGURES
iv
CLIENT AND SERVER ARCHITECTURE 2022-23
CHAPTER 1
INTRODUCTION
1.1 INTRODUCTION TO COMPUTER GRAPHICS
Computer graphics started with the display of data on hardcopy plotters and Cathode
Ray Tube (CRT) screens soon after the Introduction of computers themselves. It has grown to
include the Creation, Storage and Manipulation of Models and Images of objects. These
models come from a diverse and expanding set of fields, and include physical, mathematical,
engineering, architectural and even conceptual structures, natural phenomenon and so on.
Computer graphics today is largely interactive: the user controls the contents, structure, and
appearance of objects and of their displayed images by using input devices, such as a
keyboard, mouse, or touch-sensitive panel on the screen. Because of the close relationship
between the input devices and the display, the handling of such devices is included in the
study of computer graphics.
Computer Aided Drafting and Design (CAD): In CAD, interactive graphics is used
to design components and systems of mechanical, electrical and electronic devices
including structures such as buildings, automobile bodies, aero planes, ship hulls etc.
2D Graphics: These editors are used to draw 2D pictures (line, rectangle, circle and
ellipse) alter those with operations like cut, copy and paste. These may also support
features like translation, rotation etc.
3D Graphics: These editors are used to draw 3D pictures (line, rectangle, circle and
ellipse). These may also support features like translation, rotation etc.
1.3 ADVANTAGES
Scientific visualization
Information visualization
Computer vision
Image processing
Computational geometry
Computational topology
Applied mathematics
To interface with the window system and to get input from external devices into our
programs, we need at least one library. For the X window system, this library is called GLX,
for windows, it is wall etc.
#include<GL/glut.h> or #include<GLUT/glut.h>
GLUT is the OpenGL Utility Toolkit, a window system independent toolkit for writing
OpenGL programs. It implements a simple windowing application programming interface
(API) for OpenGL. GLUT makes it considerably easier to learn about and explore OpenGL
programming. GLUT provides a portable API so you can write a single OpenGL program
that works across all PC and workstation OS platforms.
GLUT is designed for constructing small to medium sized OpenGL programs. While
GLUT is well-suited to learning OpenGL and developing simple OpenGL applications,
GLUT is not a full-featured toolkit so large applications requiring sophisticated user
interfaces are better off using native window system toolkits. GLUT is simple, easy, and
small.
The GLUT library has C, C++ (same as C), FORTRAN, and ADA programming
bindings. The GLUT source code distribution is portable to nearly all OpenGL
implementations and platforms. The current version is 3.7.
Additional releases of the library are not anticipated. GLUT is not open source.
CHAPTER 2
LITERATURE SURVEY
1. Structuring of 2D MODELS for Educational Purposes: A. Mcgettrick, R. Boyle, R.
Ibbett, J. Lloyd, G. Lovegrove:
Nowadays 2D animation shares many of these same principles and methods. However,
instead of using physical celluloids or a multiplane camera, they are often simulated with
the help of computers. Often modern 2D animations are 9 still drawn by hand but digital
softwares speed up the process (Higginbotham n.d.). Computers can calculate and
simulate in-between frames of movement with ease, reducing the production time and
cost remarkably. 2D characters can also be rigged for a quicker and cheaper way to
produce 2D character animations. Moreover, hand-drawn animations can also use
computer technology to enhance the visuality of the animation. Klaus by Spanish SPA
Studios is an example of modern hand-drawn animation that uses digital technology for
volumetric lighting and texturing (Sarto 2019). Volumetric lighting is a technique often
used in 3D graphics to scatter light in a way that it appears almost as if it has volume.
These gave the movie an innovative look, appearing almost 3D-like while maintaining a
hand-crafted feeling. These animation can be used for learning and understanding
purposes as we are using 2D animations to learn client and server relationship or client
and server architecture as animations are known as good source of learning.
2. Computer graphics with OpenGL, James D Foley, Andries Van Dam, Steven K
Feiner, John F Huges:
You can control modes independently of each other; that is, setting one mode doesn't
affect whether other modes are set. Primitives are specified, modes are set, and other
OpenGL operations are described by issuing commands in the form of function calls.
Primitives are defined by a group of one or more vertices. A vertex defines a point, an
endpoint of a line, or a corner of a polygon where two edges meet. Data is associated
with a vertex, and each vertex and its associated data are processed independently, in
order, and in the same way. The type of clipping depends on which primitive the group
of vertices represents. Commands are always processed in the order in which they are
received, although there may be an indeterminate delay before a command takes effect.
This means that each primitive is drawn completely before any subsequent command
takes effect. It also means that state-querying commands return data that's consistent with
complete execution of all previously issued OpenGL commands. Rasterization produces
Dept. of CSE, JVIT Page 4
CLIENT AND SERVER ARCHITECTURE 2022-23
HSV: Hue Saturation Value is based on the artist concepts of Tint, Shade, and Tone
respectively. The HSV colour space, like RGB, is a device-dependent colour space, meaning
the actual colour you see on your monitor depends on what kind of monitor you are using,
and what its settings are. The terms Hue, Saturation and Value are defined as:
Hue: This is the colour itself, which results from the combination of primary colours. All
shades (except for the grey levels). The term “colour” is often used instead of “Hue”.
The RGB colours are “primary colours”.
Value: It is that quality by which we distinguish a light colour from a dark one. This
value describes the luminosity, the luminous intensity. It is the amount of light emitted
by a colour.
2.1 ANIMATION
One of the exciting things you can do on a graphics computer is draw pictures that
move. Hence animation is clearly an important part of computer graphics. In a movie theatre,
motion is achieved by taking a sequence of pictures and projecting them at 24 frames per
second on the screen. Each frame is moved in position behind the lens, the shutter is opened
and the frame is displayed. The shutter is momentarily closed while the frame is advanced to
the next frame, then the frame is displayed and so on. Although 24 different frames are
watched each second, one’s brain blends them all into a smooth animation. The key reason
why motion picture projection works is that each frame is complete when it is displayed. But
in computer animation, the time it takes for your system to clear the screen and to draw a
typical frame. The results are increasingly poor depending upon how close to 1/24 th second
the system takes to clear and draw.
Usually, it is easy to redraw the entire buffer from scratch for each frame than to figure
out which parts require redrawing. This is especially true with applications like 3D flight
simulator where a tiny change in the flight’s orientation changes the position if everything
outside the window. In most animations, the objects are simply redrawn with different
transformations – the viewpoint of a viewer moves or an object is rotated slightly. If
significant re-computation is required for non-drawing operations, then the attainable frame
rate often slows down.
CHAPTER 3
SYSTEM REQUIREMENTS
System requirements are intended to communicate in precise way, the functions that the
system must provide. To reduce ambiguity, they may be written in a structured form of
natural language supplemented by tables and system models.
Processor : Core i5
CHAPTER 4
METHODOLOGY
4.1 INTRODUCTION
This chapter introduces a brief description of the system and approaches overall
framework used in building the system from defining the requirements.
Also, it includes a brief description of the software and hardware components that were used.
CHAPTER 5
IMPLEMENTATION
5.1 FUNCTIONS
file_gen is used to check whether high score file already exists. If it does not, it will
create. If it does, it will read data from existing file.
render_header to display the player's name along with a running timer. The timer gets
its values from the clock class, which maintains the time elapsed since the game started
in hour, minutes and seconds.
hiscore_check to determine the position of the player in the high scores list. If he
completes the game in a time lesser than the top 10 players, it implements an insertion
sort to insert the player's name and time into the existing high score list.
write_file is used to write a text file of the current player class. The player class
contains details of the player name and the time he took to complete the game. All these
details, along with the preexisting records of the high scores are arranged in ascending
order of time and are written into a text file.
sub is the display function for the sub window created to display the high scores. This
window is activated when the user chooses the option "high scores" from the menu
obtained on right click of the mouse.
MOUSE EVENTS:
When mouse event occurs, the ASCII code for the corresponding coordinates that
generate the event and the location of mouse are returned. Mouse callback function is
glutMouseFunc(mouse);
void mouse (int btn, int state, int x, int y) {
if (button == GLUT_LEFT_BUTTON && state == GLUT_DOWN)
begin = x;
}
MENU ENTRY:
GLUT provides one additional feature, pop_up menus, which we can use with the
mouse to create sophisticated interactive application glutCreateMenu (); glutAddMenuEntry
(); glutAttachMenu (GLUT_RIGHT_BUTTON);
5.2 DESIGN
The flow chart describes how the path travels.
Fig 5.2.1: Under Implementation Chapter explains the Data Flow Diagram.
This includes the flow from application program to handling different events like pixel
CHAPTER 6
SOURCE CODE
#include<stdio.h>
#include<GL/glut.h>
#include<string.h>
#include<stdlib.h>
#define monitor 1
#define upbox 2
#define boxbuses 3
#define fi 4
#define keys 5
float x=-18,y=34;
int i,flag=0,w=0,q=5,r=0,s=0,u=0;
float tr=0.0,t=0.0,t2=0.0,t3=0.0,t4=0.0,t1=0.0,t5=0.0;
float tr1=0.0;
float tr2=0.0;
float tr3=0.0;
float tr4=0.0;
float tr5=0.0;
void animated();
void anim();
void textures(){
char *ptr="CTRL pr'ss";
int len=strlen(ptr);
glColor3f(1.0,0.0,0.0);
glRasterPos3f(-32.0,-3.0,0.0);
for(int i=0;i<len;i++)
glutBitmapCharacter(GLUT_BITMAP_HELVETICA_18,ptr[i]);
char *ptr1="CTRL pr'ss";
int len1=strlen(ptr1);
glColor3f(1.0,0.0,0.0);
glRasterPos3f(23.5,-3.0,00.0);
for(i=0;i<len1;i++)
glutBitmapCharacter(GLUT_BITMAP_HELVETICA_18,ptr1[i]);
char *ptr2="DATA pr'ss";
int len2=strlen(ptr2);
glColor3f(1.0,0.0,0.0);
glRasterPos3f(23.5,-38,00.0);
for(i=0;i<len2;i++)
glutBitmapCharacter(GLUT_BITMAP_HELVETICA_18,ptr2[i]);
char *ptr3="DATA pr'ss1";
int len3=strlen(ptr3);
glColor3f(1.0,0.0,0.0);
glRasterPos3f(-32.0,-38,0.0);
for(i=0;i<len3;i++)
glutBitmapCharacter(GLUT_BITMAP_HELVETICA_18,ptr3[i]);
char *ptr4="SERVER";
int len4=strlen(ptr4);
CHAPTER 7
RESULT AND TESTING
Fig 7.1.6 Data uploaded and downloaded in all the clients and server.
CHAPTER 8
CONCLUSION AND FUTURE SCOPE
8.1 CONCLUSION
The 2D Client Server Architecture has been tested under Windows XP and has been
found to provide ease of use and manipulation to the user. The 2D Client Server Architecture
created for the Windows XP operating system can be used to draw lines, boxes, circles,
ellipses, and polygons. It has a very simple and aesthetic user interface. We found designing
and developing this 2D Client Server Architecture as a very interesting and learning
experience. It helped us to learn about computer graphics, design of Graphical User
Interfaces, interface to the user, user interaction handling and screen management. The
graphics editor provides all and more than the features that have been detailed in the
university syllabus.
REFERENCES
[2] James D Foley, Andries Van Dam, Steven K Feiner, John F Huges Computer graphics
with OpenGL: pearson education.
[3] Kelvin Sung, Peter Shirley, Steven Baer: Interactive Computer Graphics, concepts and
applications, Cengage Learning.
[4] OpenGL programming guide, the official guide to learning OpenGL version 2.1,6
thedition, Pearson Publications, by Dave Shreiner, Mason woo, Jackie Neider, Tom
Davis.!
[5] http://www.cs.uvm.edu/~xwu/kdd/Slides/Kmeans-ICDM06.pdf!
[6] http://disp.ee.ntu.edu.tw/meeting/%E6%98%B1%E7%BF%94/Segmentation%20tutorial.
pdf!