This is the implementation of external client, addressing #96.
Public Interface
ExternalGroup introduced in include/derecho/core/external_group.hpp is a light-weight "group" for external clients to communicate the Derecho group members without actually joining the group.
It exposes
In case of exceptions, users will have the option to update_view() and try p2p_send on a different node.
See src/applications/archive/external_client_tester.cpp for an example application.
Implementation Details
A fifth port external_port is introduced, which dedicates to establishing RMDA connections between external clients and group members. The sockets are maintained separately in external_client_connections in lf.cpp.
External clients will be the initiator of requests to group members. the external clients use GMS_PORT to contact group members just like any other internal member. The SST predicates are slightly refactored to handle this. There are two types of external client requests:
GET_VIEW, which requests a new view from a group member
ESTABLISH_P2P, which asks the group member to establish a P2P connection
Failure handling and garbage collection
For the external client side, whenever update_view() is called, it cleans up any stale connections to dead group members
For the group member side, check_failures_loop() will make an failure_upcall passed by rpc_manager if it detects any node has failed, including external ones.
This is the implementation of external client, addressing #96.
Public Interface
ExternalGroup
introduced ininclude/derecho/core/external_group.hpp
is a light-weight "group" for external clients to communicate the Derecho group members without actually joining the group. It exposesthat returns a reference to a
ExternalClientCaller
upon which the user may calljust like the existing
p2p_send
API for Derecho group members.The following additional APIs will give users information about the view so that they can decide what to pass in
get_ref
andp2p_send
.In case of exceptions, users will have the option to
update_view()
and tryp2p_send
on a different node.See
src/applications/archive/external_client_tester.cpp
for an example application.Implementation Details
external_port
is introduced, which dedicates to establishing RMDA connections between external clients and group members. The sockets are maintained separately inexternal_client_connections
inlf.cpp
.GMS_PORT
to contact group members just like any other internal member. The SST predicates are slightly refactored to handle this. There are two types of external client requests:GET_VIEW
, which requests a new view from a group memberESTABLISH_P2P
, which asks the group member to establish a P2P connectionupdate_view()
is called, it cleans up any stale connections to dead group memberscheck_failures_loop()
will make anfailure_upcall
passed by rpc_manager if it detects any node has failed, including external ones.