Closed mbarbin closed 7 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.
@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!
I ended up re-using this code organization in #55.
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:
It paves the way for a straightforward deprecation of the untyped-RPC in the future, as we can simply remove the code when ready.
It reduces indirection and allocation in the typed-RPC implementation path. With this new implementation, there's no need to map over sequences, which should enhance the performance of the typed implementation and clarify the code.
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.