Testing the Unary and Client Streaming RPCs
Demonstrate the gRPC FTP service in the terminal.
We'll cover the following...
We added four modules to the FTP service project grpc-ftp-project. These are:
The gRPC service definition in
ftp-service-protoThe server implementation in
ftp-serviceThe client implementation in
ftp-service-clientA sample CLI client
ftp-service-cli-clientto 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. ...