You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to provide a gRPC client to React-Native to communicate with the Gnomobile service, which implements the gRPC server.
We have two choices:
Because we cannot directly support stream calls from React-Native to Go, we have to convert streams to unary calls. So we can write an RPC object in Typescript, named bridge, which converts stream calls to unary calls so we will be able to pass them in the native and Go parts. It looks like Berty does with the Bridge Service Client: berty bridge.
This works fine but in a hacky way for mobile. In the future, we want to port the React-Native client to the desktop, so without native parts (Java, Swift), which will add some additional work to make it compatible.
We can use the new gRPC Web client that supports unary and stream calls natively. But the client works through HTTP connection, and our Go gRPC server doesn't implement a secure HTTP authentication.
A solution is to determine if we can create a new transport that allows us to perform native binding still using that gRPC web client.
Because number 2 is a cleaner and future-proof way, we could implement a secure authentication to our Go gRPC server to enable us to use standard gRPC clients through HTTP connections, without the need of creating hacky transports for the clients.
The text was updated successfully, but these errors were encountered:
To secure the React Native gRPC connection, we implement a transport
that uses native calls to make the gRPC calls instead of a TCP
connection.
Only the server streaming is implemented in this PR (we don't need the
client streaming).
Flow:
React-Native gRPC client <-> native (Android/iOS) <-> golang gRPC client
(UDS) <-> golang gRPC server
fixes#20
---------
Signed-off-by: D4ryl00 <d4ryl00@gmail.com>
We want to provide a gRPC client to React-Native to communicate with the Gnomobile service, which implements the gRPC server.
We have two choices:
bridge
, which converts stream calls to unary calls so we will be able to pass them in the native and Go parts. It looks like Berty does with theBridge Service Client
: berty bridge.This works fine but in a hacky way for mobile. In the future, we want to port the React-Native client to the desktop, so without native parts (Java, Swift), which will add some additional work to make it compatible.
A solution is to determine if we can create a new transport that allows us to perform native binding still using that gRPC web client.
Because number 2 is a cleaner and future-proof way, we could implement a secure authentication to our Go gRPC server to enable us to use standard gRPC clients through HTTP connections, without the need of creating hacky transports for the clients.
The text was updated successfully, but these errors were encountered: