Evaluating grpc for cross-platform project

196 views
Skip to first unread message

Xintong Zhou

unread,
Feb 27, 2018, 3:50:26 AM2/27/18
to grpc.io

Hi,

We are evaluating grpc for a cross-platform IoT system, whose clients involve Arduino boards, client-side web apps and native mobile apps. grpc feels like the best fit for the project, but please help us with the following questions:

1. Is it possible to try out grpc-web project?

I signed up for the early access program, but haven't received any update yet. We hope to use universal RPC definition cross all these clients. Since web apps are a critical part of the system, it is important for us to get some sense of how well grpc-web works now.

2. grpc on Arduino

Have you encountered any issues / performance issues when issuing grpc requests from Arduino with encryption? We are a little concerned over Arduino's processing power and memory.

3. grpc/http2 max concurrent stream limit

We read that grpc server can set max concurrent stream limit. Will client encounter rst_stream if it already has a lot of pending gRPC calls? What is the best practice on setting max concurrent stream limit?

4. grpc for external facing services

Is grpc ready for external facing services? We plan to run external facing grpc servers behind server-side L4 loading balancer. Are there any security and/or DoS concerns?

We really appreciate your help!

Regards,
Xintong

Vijay Pai

unread,
Apr 12, 2018, 2:56:01 PM4/12/18
to grpc.io
Thanks for your questions. I'll let someone else respond to #1.

On Tuesday, February 27, 2018 at 12:50:26 AM UTC-8, Xintong Zhou wrote:
2. grpc on Arduino

Have you encountered any issues / performance issues when issuing grpc requests from Arduino with encryption? We are a little concerned over Arduino's processing power and memory.

Interestingly, it looks like no issues about Arduino have been posted to the grpc/grpc repository. I have seen other github or other source repos that offer Arduino platform services for gRPC using Python or Node, but no issues on the grpc/grpc repo.

3. grpc/http2 max concurrent stream limit

We read that grpc server can set max concurrent stream limit. Will client encounter rst_stream if it already has a lot of pending gRPC calls? What is the best practice on setting max concurrent stream limit?

Streams that are above the concurrency limit won't get processed right away but may or may not get a RST depending on whether they just get stalled (in which case they won't get it) or are actually turned away since the system realizes that the stream will never get processed. We haven't recommended a best practice on this for now.
 
4. grpc for external facing services

Is grpc ready for external facing services? We plan to run external facing grpc servers behind server-side L4 loading balancer. Are there any security and/or DoS concerns?

gRPC has been running numerous external facing services for a while now. https://grpc.io/docs/guides/auth.html is a guide for authentication, and numerous companies have posted their best practices in deployment. A bunch of different resources are linked from https://github.com/grpc-ecosystem/awesome-grpc . Hope that helps!

- vjpai

Nicolas Noble

unread,
Apr 13, 2018, 10:25:37 PM4/13/18
to Vijay Pai, grpc.io
There is absolutely no way gRPC can work on Arduino in its current form, and probably will never be. First, gRPC requires either posix network sockets, or windows sockets. Arduino - and most other microcontrollers - only have LWIP, and we don't have a port for this. Second, the core is written in C++, and is moving more and more towards requiring a full STL to work. Arduino, as with most other microcontrollers, doesn't have a libstdc++ that would be acceptable there.

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, 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/07fc9fd8-4407-46d5-8e9a-2810b1e5d4da%40googlegroups.com.

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

Wenbo Zhu

unread,
May 3, 2018, 4:01:31 AM5/3/18
to grpc.io


On Tuesday, February 27, 2018 at 12:50:26 AM UTC-8, Xintong Zhou wrote:

Hi,

We are evaluating grpc for a cross-platform IoT system, whose clients involve Arduino boards, client-side web apps and native mobile apps. grpc feels like the best fit for the project, but please help us with the following questions:

1. Is it possible to try out grpc-web project?

dharam...@cypress.com

unread,
May 17, 2018, 1:54:12 AM5/17/18
to grpc.io
Hi Nicolas,
I guess I'm late to this discussion. I also agree that gRPC, in its current form, can't work on Arduino.
If any given microcontroller has support for libstdc++ also, it is still a big task to port gRPC(grpc-core, gpr, iomgr) on a given network stack/RTOS stack.
Further, gRPC and its modules(chttp2 etc.) is not designed to optimise its memory requirements(heap especially) - which is usually a big aspect for embedded systems.

My follow-up question is: How grpc-core authors are planning to put grpc for such embedded systems, particularly, in IoT context?
Do you think there is value in creating some sort of light-weight 'gRPC-lite' library which can cater to the needs of microcontroller based systems? Tailored to needs of embedded/deeply embedded systems?


On Saturday, April 14, 2018 at 7:55:37 AM UTC+5:30, Nicolas Noble wrote:
There is absolutely no way gRPC can work on Arduino in its current form, and probably will never be. First, gRPC requires either posix network sockets, or windows sockets. Arduino - and most other microcontrollers - only have LWIP, and we don't have a port for this. Second, the core is written in C++, and is moving more and more towards requiring a full STL to work. Arduino, as with most other microcontrollers, doesn't have a libstdc++ that would be acceptable there.
On Thu, Apr 12, 2018 at 11:56 AM, 'Vijay Pai' via grpc.io <grp...@googlegroups.com> wrote:
Thanks for your questions. I'll let someone else respond to #1.

On Tuesday, February 27, 2018 at 12:50:26 AM UTC-8, Xintong Zhou wrote:
2. grpc on Arduino

Have you encountered any issues / performance issues when issuing grpc requests from Arduino with encryption? We are a little concerned over Arduino's processing power and memory.

Interestingly, it looks like no issues about Arduino have been posted to the grpc/grpc repository. I have seen other github or other source repos that offer Arduino platform services for gRPC using Python or Node, but no issues on the grpc/grpc repo.

3. grpc/http2 max concurrent stream limit

We read that grpc server can set max concurrent stream limit. Will client encounter rst_stream if it already has a lot of pending gRPC calls? What is the best practice on setting max concurrent stream limit?

Streams that are above the concurrency limit won't get processed right away but may or may not get a RST depending on whether they just get stalled (in which case they won't get it) or are actually turned away since the system realizes that the stream will never get processed. We haven't recommended a best practice on this for now.
 
4. grpc for external facing services

Is grpc ready for external facing services? We plan to run external facing grpc servers behind server-side L4 loading balancer. Are there any security and/or DoS concerns?

gRPC has been running numerous external facing services for a while now. https://grpc.io/docs/guides/auth.html is a guide for authentication, and numerous companies have posted their best practices in deployment. A bunch of different resources are linked from https://github.com/grpc-ecosystem/awesome-grpc . Hope that helps!

- vjpai
 
We really appreciate your help!

Regards,
Xintong

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.

To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
Reply all
Reply to author
Forward
0 new messages