grpc with async c++ server and async go client

771 views
Skip to first unread message

siddhesh...@gmail.com

unread,
Jun 19, 2018, 10:24:12 AM6/19/18
to grpc.io

Hi,
I was going through the grpc doc and implemented c++ async server.
However when I started with the async GO client I noticed async server/client
is not supported for GO yet.

Has anyone implemented GO async client or any easy way to achieve this ?
For my application there will be async server in c++ and async client in GO.
Do I have any other options like have streaming server(c++) and stream client(GO).
Can I return OK as soon as either server/client receive a msg that way grpc will indicate
other counter part to proceed.
I am going to have msg type in each msg so I don't really need to wait for reply from other side,
it can come later with a msg type.

My last option is to use regular protobuf over socket.

Any comments would be helpful.
Thanks.

Carl Mastrangelo

unread,
Jun 19, 2018, 6:45:15 PM6/19/18
to grpc.io
Go usually is not async, because it was designed to be blocking.  This does not change how communication is done over the wire, and only affects how you program your application.  You can get stream like semantics by using the ClientStream ( https://godoc.org/google.golang.org/grpc#ClientStream ) directly instead of using the generated stubs.

Siddhesh Divekar

unread,
Jun 21, 2018, 3:44:27 PM6/21/18
to Carl Mastrangelo, grpc.io
Thanks a lot for replying Carl.
Am proceeding with greeter async c++ client and greeter server in golang.
They seem to communicate well.

--
You received this message because you are subscribed to a topic in the Google Groups "grpc.io" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/grpc-io/csrZ69wM-_s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to grpc-io+unsubscribe@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/c37b090f-09fb-4818-b3fc-ad5bc573f8d6%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
-Siddhesh.

Samuel Le

unread,
Jun 29, 2018, 3:52:18 AM6/29/18
to grpc.io
Hi Siddhesh!
I have the same attention, if it is not secret can you send me the sample code of  Go lang asynchronous client. Thank for your help!

Siddhesh Divekar

unread,
Jun 29, 2018, 6:38:34 PM6/29/18
to Samuel Le, grpc.io
Hi Samuel,

My async client is in c++ & server is in golang.
Basically I start a go routine to serve incoming client.

For async go client you could store some state or label and
when response matching the label comes back you could match the same.

On Fri, Jun 29, 2018 at 12:52 AM, Samuel Le <ledaidu...@gmail.com> wrote:
Hi Siddhesh!
I have the same attention, if it is not secret can you send me the sample code of  Go lang asynchronous client. Thank for your help!

--
You received this message because you are subscribed to a topic in the Google Groups "grpc.io" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/grpc-io/csrZ69wM-_s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to grpc-io+unsubscribe@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.

For more options, visit https://groups.google.com/d/optout.



--
-Siddhesh.
Reply all
Reply to author
Forward
0 new messages