Sharing Data Files Between Client And Server Computer Science Essay

Published: Last Edited:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

The object of our project is we have to write a file replication daemon that can copy files to a pre configured set of remote sites .Also the files that are copying are to be replicated in text form. Also that multiple replications must run on the same node .Also the client side must have the capability of restoring the last saved copy from server site.

1.0 Introduction:

In the development of this project, we are using the TCP client-server model in socket programming. TCP is connection-based so it is more reliable and it could be maintained for further needs. We also come up with socket programming that will be in C and in C++ using two types of programs in it .This program must be able to optimize the data sent for the file updates .compression and encryption are configurable feature that can be configured at the client daemon to be used in client and remote sites.

2.0 Literature Review

2.1 Introduction to Literature Review

After going throw the different research papers and past projects I have found the unlike procedure to make my project with differ efficiency. The scenario which has given to me was totally new and it is my first experience to work on Socket Programming which is the main basic structure of our project.

2.2 Assumptions:

Client is connected to the server by creating a socket in between server side and client side. The file that we assume is .txt file. Client should be able to send the data to both server i.e. server 1 and server 2 .Replication is the part of scenario that is a client server architecture .Replication is assume to be a core part of our system as file has to copied to pre configure set of remote sites . It can manage the server -client connection as well additionally. A client can have more than one session .Client has to compress the data while sending the .txt file. I also create socket for a communication between each side. As it is required to encryption and compression to add feature in our project for that encryption is the process of transforming information using cipher so called algorithm and same for compression area.

2.3 Project Requirements:

In this project, the basic requirements are the program must be able to retrieve files from a server. The server can support multiple clients and multiple connections. Clients/servers have the ability to restore the latest copy from other side. Clients are able to request inconsistent copy from server.

2.4 Project Description:

As requirement is concerned we come up with client server model that we have to illustrates how we are copying files from remotes sites, besides this that copied files has to be replicated in text content files for this we are using some functions we have to use the active directory sites and this directory can be accessed by using a network share to any server where the client is replicating the files. As far as one has to run multiple replications on same node for this we will use select function. Also for client and server in between the file is lost where the file is being copied we need to add the feature so called restoring of the copying files systems.

2.5 Socket Programming:

Socket is an application programming interface (API) for inter processing communication (IPC), end point of communication. It function is same as Switch, but switch work as a hardware and Socket work under the software programming.

2.6 Create Server End:

First Client sends a request to a server, if server is not busy he will response client to send file or receive file. Sever runs in an infinite loop listening for clients. After accepting connections, server will call functions to perform tasks such as compression and encryption.

A server program is exposed via a socket connected to a certain port number. A client program can then connect its own socket to the server's socket.

And the main Socket Call functions we are using in this code are:

Socket (), Bind(), Listen(), accept(), Recv(), Send(), Close ()


2.7 Create Client End:

Client send request to server for connection.

After client receives file it calls functions such as decryption and decompression.

I define the whole function and work of client end in a block diagram which is given below:

tcp client s.jpg

2.8 Create Block Diagram:

As Client server model in block diagram we try to explain here that clients can get source of files from servers in order to restore inconsistent or lost copied .It can manage the server -client connection as well additionally .As we are required to encryption and compression to add feature in our project for that encryption is the process of transforming information using cipher so called algorithm and same for compression area.

2.9 The Client Server Model:

TCP/IP enables peer to peer communication

Most distributed applications have special roles (for example)

Server waits for a client request.

Client requests a service from server

3.0 Schedule:

Project Progress Report: 4/4

Technical Learning: 4/5-4/11

Developing: 4/12- 4/25

Testing and Fixing: 4/25-5/2

Report, demo: 5/2-5/7

Final Report: 5/8

3.1 Milestones:

Create client and server

Build socket interface for multiple connections

Research & study

Testing and demoing

Configure the socket with functions to meet requirements 

Add additional Configurable features

3.2 Conclusion:

The client server model architecture basically involves socket programming .Before this I don't have a knowledge regarding socket programming but as I go through different papers its makes us learn and to implement it in client server model as well as do apply encryption , decryption , and compression as well .