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. This, function metadata includes the developer's full name and email address, the language the function 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:
add_new_fn
: to add either a brand new function or a new version to an existing function;add_fns
: to add multiple functions streamed by the client (note that multiple versions of a function are not allowed);delete_fn
: to delete a function (this might require reordering the versions of the function);show_fn
: to view a specific version of a function;show_all_fns
: to view all versions of a function (the versions are streamed back by the server)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).