Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Design of Capability Delivery Adjustments @ASDENCA
1. Design of Capability
Delivery Adjustments
Jānis Grabis, Jānis Kampars
Institute of Information Technology, Riga Technical University,
Kalku 1, Riga, Latvia
2. Outline
• Problem area
• Background
• Types of adjustments and their modeling
• Example
• Conclusion
3. Problem Area
• Development of adaptive applications
– Incl., context aware applications
• Complex, often computationally intensive
processing logics
• High volatility and variety of context and
other input data
• Adaptation criteria
4. Capability Delivery Application
• Companies provide business services
• Capability driven approach ensures service
delivery in different contextual situation
– With minimum context specific development
effort
• Capability delivery applications provide
capability enabled business services
– Context dependency processing is decoupled
from the core applications
8. Types of Adjustments
Calculations • Transforming raw context data into
meaningful interpretations for driving
service delivery
• Calculation of performance indicators
Scheduled
adjustments
• Adjustment is run according to a
specified schedule
• It alters behavior (e.g., parameters) of
the capability delivery applications
Event based
adjustment
• Capability delivery application invokes
scheduled adjustment whenever it
needs to make a context dependent
service delivery decision
10. Example
• A web service for processing images
– e.g. creating mosaics
• CDA is run on the cloud platform
• CNA changes parameters of the cloud
platform to ensure acceptable service
response time
• Adaptation algorithm is implemented as a
scheduled adjustment
11. Image Processing Service
CDA frontend
(image processing web site)
Msg Queue
Task
Container X
Container I
Mosaic
Request
Mosaic
13. Scheduled Adjustment
public class ScaleScheduledAdjustment {
public String execute(int min_nodes,
int max_nodes, int max_wait_time,
int queue_size, int nodes_count,
int avg_time_in_queue,
int busy_nodes) {
try {
// Empty queues and surplus of
workers
if (min_nodes < 1)
return "";
this.debug("nodes cur-" +
nodes_count + " min-" + min_nodes
+ " max-" + max_nodes + "
busy-" + busy_nodes);
// Scale up if requests in queue,
average time exceeds constant and
// max nodes not reached
if ((queue_size > 0) &&
(avg_time_in_queue > max_wait_time)
&& (nodes_count <=
max_nodes)) {
this.scale("up");
return "CASE1: scaling up to "
+
Integer.toString(nodes_count + 1) + "
nodes (cur:"
+ nodes_count + " min:" +
min_nodes + " max:"
+ max_nodes + ")";
}
• Adjustment increases a number of containers if
waiting time increases
• Adjustment decreases a number of containers if
waiting time decreases
• Adjustment changes resolution of external
services respond slowly
16. Conclusion
• Adjustments allow for separation of
concerns
• Adjustments serve as containers for
implementing adaption algorithms of
varying complexity
• Adjustments are the key mechanisms for
enabling business service delivery in
changing circumstances