Module cloudi_service_funnel

CloudI Funnel Service

The funnel service is a way of using duplicate service request sends (possibly from separate service processes processing the same data) with the goal of making the sending service fault-tolerant.

.

Copyright © 2020 Michael Truog

Version: 2.0.1 Nov 26 2020 18:17:34 ------------------------------------------------------------------------

Behaviours: cloudi_service.

Authors: Michael Truog (mjtruog at protonmail dot com).

Description

CloudI Funnel Service

The funnel service is a way of using duplicate service request sends (possibly from separate service processes processing the same data) with the goal of making the sending service fault-tolerant.

The funnel service is the opposite of cloudi_service_quorum due to receiving many service requests that may be duplicates and only sending unique service requests with distributed fault-tolerance. A duplicate service request has the same service name, request info and request. Each duplicate still contains a unique trans_id and is only a duplicate while the timeout time periods elapse.

The funnel service creates its own service request for the first unique service request it receives and any response it receives will be used for replies to duplicate service requests. The last recent timeout time period before the response is received is used for retaining the response data for future duplicate service requests.

With the funnel service's sensitivity to a service request's timeout value, other more robust approaches to fault-tolerance should be preferred (e.g., cloudi_service_queue and/or cloudi_service_quorum). The funnel service provides a way to make a CloudI service fault-tolerant without modifying the service (assuming the send destinations are easy to point at the funnel service) but it does add latency to the service request sends and may require larger timeout values. If timeout values are too small, duplicate service requests may not be recognized by the funnel service and it could send more than a single service request for a group of duplicate service requests it receives.

The funnel service could receive separate service request sends from separate instances of cloudi_service_cron that are using the same initialization arguments (the cron expression arguments could also include {send_mcast, true} to ensure all cloudi_service_funnel processes get the cron expression service request data, {send_args_info, true} is necessary to make each cron event's service request unique). That would provide cloudi_service_cron execution with distributed fault-tolerance that relies on cloudi_service_funnel execution.

Function Index

cloudi_service_handle_info/3
cloudi_service_handle_request/11
cloudi_service_init/4
cloudi_service_terminate/3
request_crdt_merge/2
request_send_retry_crdt/1
response_store_crdt/2
response_timeout_crdt/1
senders_crdt_merge/2

Function Details

cloudi_service_handle_info/3

cloudi_service_handle_info(Crdt_event, State, Dispatcher) -> any()

cloudi_service_handle_request/11

cloudi_service_handle_request(RequestType, Name, Pattern, RequestInfo, Request, Timeout, Priority, TransId, Pid, State, Dispatcher) -> any()

cloudi_service_init/4

cloudi_service_init(Args, Prefix, Timeout, Dispatcher) -> any()

cloudi_service_terminate/3

cloudi_service_terminate(Reason, Timeout, State) -> any()

request_crdt_merge/2

request_crdt_merge(X1, Request) -> any()

request_send_retry_crdt/1

request_send_retry_crdt(Request) -> any()

response_store_crdt/2

response_store_crdt(ResponseData, RequestValue) -> any()

response_timeout_crdt/1

response_timeout_crdt(Request) -> any()

senders_crdt_merge/2

senders_crdt_merge(Senders, SendersOld) -> any()


Generated by EDoc