-
Notifications
You must be signed in to change notification settings - Fork 7
grpc
gRPC is a description format and library for services built on top of Protobuf. I wrote an R wrapper to the core C library in 2017, but it is lacking several key features:
- Authentication - be able to provide / accept authentication tokens
- Security - use TLS to encrypt messages
- Streaming - reuse an existing connection for multiple requests
Let me know what you think.
http://github.com/nfultz/grpc is a basic implementation.
https://github.com/eddelbuettel/rprotobuf - Protobuf for R
https://github.com/grpc/grpc - underlying C library
The student will add and extend the functionality in the grpc package from both R and the underlying C wrapper code.
There are two main code paths in the grpc system - grpc clients / senders and grpc servers / receivers. The student will add features to each.
Security - gRPC can use TLS to encrypt the messages sent. This needs to be configured when a new connection is created.
Authentication - grpc also supports creating and sending authentication tokens (such as Oauth2 tokens) as metadata attached to each message.
Streaming - support sending multiple messages over a single connection. Because sessions may be long-lived, the server may need to fork to handle multiple requests.
Allows R to interoperate with other gRPC projects. Apache Arrow is one, as are many Google ML products.
gRPC is also used pretty widely in industry as a language agnostic way to connect microservices.
-
EVALUATING MENTOR: Neal Fultz <[email protected]> is the author of R packages
grpc
andstackoverflow
. He is the data science lead at UCLA Social Science Computing and the principal of NJNM consulting, and coorganizer of the Los Angeles R User Group from 2010-2014. -
SECOND MENTOR - Gergely Daroczi <[email protected]> is the author of eg
pander
,AWR
,botor
andlogger
packages. He is a Director of Data Ops at System1, and the organizer of the Budapest Users of R Network, a satRday in 2016 and the European R Users Meeting 2018.
Students, please do one or more of the following tests before contacting the mentors above.
-
Easy: Write an Rcpp function which takes an integer,
n
, and an R function,callback
. The Rcpp function should drawn
samples from the normal distribution, and execute the call back function on each sample that is greater than zero. -
Medium: Install the grpc R package from source, or rebuild the docker container on a newer version of debian.
-
Medium: Modify the grpc client timeout to take it's value from
options()
. See also https://github.com/nfultz/grpc/issues/28 -
Hard: Build and check the grpc package on Windows. See also https://github.com/nfultz/grpc/issues/21
Students, please post a link to your test results here.
- EXAMPLE STUDENT 1 NAME, LINK TO GITHUB PROFILE, LINK TO TEST RESULTS.