Executor is the fundamental part for FutoIn Service application.
- Service instance registration.
- Request and response message validation against Iface spec.
- Authentication and authorization processing.
- Throughput and concurrency limits per client/group of clients.
- Unified additional request information representation.
- Maintenance of persistent communication channels from clients.
Original specification can be found at FTN6: FutoIn Executor Concept.
Native Executor API should never be used by Service code. It is provided only for Service application initialization boilerplate.
The relevant member functions:
AdvancedCCM ccm()- get reference to Invoker CCM, if any
void register( AsyncSteps as, ifacever, impl )- add interface implementation
- ifacever must be represented as FutoIn interface identifier and version, separated by colon ”:”
- impl is object derived from native interface or associative name for lazy loading
void initFromCache( AsyncSteps as )
- load initialization from cache
void cacheInit( AsyncSteps as )
- store initialization to cache
- Shutdown Executor processing
void limitConf(name, options)
- Setup configuration of custom limit
- name - custom limit name
- options - AsyncSteps Limiter options
- Configure static address to custom limit mapping
- map - custom limit name to list of CIDR addresses
For general stability and fair use, compliant Executor implementation should throttle API requests based on source address at least. Additional limits may be imposed per user ID.
Please check AsyncSteps Limiter to better understand the logic of throttling.
The limits are configured per “limit zone” type. The limit zone is created based on source address to limit zone type map. Source address can support CIDR-like network mask to better protect from DDoS attacks.
The pre-defined limit zone types are:
- concurrent=8 - maximum active requests at any single time
- max_queue=32 - pending requests
- rate=10 - requests per period
- period_ms=1000 - period of one second
- burst=null - unlimited (max concurrent by fact)
Custom limits can be configured through
Executor#limitConf(). Request limit zone can
be configured for address or range of addresses trough