You are on page 1of 6

Assignment 1 – Theory

1. List the features and the corresponding methods that need to be


implemented.

Methods of corresponding features

 GET: download file from server: If we want to download files from our
remote host, we can do so using the get command
get remoteFile
We can copy the remote file to a different name by specifying the name
afterwards:
get remoteFile localFile
The get command also accepts some option flags. For instance, we can copy
a directory and all of its contents by specifying the recursive option:
get -r someDirectory
• PUT: upload a file to server: Transferring files to the remote system works
the same way, but with a put command:
put localFile
The same flags that work with get apply to put. So to copy an entire local
directory, you can run put -r:
put -r localDirectory
• DIR: List folder contents on MyFTP server: Files and directories can be
listed with dir(). It returns filename, modified time, file size, owner, file
type, permissions and Mode.
• DEL: Delete files on the MyFTP server: To delete files on the MyFTP
server use the delete command. To delete several files at once, use
the mdelete command.
• FILE: At Server side break file into chunks, send these chunks as separate
packets. At Client side reassemble the file from the chunks
2. Work out the message structures (request and response) format with
justifications where necessary. Include error handling as well.
Request message format of MyFTP reception
The operation-wise request message format of MyFTP reception is described
below:

PUT operation
The following table describes the request message format to be passed on to a
business process from FTP reception of PUT operation.
Tag name Occurrence Description
count #
<request> 1 time -
<Myftpclient- 1 time Specifies IP address of MyFTP client.
ipaddr> It is set in text format of IP address.
<Myftp- 1 time Specifies the user name mentioned by
user> MyFTP client in USER command.
<Myftp- 1 time Specifies information of the type
type> mentioned by MyFTP client
in TYPE command.
<transfer- 1 time Specifies the transfer type. Either of
type> the following types is set:
<transfer- 1 time Specifies path of the file to be
path> transferred.

<file-name> 1 time Specifies name of the intermediate


file containing data of the file sent by
MyFTP client.
<file-size> 1 time Specifies size of the data written in
the intermediate file sent by MyFTP
client.
<request-id> 1 time Specifies the request ID. The request
ID generated by MyFTP reception is
set.

GET operation
The following table describes the request message format to be passed on to a
business process from MyFTP reception of GET operation.
Tag name Occurrence Description
count #
<request> 1 time -
<Myftpclient- 1 time Specifies IP address of MyFTP
ipaddr> client.
It is set in text format of IP address.
<Myftp-user> 1 time Specifies the user name mentioned
by MyFTP client
in USER command.
<Myftp-type> 1 time Specifies information of the type
mentioned by MyFTP client
in TYPE command.
<transfer-type> 1 time Specifies the transfer type.
<transfer-path> 1 time Specifies path of the file to be
transferred.
<request-id> 1 time Specifies the request ID. The
request ID generated by MyFTP
reception is set.

Response message format of FTP reception

 PUT operation
The following table describes the response message format to be passed on to
MyFTP reception of PUT operation from a business process.
Tag name Occurrence Description
count #
<response> 1 time -
<message> 0 or 1 time Specifies a message indicating end of a
business process. Maximum character
length that can be specified in a message is
1,024.
If length of the message specified by you
exceeds the maximum value, the last part of
the message is truncated so that the
message fits in 1,024 characters.
<success> 0 or 1 time Specifies a flag indicating end of a business
process. Specify either of the following flags:
 true
Processing of the business process
ended successfully.
 false
An error occurred in the processing of
the business process.
If you omit the flag, true is set.

GET operation
The following table describes the response message format to be passed on to
MyFTP reception of GET operation from a business process.
Tag name Occurrence Description
count#1
<response> 1 time -
<message> 0 or 1 time Specifies a message indicating end of a
business process. Maximum character
length that can be specified in a message is
1,024.
If length of the message specified by you
exceeds the maximum value, the last part of
the message is truncated so that the
message fits in 1,024 characters.
<success> 0 or 1 time Specifies a flag indicating end of a business
process. Specify either of the following
flags:
 true
Processing of the business process
ended successfully.
 false
An error occurred in the processing of
the business process.
If you omit the flag, true is set.
<file- 0 or 1 time Specifies name of the intermediate file in
name> which data of the file to be resent to MyFTP
client is mentioned.
However, if value of the <success> tag is
false, this setting is not required. Even if this
setting is performed, it is ignored.
<file- 0 or 1 time Specifies size of data of the file to be resent
size> to MyFTP client.
However, if value of the <success> tag is
false, this setting is not required. Even if this
setting is performed, it is ignored.

o DELETE (Delete file)


 Request:

Name Description
Client- Specifies client IP address.
IPAddress
User Specifies user name mentioned in MyFPT.
Type Specifies type of MyFTP
Path-transfer Specifies path of file to be transferred.
Request-ID Specifies Request ID of FTP reception.
F-name Specifies the name of file to be deleted.
F-size Specifies the size of the file to be deleted from server.
Date Specifies on which time and date you request specific file to delete.

 Response:

Name Description
Prompt Specifies the message after successful transmission of file.
Special character can’t be used in message.
Status This will return true or false.
Status Code Status code of transmission of file. Some of the status code is
mentioned below
 200 (ok): Request succeeded.
 400: Bad Request means request message not understood
by server.
 404: page/File not found.
F-name Specifies the name of file to be downloaded or searched.
F-size Specifies the size of file to be downloaded or searched.
F-type Specifies the type of file to be searched or downloaded.
3. Discuss any feature of the implementation that may help improve the
performance of the application.
 Feature of the implementation that may help improve the performance of
the application:
1. We can restrict our MyFTP for specific entity that will increase out FTP
performance.
2. It should provide Top-Notch Security and Compliance.
3. It provides multiple-access methods. Users won’t have to install FTP
client software and can access it anywhere.
4. It executes these changes in real-time without bringing down the service.
5. There won’t be any restrictions regarding file size.
6. It can support unlimited simultaneous connections so that it doesn’t
hinder scalability.
7. We can provide more security and privacy to user.

You might also like