lecture on "qos in web services" - master course
DESCRIPTION
TRANSCRIPT
![Page 1: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/1.jpg)
Web Services’
LifecycleQoS in
![Page 2: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/2.jpg)
From scratch
Search for existing ones
Web Service
![Page 3: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/3.jpg)
There are same Non-Functional capabilities
notmany web services with the
![Page 4: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/4.jpg)
Service selection
![Page 5: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/5.jpg)
Service selection
![Page 6: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/6.jpg)
Service selection
$
![Page 7: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/7.jpg)
$
Service selection
![Page 8: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/8.jpg)
$0 $
0 $
5 $
2.5 $
99.65%99.45%96.75%99.91%95.05%
0.31 s
0.42 s
0.55 s0.28 s1.22 s
1.5 $
Service selection
![Page 9: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/9.jpg)
$
Service selection
1
1
0
0.5
0.7
0.95
0.91
0.35
1
0
0.97
0.85
0.71
1
0
![Page 10: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/10.jpg)
$
Service selection
0.20.50.3Weight:
![Page 11: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/11.jpg)
$
Service selection
1
1
0
0.5
0.7
0.95
0.91
0.35
1
0
0.97
0.85
0.71
1
0
0.20.50.3
![Page 12: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/12.jpg)
Service selection
0.978
0.991
0.406
0.950
0.140
Overall result
![Page 13: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/13.jpg)
Service selection
0.991
![Page 14: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/14.jpg)
Service Level Agreements
![Page 15: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/15.jpg)
Service Level Agreements
WS-AgreementSLA standard (in the academia)
![Page 16: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/16.jpg)
Service Level Agreements
![Page 17: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/17.jpg)
Service Level Agreements
Name, id
![Page 18: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/18.jpg)
Service Level Agreements
Name, id
Context
![Page 19: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/19.jpg)
Service Level Agreements
Name, id
Context
Terms:
![Page 20: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/20.jpg)
Service Level Agreements
Name, id
Context
Terms:- Service description termsLas presentes condiciones generales regulan los Servicios Telemáticos Financieros indicados en las condiciones particulares (en adelante, “el Servicio”), así como el procedimiento de utilización del mismo por el Titular para la realización de las operaciones que integren en cada momento el Servicio. Los Servicios Telemátios Financeros a los que el titular puede accedir quedan establecidos en la relación contendia en las Condiciones Particulares del presente contrato. Los Servicios Telemáticos Financieros ofrecidoos podran ser modificados por el Titular en cualquier momento,
![Page 21: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/21.jpg)
Service Level Agreements
Name, id
Context
Terms:- Service description termsLas presentes condiciones generales regulan los Servicios Telemáticos Financieros indicados en las condiciones particulares (en adelante, “el Servicio”), así como el procedimiento de utilización del mismo por el Titular para la realización de las operaciones que integren en cada momento el Servicio. Los Servicios Telemátios Financeros a los que el titular puede accedir quedan establecidos en la relación contendia en las Condiciones Particulares del presente contrato. Los Servicios Telemáticos Financieros ofrecidoos podran ser modificados por el Titular en cualquier momento,
- Guarantee terms Podrá establecer límites de disposición para operaciones que impliquen disponibilidad o movimiento de fondos, límites que podran ser de distintos importes en función del Servicio Telematico Financiero a través del que se opere. Podrá modificar estos límites de disposicion cuando lo estime necesario, prévia comunicación al titular que podrá realizarse a través del propio Servicio Telemático
![Page 22: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/22.jpg)
Service Level Agreements
Service scopeQualifying conditionService Level ObjectiveBusiness value List
Guarantee termsName, id
Context
Terms:- Service description termsLas presentes condiciones generales regulan los Servicios Telemáticos Financieros indicados en las condiciones particulares (en adelante, “el Servicio”), así como el procedimiento de utilización del mismo por el Titular para la realización de las operaciones que integren en cada momento el Servicio. Los Servicios Telemátios Financeros a los que el titular puede accedir quedan establecidos en la relación contendia en las Condiciones Particulares del presente contrato. Los Servicios Telemáticos Financieros ofrecidoos podran ser modificados por el Titular en cualquier momento,
- Guarantee terms Podrá establecer límites de disposición para operaciones que impliquen disponibilidad o movimiento de fondos, límites que podran ser de distintos importes en función del Servicio Telematico Financiero a través del que se opere. Podrá modificar estos límites de disposicion cuando lo estime necesario, prévia comunicación al titular que podrá realizarse a través del propio Servicio Telemático
![Page 23: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/23.jpg)
Service Level Agreements
Service scopeQualifying conditionService Level ObjectiveBusiness value List
Guarantee termsName, id
Context
Terms:- Service description termsLas presentes condiciones generales regulan los Servicios Telemáticos Financieros indicados en las condiciones particulares (en adelante, “el Servicio”), así como el procedimiento de utilización del mismo por el Titular para la realización de las operaciones que integren en cada momento el Servicio. Los Servicios Telemátios Financeros a los que el titular puede accedir quedan establecidos en la relación contendia en las Condiciones Particulares del presente contrato. Los Servicios Telemáticos Financieros ofrecidoos podran ser modificados por el Titular en cualquier momento,
- Guarantee terms Podrá establecer límites de disposición para operaciones que impliquen disponibilidad o movimiento de fondos, límites que podran ser de distintos importes en función del Servicio Telematico Financiero a través del que se opere. Podrá modificar estos límites de disposicion cuando lo estime necesario, prévia comunicación al titular que podrá realizarse a través del propio Servicio Telemático
![Page 24: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/24.jpg)
Service Level Agreements
Service scopeQualifying conditionService Level ObjectiveBusiness value List
Guarantee termsName, id
Context
Terms:- Service description termsLas presentes condiciones generales regulan los Servicios Telemáticos Financieros indicados en las condiciones particulares (en adelante, “el Servicio”), así como el procedimiento de utilización del mismo por el Titular para la realización de las operaciones que integren en cada momento el Servicio. Los Servicios Telemátios Financeros a los que el titular puede accedir quedan establecidos en la relación contendia en las Condiciones Particulares del presente contrato. Los Servicios Telemáticos Financieros ofrecidoos podran ser modificados por el Titular en cualquier momento,
- Guarantee terms Podrá establecer límites de disposición para operaciones que impliquen disponibilidad o movimiento de fondos, límites que podran ser de distintos importes en función del Servicio Telematico Financiero a través del que se opere. Podrá modificar estos límites de disposicion cuando lo estime necesario, prévia comunicación al titular que podrá realizarse a través del propio Servicio Telemático
![Page 25: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/25.jpg)
Service Level Agreements
Service scopeQualifying conditionService Level ObjectiveBusiness value List
Guarantee termsName, id
Context
Terms:- Service description termsLas presentes condiciones generales regulan los Servicios Telemáticos Financieros indicados en las condiciones particulares (en adelante, “el Servicio”), así como el procedimiento de utilización del mismo por el Titular para la realización de las operaciones que integren en cada momento el Servicio. Los Servicios Telemátios Financeros a los que el titular puede accedir quedan establecidos en la relación contendia en las Condiciones Particulares del presente contrato. Los Servicios Telemáticos Financieros ofrecidoos podran ser modificados por el Titular en cualquier momento,
- Guarantee terms Podrá establecer límites de disposición para operaciones que impliquen disponibilidad o movimiento de fondos, límites que podran ser de distintos importes en función del Servicio Telematico Financiero a través del que se opere. Podrá modificar estos límites de disposicion cuando lo estime necesario, prévia comunicación al titular que podrá realizarse a través del propio Servicio Telemático
![Page 26: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/26.jpg)
Service Level Agreements
Service scopeQualifying conditionService Level ObjectiveBusiness value List
Guarantee termsName, id
Context
Terms:- Service description termsLas presentes condiciones generales regulan los Servicios Telemáticos Financieros indicados en las condiciones particulares (en adelante, “el Servicio”), así como el procedimiento de utilización del mismo por el Titular para la realización de las operaciones que integren en cada momento el Servicio. Los Servicios Telemátios Financeros a los que el titular puede accedir quedan establecidos en la relación contendia en las Condiciones Particulares del presente contrato. Los Servicios Telemáticos Financieros ofrecidoos podran ser modificados por el Titular en cualquier momento,
- Guarantee terms Podrá establecer límites de disposición para operaciones que impliquen disponibilidad o movimiento de fondos, límites que podran ser de distintos importes en función del Servicio Telematico Financiero a través del que se opere. Podrá modificar estos límites de disposicion cuando lo estime necesario, prévia comunicación al titular que podrá realizarse a través del propio Servicio Telemático
![Page 27: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/27.jpg)
Service Level Agreements
Name, id
Context
Terms:- Service description termsLas presentes condiciones generales regulan los Servicios Telemáticos Financieros indicados en las condiciones particulares (en adelante, “el Servicio”), así como el procedimiento de utilización del mismo por el Titular para la realización de las operaciones que integren en cada momento el Servicio. Los Servicios Telemátios Financeros a los que el titular puede accedir quedan establecidos en la relación contendia en las Condiciones Particulares del presente contrato. Los Servicios Telemáticos Financieros ofrecidoos podran ser modificados por el Titular en cualquier momento,
- Guarantee terms Podrá establecer límites de disposición para operaciones que impliquen disponibilidad o movimiento de fondos, límites que podran ser de distintos importes en función del Servicio Telematico Financiero a través del que se opere. Podrá modificar estos límites de disposicion cuando lo estime necesario, prévia comunicación al titular que podrá realizarse a través del propio Servicio Telemático
![Page 28: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/28.jpg)
Self Adaptive Service Based Systems
![Page 29: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/29.jpg)
Self Adaptive Service Based Systems
Database
Web service Web service
Web service
Web service
![Page 30: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/30.jpg)
Self Adaptive Service Based Systems
Database
Web service Web service
Web service
Web service
![Page 31: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/31.jpg)
Self Adaptive Service Based Systems
Database
Web service Web service
Web service
Web service
!
Web service
![Page 32: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/32.jpg)
Self Adaptive Service Based Systems
Database
Web service
Web service
Web service
!
Web service
Web service
Web service
Web service
![Page 33: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/33.jpg)
Self Adaptive Service Based Systems
Method_xParam 1, Param 2,... param N
Method_yParam 1,Param 2,...Param M
≠
Challenges
![Page 34: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/34.jpg)
Self Adaptive Service Based Systems
Sorry, no pictures
Challenges
![Page 35: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/35.jpg)
Monitor
![Page 36: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/36.jpg)
Web Services
Monitoring
![Page 37: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/37.jpg)
![Page 38: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/38.jpg)
Online testing
![Page 39: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/39.jpg)
Passive monitoring
![Page 40: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/40.jpg)
![Page 41: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/41.jpg)
Online testing
![Page 42: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/42.jpg)
The malfunction of a service can be detected before the user tries to use it
Online testing
![Page 43: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/43.jpg)
You can control the number of measurements per time
Online testing
![Page 44: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/44.jpg)
You can test the behaviour of the system at stressful situations
Online testing
![Page 45: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/45.jpg)
Passive monitoring
![Page 46: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/46.jpg)
You get the QoS of real requests
Passive monitoring
![Page 47: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/47.jpg)
it’s less intrusive
Passive monitoring
![Page 48: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/48.jpg)
Can get the QoS of more services: stateful and non-free services
Passive monitoring
![Page 49: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/49.jpg)
How do they work?
![Page 50: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/50.jpg)
Online testing
tester service
![Page 51: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/51.jpg)
Passive monitoring
client service
![Page 52: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/52.jpg)
Passive monitoring
clientCode
Service Code
Service Engine
Clientengine
Service messages
![Page 53: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/53.jpg)
Passive monitoring
clientCode
Service Code
Service Engine
Clientengine
Service messages
Monitors inside the code
![Page 54: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/54.jpg)
void processNextStep() { boolean isBorderTouched = false; // Generate new location of snake head. int newHeadLocX = (int) snakeBodyPart[0].getLocation().getX() + directionX; int newHeadLocY = (int) snakeBodyPart[0].getLocation().getY() + directionY;
// Most last part of the snake is food. int foodLocX = (int) snakeBodyPart[totalBodyPart - 1].getLocation().getX(); int foodLocY = (int) snakeBodyPart[totalBodyPart - 1].getLocation().getY();
// Check does snake cross the border of the board? if (newHeadLocX >= BOARD_WIDTH - SNAKE_BODY_PART_SQURE) { newHeadLocX = 0; isBorderTouched = true; } else if (newHeadLocX <= 0) { newHeadLocX = BOARD_WIDTH - SNAKE_BODY_PART_SQURE; isBorderTouched = true; } else if (newHeadLocY >= BOARD_HEIGHT - SNAKE_BODY_PART_SQURE) { newHeadLocY = 0; isBorderTouched = true; } else if (newHeadLocY <= 0) { newHeadLocY = BOARD_HEIGHT - SNAKE_BODY_PART_SQURE; isBorderTouched = true; }
// Check has snake touched the food? if (newHeadLocX == foodLocX && newHeadLocY == foodLocY) { // Set score. score += 5; scoreViewer.setText("Score==>" + score);
// Check bonus food should be given or not? if (score % 50 == 0 && !isBonusFoodAvailable) { createBonusFood(); } // Create new food. createFood(); }
// Check has snake touched the bonus food? if (isBonusFoodAvailable && pointOfBonusFood.x <= newHeadLocX && pointOfBonusFood.y <= newHeadLocY && (pointOfBonusFood.x + SNAKE_BODY_PART_SQURE) >= newHeadLocX && (pointOfBonusFood.y + SNAKE_BODY_PART_SQURE) >= newHeadLocY) { board.remove(bonusfood); score += 100; scoreViewer.setText("Score ==>" + score); isBonusFoodAvailable = false; } // Check is game over? if(isGameOver(isBorderTouched, newHeadLocX, newHeadLocY)) { scoreViewer.setText("GAME OVER " + score); isRunning = false; return; } else { // Move the whole snake body to forword. moveSnakeForword(newHeadLocX, newHeadLocY); }
board.repaint(); }
![Page 55: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/55.jpg)
void processNextStep() { boolean isBorderTouched = false; // Generate new location of snake head. int newHeadLocX = (int) snakeBodyPart[0].getLocation().getX() + directionX; int newHeadLocY = (int) snakeBodyPart[0].getLocation().getY() + directionY;
// Most last part of the snake is food. int foodLocX = (int) snakeBodyPart[totalBodyPart - 1].getLocation().getX(); int foodLocY = (int) snakeBodyPart[totalBodyPart - 1].getLocation().getY();
// Check does snake cross the border of the board? if (newHeadLocX >= BOARD_WIDTH - SNAKE_BODY_PART_SQURE) { newHeadLocX = 0; isBorderTouched = true; } else if (newHeadLocX <= 0) { newHeadLocX = BOARD_WIDTH - SNAKE_BODY_PART_SQURE; isBorderTouched = true; } else if (newHeadLocY >= BOARD_HEIGHT - SNAKE_BODY_PART_SQURE) { newHeadLocY = 0; isBorderTouched = true; } else if (newHeadLocY <= 0) { newHeadLocY = BOARD_HEIGHT - SNAKE_BODY_PART_SQURE; isBorderTouched = true; }
// Check has snake touched the food? if (newHeadLocX == foodLocX && newHeadLocY == foodLocY) { // Set score. score += 5; scoreViewer.setText("Score==>" + score);
// Check bonus food should be given or not? if (score % 50 == 0 && !isBonusFoodAvailable) { createBonusFood(); } // Create new food. createFood(); }
// Check has snake touched the bonus food? if (isBonusFoodAvailable && pointOfBonusFood.x <= newHeadLocX && pointOfBonusFood.y <= newHeadLocY && (pointOfBonusFood.x + SNAKE_BODY_PART_SQURE) >= newHeadLocX && (pointOfBonusFood.y + SNAKE_BODY_PART_SQURE) >= newHeadLocY) { board.remove(bonusfood); score += 100; scoreViewer.setText("Score ==>" + score); isBonusFoodAvailable = false; } // Check is game over? if(isGameOver(isBorderTouched, newHeadLocX, newHeadLocY)) { scoreViewer.setText("GAME OVER " + score); isRunning = false; return; } else { // Move the whole snake body to forword. moveSnakeForword(newHeadLocX, newHeadLocY); }
board.repaint(); }
Monitoring code
Monitoring code
Monitoring code
![Page 56: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/56.jpg)
Aspect Oriented Programmingcode weaving
![Page 57: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/57.jpg)
void processNextStep() { boolean isBorderTouched = false; // Generate new location of snake head. int newHeadLocX = (int) snakeBodyPart[0].getLocation().getX() + directionX; int newHeadLocY = (int) snakeBodyPart[0].getLocation().getY() + directionY;
// Most last part of the snake is food. int foodLocX = (int) snakeBodyPart[totalBodyPart - 1].getLocation().getX(); int foodLocY = (int) snakeBodyPart[totalBodyPart - 1].getLocation().getY();
// Check does snake cross the border of the board? if (newHeadLocX >= BOARD_WIDTH - SNAKE_BODY_PART_SQURE) { newHeadLocX = 0; isBorderTouched = true; } else if (newHeadLocX <= 0) { newHeadLocX = BOARD_WIDTH - SNAKE_BODY_PART_SQURE; isBorderTouched = true; } else if (newHeadLocY >= BOARD_HEIGHT - SNAKE_BODY_PART_SQURE) { newHeadLocY = 0; isBorderTouched = true; } else if (newHeadLocY <= 0) { newHeadLocY = BOARD_HEIGHT - SNAKE_BODY_PART_SQURE; isBorderTouched = true; }
// Check has snake touched the food? if (newHeadLocX == foodLocX && newHeadLocY == foodLocY) { // Set score. score += 5; scoreViewer.setText("Score==>" + score);
// Check bonus food should be given or not? if (score % 50 == 0 && !isBonusFoodAvailable) { createBonusFood(); } // Create new food. createFood(); }
// Check has snake touched the bonus food? if (isBonusFoodAvailable && pointOfBonusFood.x <= newHeadLocX && pointOfBonusFood.y <= newHeadLocY && (pointOfBonusFood.x + SNAKE_BODY_PART_SQURE) >= newHeadLocX && (pointOfBonusFood.y + SNAKE_BODY_PART_SQURE) >= newHeadLocY) { board.remove(bonusfood); score += 100; scoreViewer.setText("Score ==>" + score); isBonusFoodAvailable = false; } // Check is game over? if(isGameOver(isBorderTouched, newHeadLocX, newHeadLocY)) { scoreViewer.setText("GAME OVER " + score); isRunning = false; return; } else { // Move the whole snake body to forword. moveSnakeForword(newHeadLocX, newHeadLocY); }
board.repaint(); }
Monitoring code
Monitoring code
Monitoring code
![Page 58: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/58.jpg)
void processNextStep() { boolean isBorderTouched = false; // Generate new location of snake head. int newHeadLocX = (int) snakeBodyPart[0].getLocation().getX() + directionX; int newHeadLocY = (int) snakeBodyPart[0].getLocation().getY() + directionY;
// Most last part of the snake is food. int foodLocX = (int) snakeBodyPart[totalBodyPart - 1].getLocation().getX(); int foodLocY = (int) snakeBodyPart[totalBodyPart - 1].getLocation().getY();
// Check does snake cross the border of the board? if (newHeadLocX >= BOARD_WIDTH - SNAKE_BODY_PART_SQURE) { newHeadLocX = 0; isBorderTouched = true; } else if (newHeadLocX <= 0) { newHeadLocX = BOARD_WIDTH - SNAKE_BODY_PART_SQURE; isBorderTouched = true; } else if (newHeadLocY >= BOARD_HEIGHT - SNAKE_BODY_PART_SQURE) { newHeadLocY = 0; isBorderTouched = true; } else if (newHeadLocY <= 0) { newHeadLocY = BOARD_HEIGHT - SNAKE_BODY_PART_SQURE; isBorderTouched = true; }
// Check has snake touched the food? if (newHeadLocX == foodLocX && newHeadLocY == foodLocY) { // Set score. score += 5; scoreViewer.setText("Score==>" + score);
// Check bonus food should be given or not? if (score % 50 == 0 && !isBonusFoodAvailable) { createBonusFood(); } // Create new food. createFood(); }
// Check has snake touched the bonus food? if (isBonusFoodAvailable && pointOfBonusFood.x <= newHeadLocX && pointOfBonusFood.y <= newHeadLocY && (pointOfBonusFood.x + SNAKE_BODY_PART_SQURE) >= newHeadLocX && (pointOfBonusFood.y + SNAKE_BODY_PART_SQURE) >= newHeadLocY) { board.remove(bonusfood); score += 100; scoreViewer.setText("Score ==>" + score); isBonusFoodAvailable = false; } // Check is game over? if(isGameOver(isBorderTouched, newHeadLocX, newHeadLocY)) { scoreViewer.setText("GAME OVER " + score); isRunning = false; return; } else { // Move the whole snake body to forword. moveSnakeForword(newHeadLocX, newHeadLocY); }
board.repaint(); }
Monitoring code
Monitoring code
Monitoring code
![Page 59: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/59.jpg)
Passive monitoring
clientCode
Service Code
Service Engine
Clientengine
Service messages
Monitors inside the code
![Page 60: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/60.jpg)
Passive monitoring
clientCode
Service Code
Service Engine
Clientengine
Service messages
Monitors inside the engine
![Page 61: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/61.jpg)
step1
step2
Step3
step4
![Page 62: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/62.jpg)
step1
Step2
Monitorcode
Step3
step4
![Page 63: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/63.jpg)
Passive monitoring
clientCode
Service Code
Service Engine
Clientengine
Service messages
Monitors inside the engine
![Page 64: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/64.jpg)
Passive monitoring
clientCode
Service Code
Service Engine
Clientengine
Service messages
Monitors the message
![Page 65: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/65.jpg)
Passive monitoring
clientCode
Service Code
Service Engine
Clientengine
Service messages
ENTERPRISE SERVICE BUS
![Page 66: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/66.jpg)
Passive monitoring
clientCode
Service Code
Service Engine
Clientengine
ENTERPRISE SERVICE BUS
![Page 67: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/67.jpg)
This is what we do
![Page 68: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/68.jpg)
SALMon
![Page 69: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/69.jpg)
SALMon’s Features
![Page 70: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/70.jpg)
SALMon’s Features
passive monitoring + online testing
![Page 71: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/71.jpg)
SALMon’s Features
Extensible with new metrics
![Page 72: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/72.jpg)
SALMon’s Features
Extensible with new types of services
![Page 73: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/73.jpg)
SALMon’s Features
Several mechanisms to retrieve the QoS
![Page 74: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/74.jpg)
SALMon’s Features
Easily interoperable
![Page 75: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/75.jpg)
![Page 76: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/76.jpg)
To conclude...
![Page 77: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/77.jpg)
Activities in the service lifecycle:- Service selection- Service level agreement- Service adaptation
Monitoring - Online testing- Passive monitoring
SALMon
1
2
3
![Page 78: Lecture on "QoS in Web Services" - Master course](https://reader037.vdocuments.net/reader037/viewer/2022102823/548d1af3b47959ff4d8b46b9/html5/thumbnails/78.jpg)
Questions&Answers