[C++,Python] gRPC for remote file access

26 views
Skip to first unread message

wgd...@gmail.com

unread,
Aug 8, 2018, 4:19:12 PM8/8/18
to grpc.io
Hi, I started using gRPC about one year ago. I mainly use gRPC in C++ and Python on Linux and Windows to improve parts of the software system used in my company. 

In most of our use cases, we need to transfer large volume of binary data between machines. So streaming feature of gRPC is really helpful. But recently, we got some difficulties related to user permission. The server runs on a Linux machine and provides services for file access. To fit the existing software system, we want to provide the normal unix file access based on the client's actual user and group id. But the trouble is that the threads created by the server are owned by the user who starts the server. We have tried to start the server with root permission and set the effective uid of the thread for every request, then there is higher overhead. I am wondering if there are better ways to solve this problem using gRPC. Any help will be appreciated.

Weiguo

Carl Mastrangelo

unread,
Aug 8, 2018, 10:08:01 PM8/8/18
to grpc.io
If the number of users who accesses files is small, why not have a thread per user, which handles all the requests of that particular user?  You can maintain a map from uid to thread, and have the thread be notified when gRPC gets a request.  

Another alternative is check the file permissions in your application, and grant the server access to all the files.   
Reply all
Reply to author
Forward
0 new messages