辅导RAID、讲解Python、辅导multiple data、辅导Python语言程序

- 首页 >> Python编程

Your design must work with 4 servers (the file servers may run on the same

computer).

Your goal in the project is to distribute and store data across multiple data

servers to 1) reduce their load (i.e., distributing requests across servers

holding replicas), provide increased aggregate capacity, and fault

tolerance. Your redundant block storage should follow the general

approach taken in RAID-‐1 – i.e., mirroring. Use integers to identify your

servers, and configure the system so that there is an even number of

servers, and server “N” with an even identifier is mirrored in server “N+1”.

Think about how you should distribute blocks across disks so to distribute

the load.

Client interactive window:

Print the number of servers you are running.

Take waiting time “t” as input in seconds.

Take the 4 digit starting port number. (the other ports will start from that

number till the last one) For eg – for 4 servers, if input given is 1111, the

ports are 1111, 1112, 1113, 1114. Your client should update these ports.

Then your program will wait until all your servers are not alive. You may

write like this“press enter after starting the servers.”Then, your program

should show the contact to all the servers by showing on terminal. For

eg“connection established from server01.py”

“connection established from server02.py”…….

(server names must be in the format – “server<number>.py”

Then, you can perform and initialize your file system so that it would be

ready to take the commands.

Your client should take arguments form the command line. From the

arguments you have to map which function you have to call, and you have

pass its respective parameters. The output should be printed on the screen

(if it must be).

It should start from “$ ” (with space after it).

It should be continuously running till I enter “exit” in the window.

The functions – mkdir, create, mv, read, write, status, rm. (small letter

case) For Ex$ mkdir /A/B $ create /a.txt


站长地图