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

gRPC Services #34

Open
jamesdbrock opened this issue May 5, 2022 · 6 comments
Open

gRPC Services #34

jamesdbrock opened this issue May 5, 2022 · 6 comments

Comments

@jamesdbrock
Copy link
Member

Issue for discussion of gRPC implementation.

https://developers.google.com/protocol-buffers/docs/proto3#services

https://grpc.io/docs/guides/

@jamesdbrock
Copy link
Member Author

Buffer instances are also JavaScript Uint8Array and TypedArray instances.

https://nodejs.org/docs/latest/api/buffer.html#buffers-and-typedarrays

@jamesdbrock
Copy link
Member Author

gRPC uses HTTP/2. https://grpc.io/docs/what-is-grpc/faq/#why-is-grpc-better-than-any-binary-blob-over-http2

There is this in Node.js https://nodejs.org/api/http2.html

But you cannot use HTTP/2 from browser? https://grpc.io/blog/state-of-grpc-web/

You can use gRPC from the browser with an HTTP/2 proxy https://grpc.io/docs/what-is-grpc/faq/#can-i-use-it-in-the-browser

@jamesdbrock
Copy link
Member Author

The Node.js HTTP/2 API exposes Readable and Writable Streams, so to make this simple we could generate code in terms of https://pursuit.purescript.org/packages/purescript-node-streams-aff

@jamesdbrock
Copy link
Member Author

gRPC over HTTP2

https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md

“gRPC does not currently support/use PUSH_PROMISE.”

https://stackoverflow.com/a/56741574/187223

@klarkc
Copy link

klarkc commented Nov 6, 2023

@jamesdbrock have you made any progress on this so far? I'm looking for an alternative to PureScript that does not involve grpc Node bindings, but it seems I don't have many options.

@jamesdbrock
Copy link
Member Author

@klarkc Not really, I wrote purescript-node/purescript-node-http#45 , which you have seen. Even with that HTTP/2 implementation, there would be more work to implement gRPC.

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