Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External gRPC #597

Open
jwinarske opened this issue Dec 28, 2022 · 7 comments
Open

External gRPC #597

jwinarske opened this issue Dec 28, 2022 · 7 comments

Comments

@jwinarske
Copy link

Interested in supporting external ASIO/gRPC C++, with a connection to Dart via isolate bridge.

It's there an easy way to pass off a serialized gRPC messages in Dart to a virtual isolate, and parse incoming message from an isolate?

I have an isolate zero-copy "bridge" working in both C++ and Rust.

@mraleph
Copy link
Member

mraleph commented Dec 31, 2022

Hi @jwinarske. I am not entirely sure I understand the question. Could you clarify?

If you just want to exchange messages inprocess then maybe you don't need full blown gRPC machinery? You could just send protobuf encoded messages back and forth.

Alternatively you could try to wrap your "bridge" as a ClientChannel implementation - this way you can reuse gRPC client stubs.

But I am just guessing what you are trying to achieve here.

@jwinarske
Copy link
Author

@mraleph

The goal is zero copy Dart <-> gRPC C++, and reuse as much boiler plate from the generated code as possible.

I like the idea of wrapping the "bridge" as a ClientChannel.

In the Automotive Grade Linux design, many micro-services each expose an independent API. Each micro-service gets their own set of IDL files. I want to unify this collection of APIs into a logical API on the Dart side, using a common zero-copy interface.

One example of a micro-service: SDR for AM/FM/DAB/DAB+ bands

@jwinarske jwinarske reopened this Dec 31, 2022
@jwinarske
Copy link
Author

Closed by accident

@jwinarske
Copy link
Author

The "bridge" is implemented in C++17 leveraging asio-gRPC + libunifex. It will be open sourced.

@mraleph
Copy link
Member

mraleph commented Jan 1, 2023

The goal is zero copy Dart <-> gRPC C++, and reuse as much boiler plate from the generated code as possible.

gRPC will not be zero-copy though - you need to serialize - deserialize messages as they cross the boundary.

You need to share underlying protobuf messages between C++ and Dart to make it zero-copy, which is currently not possible. Though it might become possible when bindings for
upb become available.

@jwinarske
Copy link
Author

Though it might become possible when bindings for
upb become available.

Any timeline on potential bindings for upb?

@mraleph
Copy link
Member

mraleph commented Jan 1, 2023

No concrete timeline right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants