GNU/Linux ◆ foot ◆ fish 204 views

We start two nodes. First node :s1 (left) will provide service “service1”, second node :c1 (right) will consume upstream service “service1”. First, we attach built-in pretty-printing (dev)Logger to :telemetry events using MeshxRpc.Common.Telemetry.attach/2 on our “service1” provider node. Then we run MeshxConsul.start/4 to start new service “service1” with Envoy configured as a sidecar proxy. Starting a service involves inter alia: template parsing (Mustache), registration (Consul), running sidecar proxy (Envoy) and running service TTL health check worker (GenServer). Next we start RPC server “used/implemented” in Example2.Server module and bind it to address generated earlier by MeshxConsul.start/4.

We execute similar bootstrapping process for service consumer. Instead of starting service we connect to upstream “service1” using MeshxConsul.connect/3. Finally we run few Example2.Client functions to demonstrate basic MeshxRpc API.

User controlled MeshxRpc settings: msg block size (see telemetry “blocks”), msg block checksums, configurable serialization (telemetry “ser”/“dser”), configurable request auditing up to the socket/connection level (conn_ref, node_ref, svc_ref, req_ref, hsk_ref). Library is using custom binary protocol and connection pooling.