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

Map support #3

Closed
mxinden opened this issue Apr 11, 2017 · 7 comments · Fixed by #22
Closed

Map support #3

mxinden opened this issue Apr 11, 2017 · 7 comments · Fixed by #22

Comments

@mxinden
Copy link

mxinden commented Apr 11, 2017

Are there any steps planned on supporting map in the near future?

We are currently looking into GRPC and its integration with Elm for Prometheus Alertmanager. Map support would be a crucial feature for us. (See PR)

@tiziano88
Copy link
Owner

Map support should not be too hard, I could look into it and get it done probably by end of April (sooner if anyone is willing to help :) ).

Although AFAICT the gRPC protocol is binary, not JSON, so not sure you would be able to use this library to connect to a gRPC server. Could you confirm?

@mxinden
Copy link
Author

mxinden commented Apr 11, 2017

@tiziano88 thanks for your quick reply!

Our idea is to serve both a JSON api and a gRPC api. With our Elm front-end we would be targeting the JSON api and use the decoders generated by elm-protobuf to decode the JSON responses by the api. If I understand the library description correctly this would be the way to go, right?

@tiziano88
Copy link
Owner

Yes, sounds like a good plan 👍 I'll look into adding map support, will make sure to update this as I go about it.

@mxinden
Copy link
Author

mxinden commented Apr 11, 2017

We will be using grpc-gateway to serve the JSON API. This means for us, that we need to interpret the .proto file with this package the same way as the grpc-gateway plugin interprets it.

What is your use case for this package? What kind of API are you targeting? Are you using the grpc-gateway plugin as well?

Thanks for your help!

@tiziano88
Copy link
Owner

I did not know about grpc-gateway, thanks for mentioning it, looks very interesting and I should probably add a link to it in the documentation! My longer-term plan is to actually support proto binary encoding and native gRPC, but AFAICT Elm does not support HTTP2 yet (which is needed for gRPC), so it may take a while until that happens.

@mxinden
Copy link
Author

mxinden commented Apr 20, 2017

@tiziano88 We have decided to use the gRPC-gateway to generate a Swagger spec. From this Swagger spec ware using swagger-elm to generate our front-end client. I have contributed the the map support in the that library instead of this one (See issue).

tiziano88 added a commit that referenced this issue May 25, 2017
@karlseguin
Copy link

The current implementation limits map keys to strings. The protocol spec also allows any integral spec. Any reason for the limitation?

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

Successfully merging a pull request may close this issue.

3 participants