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

Support for gRPC protocol #441

Open
robingustafsson opened this Issue Jan 5, 2018 · 6 comments

Comments

Projects
None yet
4 participants
@robingustafsson
Copy link
Member

robingustafsson commented Jan 5, 2018

Will happily take suggestions for what a gRPC JS API should look like. I guess https://grpc.io/docs/tutorials/basic/node.html and https://github.com/grpc/grpc-node would be good starting points.

@KaoruDev

This comment has been minimized.

Copy link

KaoruDev commented May 13, 2018

Sorry newb question:
Is the feature to bake gRPC functionality to the k6 module? Or is it to add documentation on how to accomplish it or does this involve more work?

@na--

This comment has been minimized.

Copy link
Member

na-- commented May 13, 2018

Not at the moment, @KaoruDev, but we're planning to add gRPC support in the future and this is the tracking issue for that effort.

@KaoruDev

This comment has been minimized.

Copy link

KaoruDev commented May 13, 2018

Sorry, maybe I wasn't clear...what is actually involved with adding gRPC support?

@na--

This comment has been minimized.

Copy link
Member

na-- commented May 13, 2018

Ah, my mistake, I misread your question, sorry!

Adding support for gRPC (or for other protocols) would generally involve two related things:

  1. Deciding what the JavaScript API would be (that's what the original message in this issue alluded to)
  2. Writing the actual implementation in Go and exposing it to the goja JavaScript runtime. You can see the code of the currently exposed modules here.

It's also very important to measure the different relevant metrics (response times, data sent/received, etc.) when implementing a new protocol and to emit the measurements so the different collectors can work with them. For example, this is used for measuring the different phases of an HTTP request.

@seime

This comment has been minimized.

Copy link

seime commented Jan 18, 2019

Any updates about adding gRPC support?

@na--

This comment has been minimized.

Copy link
Member

na-- commented Jan 20, 2019

@seime we still haven't made any substantial progress on this issue. For now, to be able to fully implement gRPC support, it seems like we should first add actual event loops in k6 (see #882). Otherwise we'd have to settle with either partial support, or suboptimal support with a localized event loop, like how the websockets are currently implemented.

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