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

Implement grpc using protobuf or flatbuffers #10

Open
ghost opened this issue May 29, 2018 · 3 comments
Open

Implement grpc using protobuf or flatbuffers #10

ghost opened this issue May 29, 2018 · 3 comments

Comments

@ghost
Copy link

ghost commented May 29, 2018

Wishing to hear opinions..

I would prefer a faster API that can still work with json but I can use protobufs too.

I want to do some work on extending ponzu but hate the loose typing of json and http handlers.

If Flatbuffers with grpc were the basis then you can expose that also as a rest / graphql API for those that are cool with untyped.

It would also make building real apps on top of the headless CMS much easier. For example you can use a grpc Flatbuffers client that is code generated and then built complex GUI using gopherjs or flutter easily.
Both support protobuf and Flatbuffers.

I am aware that this is a big refactoring. But I still think it's worth raising as ponzu might benefit.

@nilslice
Copy link
Contributor

I love the idea of using protobufs over JSON, and still respond to http requests with JSON. I'm not very familiar with flatbuffers, but the general reason I have kept protobufs out of the project is that they add another compilation step, which I worry would be confusing or too complex to add on top of Ponzu (which is supposed to be a very simple system).

There are more tools (uber/prototool) which could be integrated and automate a lot of the setup but I'm not 100% convinced it's then right move.

What do you think?

@ghost
Copy link
Author

ghost commented May 29, 2018 via email

@Globegitter
Copy link

Just my own opinion, I love the idea of a headless CMS with grpc API rather than JSON API (so for the frontend or any other backend that would consume data from that CMS). For the web there is also https://github.com/improbable-eng/grpc-web, but I am probably in the minority here and most people would prefer standard json based APIs.

But yeah grpc does add some additional complexity to a project, I do think once they have reached a certain size, or want wants the guarantees grpc it can really be worth it though.

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

No branches or pull requests

2 participants