r/mit6824clojure • u/ErnestoGarciaGarcia • Aug 25 '20
Lab code for Raft: Synchronous RPC calls
In the provided lab code, the RPC call function blocks and returns the response. I don't think we should assume that the underlying transport will support correlating responses with requests , nor does Raft make that assumption. For example, Raft would just work on top of UDP. I believe we should tweak the provided code so that we get responses asynchronously. What do you think?
3
Upvotes
2
u/siclait Aug 27 '20
I think that would be inconsistent with the provided Go code. As far as I can tell, the Go "rpc" library's provided
Callfunction is synchronous ( https://golang.org/pkg/net/rpc/#Client.Call ). So far I've tried to maintain parity between the Go and Clojure code. It makes it possible to form cross-language study groups and to refer back to the original class materials.