L3-socket.ppt - Redundant Array of Independent Disks RAID...

Info icon This preview shows pages 1–8. Sign up to view the full content.

Redundant Array of Independent Disks RAID Management Monitor the health condition of RAID subsystems disks, fans, power supplies, temperatures, etc. Report any failure instantly Provide disaster recovery array rebuild, spare disks reassign, etc.
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Remote and Centralized Storage Management agent manager
Image of page 2
Homework #1 (due Feb. 2) Manager (java code) (UDP) Send beacon every minute Agent (C code) (TCP) Send command and get result back
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Agent Design: Two Threads BeaconSender: Send the following message to manager every minute using UDP datagram struct BEACON { int ID; // randomly generated during startup int StartUpTime; // the time when the client starts char IP[4]; // the IP address of this client int CmdPort; // the client listens to this port for cmd } CmdAgent: Receive and execute remote commands and send results back using TCP socket. You implement two commands: (1) void GetLocalOS(char OS[16], int *valid) // OS[16] contains the local operating system name // valid = 1 indicates OS is valid (2) void GetLocalTime(int *time, int *valid) // time contains the current system clock // valid = 1 indicates time is valid
Image of page 4
Manager Design AgentMonitor thread Maintain a list of active agents Periodically check each agent when the last time its beacon is received The agent is dead if more than two beacons are missing The agent has restarted if its startup time is different BeaconListener thread Receive beacons sent by clients For each new client Add the agent to the list maintained by the AgentMonitor Spawn a thread called ClientAgent and ClientAgent thread Send command GetLocalOS() to the corresponding client Get the result back and display the OS Send command GetLocalTime() to the corresponding client Get the result back and display the execution time
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Code Submission and Testing Submit your code through your blackboard account by the deadline You may be asked to run your code on your computer to show it works properly Run the server Open several consoles Run a client on each console the server should be able to detect when a new client shows up by printing out the client’s OS and startup time Terminate one client the server should be able to detect the client dies by printing out a message Terminate one client and run the client again immediately the serve should be able to detect the client dies and resurrects
Image of page 6
Socket Programming (Java/C) CS587x Lecture 3 Department of Computer Science Iowa State University
Image of page 7

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Image of page 8
This is the end of the preview. Sign up to access the rest of the document.
  • Spring '18
  • Networking, Transmission Control Protocol, Client-server, Internet socket, socket

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern