ipc between worker and decl
commit6d38459ec8c25c59333b022f95f512aadd27a529
authorLucian Wischik <ljw@fb.com>
Fri, 18 Oct 2019 17:13:03 +0000 (18 10:13 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 18 Oct 2019 17:15:12 +0000 (18 10:15 -0700)
treedf7d40486b3afba9bd32bb7e91565b45f5ee4e0b
parent5031053ffd9844d857a81b6e29a73c3bd3676f94
ipc between worker and decl

Summary:
Workers and Decl-service have to communicate. The previous diffstacks left this part unimplemented. This diff provides the implementation.

I decided to do the communication all in Rust, similar to what Young did: the ocaml client calls "ipc.write" via an FFI, and the rust service calls "ipc.read" natively.

`decl_ipc.rs` is the Rust library, and `decl_ipc_ffi.rs` is the OCaml FFI wrapper.

Difference with Young is that I'm trying to be parsimonious with what's sent back and forth -- I don't think there's need to invoke a serialization layer; the format of requests is simple, the format of responses is simple, so let's just pick our own wire format and have zero allocations.

This diff also wires up the ocaml client side and the rust server side to get an end-to-end communication

Reviewed By: 2BitSalute

Differential Revision: D17969937

fbshipit-source-id: 09ec5536d7a034187bf6dc91e8452b6650b15449
hphp/hack/src/providers/decl_service_client.ml
hphp/hack/src/rearchitecture_proposal_1/hh_decl/decl_ipc.rs [new file with mode: 0644]
hphp/hack/src/rearchitecture_proposal_1/hh_decl/decl_ipc_ffi.rs [new file with mode: 0644]
hphp/hack/src/rearchitecture_proposal_1/hh_decl/decl_service.rs