dialohq / ocaml-grpc

gRPC library for OCaml
https://dialohq.github.io/ocaml-grpc
BSD 3-Clause "New" or "Revised" License
62 stars 9 forks source link

Reversing Dependency: Implementing Untyped-RPC on Top of Typed-RPC (draft) #51

Closed mbarbin closed 7 months ago

mbarbin commented 10 months ago

In this Pull Request, I've reversed the dependency between the typed-RPC and untyped-RPC implementations. Now, the untyped-RPC is built on top of the typed-RPC, a shift from the previous structure.

This change is motivated by several factors:

While this modification isn't strictly necessary for the PR introducing the typed-RPC interface (#48), I believe it's a valuable addition. This approach aligns with my original vision during the exploration phase, and I recommend implementing it without significant delay. Specifically, I suggest that the typed interface implementation for other concurrency libraries should follow a similar path, bypassing the initial exploratory phases of building the typed-RPC on top of the untyped one.

mbarbin commented 10 months ago

Currently this PR is built on top of #48 thus duplicating the commit chain.

Also, currently I have only gone through the client side, I plan on making a similar change to the server side shortly.

mbarbin commented 10 months ago

@quernd and @tmcgilchrist I prefer this implementation over the one in #48. If you like it too, I will use this as the basis for the typed-rpc-eio implementation that I enable for code review. Please let me know what you think. Thank you!

mbarbin commented 7 months ago

I ended up re-using this code organization in #55.