Skip to content
Advertisement

How to access gRPC server in matlab?

We have moved our DataAccess logic to Microservice and it is currently implemented as gRPC with C++ and we are able to utilize that in C# client and C++ client.

Now we have to make use of this DataAccess grpc in Matlab client(legacy). So, i’m trying to find a way to access gRPC from Matlab and found that there is no official support for this.

I found two solutions,

Using Java

I have tried as suggested in this thread. i have created a sample grpc client java using Eclipse. but when i try to access that class/methods from matlab, i’m facing below issue,

JavaScript

it was discussed here,and it says it is not possible anymore. Can anyone let me know whether this is possible now or i am missing something?

Using Matlab Proto Compiler [Farsounder]

Next i have tried to use Farsounder solution v2.5.0 for creating stub files based on this. Only after creating protoc.exe, I realized it was for Proto V2. So, now i’m trying use Protov3Matlab.

But the build instructions are not clear here and it has one cmake file and i dont know how to run it. Can anyone help me build this for windows environment?

I’m new to Java and Matlab, sorry if i have missed any obvious things.

Thanks in advance.

Advertisement

Answer

I was able to create protoc.exe. Steps:

  1. Checked out latest protobuf source.
  2. Updated the source with farsounder matlab source and cmake file.
  3. Followed https://github.com/protocolbuffers/protobuf/blob/master/cmake/README.md build the source.
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement