Testing the Unary and Client Streaming RPCs
Demonstrate the gRPC FTP service in the terminal.
We added four modules to the FTP service project grpc-ftp-project
. These are:
The gRPC service definition in
ftp-service-proto
The server implementation in
ftp-service
The client implementation in
ftp-service-client
A sample CLI client
ftp-service-cli-client
to test the application
Create the file and directory
Our client application will send a file to the server. We will create this file named testFile
in the ftp-service-cli-client
directory. Add some dummy text to the file.
Next, we need to create the folder on the server where the files will be stored. As per our logic, the files are first stored in a temporary directory and then once the transfer is complete, the file is moved to the destination folder. These directories are specified in the grpc-ftp-project
, we will create a folder destOnServer
. This is the destination folder where the files will be stored. We will also create a folder tmp
inside the destOnServer
folder. ...