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

Feature: gRPC support #56

Open
Kernald opened this issue May 21, 2023 · 6 comments
Open

Feature: gRPC support #56

Kernald opened this issue May 21, 2023 · 6 comments
Labels
enhancement New feature or request help wanted Extra attention is needed question Further information is requested

Comments

@Kernald
Copy link

Kernald commented May 21, 2023

gRPC is a binary RPC protocol that's often use for very similar use-cases as HTTP APIs. It's different enough that it would take some consideration to support it, but at the same time it could make Escambo a one-stop shop for API testing. Is it something you'd consider?

@CleoMenezesJr CleoMenezesJr added enhancement New feature or request help wanted Extra attention is needed question Further information is requested labels May 21, 2023
@CleoMenezesJr
Copy link
Owner

Hello and thank you for opening this issue! It makes me happy to see that there are people interested in this project.

To be honest, I didn't know this protocol, however, the idea of ​​this application is to be a complete application for API creation and testing. At the moment it doesn't have all the features I would like, but I'm glad I've gotten some contributions and some coffees, and it's given me a little more time and motivation to plan their implementation.

Let's see in the not so distant future. Right now, I'm reading about this protocol.

@Kernald
Copy link
Author

Kernald commented May 21, 2023

Sounds good! I don't have any Python knowledge (and, to be honest, not much time to spend on tooling), but I'd be more than happy to help if you have any questions about the protocol!

@jihedmastouri
Copy link

I've been learning gRPC for the past month. I am curious on how to implement that within this application?

Just a thought, would you suggest generating the client code for python and then pointing the application to the directory?

@PabloEmidio
Copy link
Contributor

As someone who works with RPC on a daily basis, I am happy to make myself available to help with its implementation.

@CleoMenezesJr
Copy link
Owner

Let's keep discussing this, but of course, calmly. A bit more solid knowledge is needed for me, so that I can at least review the contributions and of course, design will be needed to implement this. It must follow the GNOME HIG and always be accessible to users.
But to be honest, I'm pretty excited to have such a complete app for APIs.

@Kernald
Copy link
Author

Kernald commented May 21, 2023

Just a thought, would you suggest generating the client code for python and then pointing the application to the directory?

There are different approaches here:

  1. Ask the user to provide the proto files and compile them at runtime transparently. This isn't ideal, because we need to handle that whole compilation step, which is a fairly complex process and might fail for a bunch of reasons (mainly invalid syntax/missing dependency, I guess). I'm again not familiar with Python (nor its Protobuf libraries), but I assume this is what MessageFactory is designed to help with.
  2. Allow the user to send whatever message they see fit. This loses a lot of the benefits gRPC usually brings (type safety), but this works.
  3. Use gRPC's reflection protocol. This is by far the nicest approach as far as user experience is concerned. No need to provide any type definition, they're fetched from the server automatically.

This is what I've seen being done in other tools. There might be more ways to do this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants