In this problem, we wish to build a repository of functions that a developer can assemble to build a complex program. There can exist several versions of a function, each with its metadata. Function metadata includes the developer's full name and email address, the language it is implemented in and a set of keywords related to the functionality fulfilled by the function. The versions of a function can be represented as a directed acyclic graph. To manage the repository, we use a remote invocation based gRPC that allows a client to interact with a server and execute the following operations: 1. add_new_fn: to add either a brand new function or a new version to an existing function; 2. add_fns: to add multiple functions streamed by the client (note that multiple versions of a function are not allowed); 3. delete_fn: to delete a function (this might require reordering the versions of the function); 4. show_fn: to view a specific version of a function; 5. show_all_fns: to view all versions of a function (the versions are streamed back by the server) 6. show_all_with_criteria: to view all latest versions of functions implemented in a given language or related to a set of keywords (bi-directional streaming). Your task is to: 1. define the interface of the remote operations using Protocol Buffer; 2. generate the stubs on both the client and server; 3. implement both the client and the server.
In this problem, we wish to build a repository of functions that a developer can assemble to build a complex program. There
can exist several versions of a function, each with its metadata. Function metadata includes the developer's full name and email
address, the language it is implemented in and a set of keywords related to the functionality fulfilled by the function. The
versions of a function can be represented as a directed acyclic graph. To manage the repository, we use a remote invocation
based gRPC that allows a client to interact with a server and execute the following operations:
1. add_new_fn: to add either a brand new function or a new version to an existing function;
2. add_fns: to add multiple functions streamed by the client (note that multiple versions of a function are not allowed);
3. delete_fn: to delete a function (this might require reordering the versions of the function);
4. show_fn: to view a specific version of a function;
5. show_all_fns: to view all versions of a function (the versions are streamed back by the server)
6. show_all_with_criteria: to view all latest versions of functions implemented in a given language or related to a set of
keywords (bi-directional streaming).
Your task is to:
1. define the interface of the remote operations using Protocol Buffer;
2. generate the stubs on both the client and server;
3. implement both the client and the server.
Step by step
Solved in 2 steps with 1 images