TERDS is a primitive tool for building distributed systems.
Read the TERDS WWW page,
and find out everything you need to know.
TERDS runs in the Indy lab, allowing you to create a distributed system
across the machines.
The two software components are available in
/home/escambia/geoff/perl/TERDS
.
Try some of the example programs, and make sure that you can drive the system.
Your assignment is to use the TERDS environment to implement the basic FTP style server that is the topic of Part A of the MTH596 file management assignment, and also a corresponding FTP client. Your client takes the name of the file to be retrieved as its only command line argument.
Here's what a sample run looks like (input from the user is emphsized):
geoff@gettysburg:TERDS> TERDS :::create nashville /home/escambia/geoff/perl/TERDS/FileServer ALERT: Task 1 has started -> 1: File server ready :::create gettysburg /home/escambia/geoff/perl/TERDS/FileClient /home/escambia/g eoff/perl/TERDS/EchoTask ALERT: Task 2 has started -> 2: Going to request the file /home/escambia/geoff/perl/TERDS/EchoTask -> 2: :::list self <- 2: :::<- 2: TaskID=2:::<- 2: ParentTaskID=0:::<- 2: HostName=gettysbu rg:::<- 2: PID=18044:::<- 2: Program=/home/escambia/geoff/perl/TERDS/FileCli ent /home/escambia/geoff/perl/TERDS/EchoTask:::<- 2: StartedAt=Thu Apr 6 11:4 2:45 EDT 2000:::<- 2: RunStatus=running:::<- 2: TraceStatus=1:::<- 2: List enStatus=1:::<- 2: LogStatus=0:::<- 2: LogFileName=none:::<- 2: <- 2: :::EOF::: -> 2: MyID is 2 -> 2: :::list <- 2: :::<- 2: TaskID=0:::<- 2: ParentTaskID=-1:::<- 2: HostName=gettysb urg:::<- 2: PID=18014:::<- 2: Program=user:::<- 2: StartedAt=Thu Apr 6 11 :41:54 EDT 2000:::<- 2: RunStatus=running:::<- 2: TraceStatus=0:::<- 2: Li stenStatus=1:::<- 2: LogStatus=0:::<- 2: LogFileName=none:::<- 2: <- 2: :::<- 2: TaskID=1:::<- 2: ParentTaskID=0:::<- 2: HostName=nashvill e:::<- 2: PID=18561:::<- 2: Program=/home/escambia/geoff/perl/TERDS/FileServ er:::<- 2: StartedAt=Thu Apr 6 11:42:02 EDT 2000:::<- 2: RunStatus=running: ::<- 2: TraceStatus=1:::<- 2: ListenStatus=1:::<- 2: LogStatus=0:::<- 2: LogFileName=none:::<- 2: <- 2: :::<- 2: TaskID=2:::<- 2: ParentTaskID=0:::<- 2: HostName=gettysbu rg:::<- 2: PID=18044:::<- 2: Program=/home/escambia/geoff/perl/TERDS/FileCli ent /home/escambia/geoff/perl/TERDS/EchoTask:::<- 2: StartedAt=Thu Apr 6 11:4 2:45 EDT 2000:::<- 2: RunStatus=running:::<- 2: TraceStatus=1:::<- 2: List enStatus=1:::<- 2: LogStatus=0:::<- 2: LogFileName=none:::<- 2: <- 2: :::EOF::: -> 2: Client found the server at task 1 -> 2: :::send 1 2 /home/escambia/geoff/perl/TERDS/EchoTask <- 1: 2 /home/escambia/geoff/perl/TERDS/EchoTask -> 1: Server will send /home/escambia/geoff/perl/TERDS/EchoTask to task 2 -> 1: Server dealing with 2 /home/escambia/geoff/perl/TERDS/EchoTask -> 1: -> 1: :::send 2 #!/usr/local/bin/perl -w <- 2: #!/usr/local/bin/perl -w -> 1: :::send 2 <- 2: -> 1: :::send 2 use strict "vars"; <- 2: use strict "vars"; -> 1: :::send 2 #------------------------------------------------------------- ---------------- <- 2: #----------------------------------------------------------------------- ------ -> 1: :::send 2 my $Line; <- 2: my $Line; -> 1: :::send 2 <- 2: -> 1: :::send 2 $| = 1; <- 2: $| = 1; -> 1: :::send 2 <- 2: -> 1: :::send 2 do { <- 2: do { -> 1: :::send 2 if (defined($Line =)) { <- 2: if (defined($Line = )) { -> 2: #!/usr/local/bin/perl -w -> 1: :::send 2 chomp($Line); <- 2: chomp($Line); -> 2: -> 1: :::send 2 print("$$ received =$Line=\n"); <- 2: print("$$ received =$Line=\n"); -> 2: use strict "vars"; -> 1: :::send 2 } <- 2: } -> 2: #----------------------------------------------------------------------- ------ -> 1: :::send 2 } while (defined($Line) && $Line ne "stop"); <- 2: } while (defined($Line) && $Line ne "stop"); -> 2: my $Line; -> 1: :::send 2 #------------------------------------------------------------- ---------------- <- 2: #----------------------------------------------------------------------- ------ -> 2: -> 1: :::send 2 <- 2: -> 2: $| = 1; -> 1: :::send 2 :::EOF::: <- 2: :::EOF::: -> 2: -> 2: do { -> 2: if (defined($Line = )) { -> 2: chomp($Line); -> 2: print("$$ received =$Line=\n"); -> 2: } -> 2: } while (defined($Line) && $Line ne "stop"); -> 2: #----------------------------------------------------------------------- ------ -> 2: ALERT: Task 2 has ended ^D ALERT: Task 0 has ended Broken pipe geoff@gettysburg:TERDS>
You must place the source code of your programs in a
directory called MTH689/TERDS
off your home directory
on the Indy lab machines, by 6pm on 27th April.
Your programs will be assessed on: