...

/

Testing the Unary and Client Streaming RPCs

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:

  1. The gRPC service definition in ftp-service-proto

  2. The server implementation in ftp-service

  3. The client implementation in ftp-service-client

  4. 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 server configuration propertiesServer_configuration_properties file. In the parent project 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. ...