Implement a message server in a distributed environment

Assignment Help Computer Networking
Reference no: EM131931265

Assignment: Sockets

In this project, we will implement a "message server" in a distributed environment (i.e. between processes running on machines that are physically separate) by using BSD sockets.

In this assignment, we will provide a writer program (i.e. you will be given a writer program), and you are required to create a server program, which will communicate with writers by sockets. 3 identical writer programs (except for names, writer 1, writer 2, and writer 3, respectively) will run on one or more machines and the server on another machine (netcluster.cse.usf.edu).

Assignment Specifications:

1. Each writer program will connect and send a message (i.e. message "writer1" will be sent to the server from writer 1 - you do not have to do this, our TA will take care of this part) to the server.

2. The server process will accept this socket connection from a writer, and create a thread process after the socket is accepted.

3. After a thread is created it is responsible for taking care of communication (Step 4) with the writer, and the parent process loops back to listen for a connection - this makes the parent ready for another connection.

4. A message from the writer must be stored by the appropriate thread processes in shared memory. This memory is shared by the server and all its threads, and can store only one message. The message length will be no more than 15 characters (14 chars plus 1 char string terminator in C), such as "writer1" "writer2" and "writer3".

5. A writer process should be invoked (started) with the writer name. For instance, suppose writer program name is "writerp", the first writer should be started by typing "writerp" and will read the message from the file infile.

6. The shared memory must be properly protected as a critical section so that the stored message will never be corrupted even during the handling of concurrent connections from multiple writers.

7. After a message from a writer is successfully stored in the shared memory by one of the server threads, after a 2 second sleep, the actual contents of the shared memory should be sent back to the original writer by the same server thread.

8. Set the server up to run on netcluster.cse.usf.edu (131.247.3.8 is the IP address). Use port 1050 as the port for listening. You will need to examine the socket, connect, bind, listen, accept, send and recv man pages for the appropriate system calls. (some of them, such as send, gotten via man send). Your server should loop for a total of n connection accepts, where n will be 3 in our trials.

Look at setsockopt to free the socket after use.

I suggest that first you set up your server so that it listens and responds to 1 writer. Use a C4lab machine c4lab04 131.247.2.133 or c4lab12 131.247.3.131 as the test machine to send from. You will upload your code into Canvas before the deadline.

Reference no: EM131931265

Questions Cloud

Develop a market profile : BSNS 7360 INTERNATIONAL BUSINESS ASSIGNMENT-PROFILE AND POTENTIAL OF A CHOSEN OVERSEAS MARKET. Develop a market profile
Rates remain unchanged throughout your planning horizon : Find the total cash flow you will have 6 years from now if interest rates remain unchanged throughout your planning horizon.
This manager is engaged in which management function : The "Big Five" personality dimension of agreeableness refers to which of the following sets of personality traits?
Find one appropriate stock to replace these two : Assuming that you could find one appropriate stock to replace these two, what should be its beta?
Implement a message server in a distributed environment : Implement a message server in a distributed environment (i.e. between processes running on machines that are physically separate) by using BSD sockets.
Find the weight corresponding : Find the weight corresponding to t = 1, w1, in the definition of duration as a weighted average of the times at which the cash flows occur: D = 1*w1 + 2*w2.
Who is fernando sorrentino : Who is Fernando Sorrentino? Where and WHen was Fernando Sorrentino writing?
Generate the critical path graph : The Project Management Office would like to know if the schedule can be crashed to 14 weeks and what the cost would be to crash the schedule.

Reviews

Write a Review

Computer Networking Questions & Answers

  Networking and types of networking

This assignment explains the networking features, different kinds of networks and also how they are arranged.

  National and Global economic environment and ICICI Bank

While working in an economy, it has a separate identity but cannot operate insolently.

  Ssh or openssh server services

Write about SSH or OpenSSH server services discussion questions

  Network simulation

Network simulation on Hierarchical Network Rerouting against wormhole attacks

  Small internet works

Prepare a network simulation

  Solidify the concepts of client/server computing

One-way to solidify the concepts of client/server computing and interprocess communication is to develop the requirements for a computer game which plays "Rock, Paper, Scissors" using these techniques.

  Identify the various costs associated with the deployment

Identify the various costs associated with the deployment, operation and maintenance of a mobile-access system. Identify the benefits to the various categories of user, arising from the addition of a mobile-access facility.

  Describe how the modern view of customer service

Describe how the greater reach of telecommunication networks today affects the security of resources which an organisation provides for its employees and customers.

  Technology in improving the relationship building process

Discuss the role of Technology in improving the relationship building process Do you think that the setting of a PR department may be helpful for the ISP provider? Why?

  Remote access networks and vpns

safekeeping posture of enterprise (venture) wired and wireless LANs (WLANs), steps listed in OWASP, Securing User Services, IPV4 ip address, IPV6 address format, V4 address, VPN, Deploying Voice over IP, Remote Management of Applications and Ser..

  Dns

problems of IPV, DNS server software, TCP SYN attack, Ping of Death, Land attack, Teardrop attack, Smurf attack, Fraggle attack

  Outline the difference between an intranet and an extranet

Outline the difference between an intranet and an extranet A programmer is trying to produce an applet with the display shown in Figure 1 below such that whenever one of the checkboxes is selected the label changes to indicate correctly what has..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd