Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Model-Driven Analytics for Open Data APIs

527 views

Published on

Work presented at the International Workshop on Engineering Open Data (WEOD), held in conjunction with 18th International Conference on Web Engineering (ICWE 2018) in Cáceres, Spain on 5th June 2018.

Published in: Data & Analytics
  • Be the first to comment

  • Be the first to like this

Model-Driven Analytics for Open Data APIs

  1. 1. Elena Planas eplanash@uoc.edu Open University of Catalonia Model-Driven Analytics for Open Data APIs David Baneres dbaneres@uoc.edu Open University of Catalonia International Workshop on Engineering Open Data (WEOD) Held in conjunction with 18th International Conference on Web Engineering (ICWE 2018) Cáceres, Spain - 5th June 2018
  2. 2. goal of the open data movement: empower end-users to exploit and benefit from open-data
  3. 3. Citizens ask: How can we access and manipulate open data?
  4. 4. Citizens ask: How can we access and manipulate open data? Data providers ask: How our data is used by end-users?
  5. 5. Data providers ask: How our data is used by end-users? Citizens ask: How can we access and manipulate open data?
  6. 6. we provide a Model-Driven Analytical tool for Open Data APIs
  7. 7. we provide a Model-Driven Analytical tool for Open Data APIs our goal is to visualize how end-users interact with open data sources regarding several metrics
  8. 8. we provide a Model-Driven Analytical tool for Open Data APIs
  9. 9. we provide a Model-Driven Analytical tool for Open Data APIs Log gathering Log Transformation Computing & Visualizing metrics Step 1 Step 2 Step 3
  10. 10. Step 1: Log gathering
  11. 11. Record all the REQUESTS made by users to the different API end-points in a LOG FILE
  12. 12. Record all the REQUESTS made by users to the different API end-points in a LOG FILE
  13. 13. general REST request specific REST sub-request specific REST sub-request specific REST sub-request * Hamza Ed-Douibi, Javier Luis Canovas Izquierdo and Jordi Cabot. OpenAPItoUML: A tool to generate UML models from OpenAPI definitions ICWE 2018 Demo: 6th Wednesday. 09.00 - 10.30 API1 API2 API3
  14. 14. http://localhost:8080/OpenDataForAll/ODataService.svc/Countries http://restcountries.eu/rest/v2/all http://battuta.medunes.net/api /country/all?key=be8135f3cddb0 277a4c67711f8c0cd29 general REST request specific REST sub-requests
  15. 15. Record all the REQUESTS made by users to the different API end-points in a LOG FILE
  16. 16. LOG structure Opening: general request specific sub request 1 … specific sub request n Closing: general request
  17. 17. Opening: general request specific sub request 1 … specific sub request n Closing: general request #1 2017-11-10 11:02:20 - http://localhost:8080/OpenDataForAll/ODataService.svc/Countries #2 2017-11-10 11:02:23 - 200 http://restcountries.eu/rest/v2/all 2208 #3 2017-11-10 11:02:24 - 200 http://battuta.medunes.net/api/country/all?key=... 1076 #4 2017-11-10 11:02:24 - http://localhost:8080/OpenDataForAll/ODataService.svc/Countries yes Example LOG structure
  18. 18. Opening: general request specific sub request 1 … specific sub request n Closing: general request #1 2017-11-10 11:02:20 - http://localhost:8080/OpenDataForAll/ODataService.svc/Countries #2 2017-11-10 11:02:23 - 200 http://restcountries.eu/rest/v2/all 2208 #3 2017-11-10 11:02:24 - 200 http://battuta.medunes.net/api/country/all?key=... 1076 #4 2017-11-10 11:02:24 - http://localhost:8080/OpenDataForAll/ODataService.svc/Countries yes Example LOG structure
  19. 19. Opening: general request specific sub request 1 … specific sub request n Closing: general request #1 2017-11-10 11:02:20 - http://localhost:8080/OpenDataForAll/ODataService.svc/Countries #2 2017-11-10 11:02:23 - 200 http://restcountries.eu/rest/v2/all 2208 #3 2017-11-10 11:02:24 - 200 http://battuta.medunes.net/api/country/all?key=... 1076 #4 2017-11-10 11:02:24 - http://localhost:8080/OpenDataForAll/ODataService.svc/Countries yes Example LOG structure
  20. 20. #1 2017-11-10 11:02:20 - http://localhost:8080/OpenDataForAll/ODataService.svc/Countries #2 2017-11-10 11:02:23 - 200 http://restcountries.eu/rest/v2/all 2208 #3 2017-11-10 11:02:24 - 200 http://battuta.medunes.net/api/country/all?key=... 1076 #4 2017-11-10 11:02:24 - http://localhost:8080/OpenDataForAll/ODataService.svc/Countries yes LOG structure LOG information Example Time Requested APIs Server response Opening: general request specific sub request 1 … specific sub request n Closing: general request
  21. 21. #1 2017-11-10 11:02:20 - http://localhost:8080/OpenDataForAll/ODataService.svc/Countries #2 2017-11-10 11:02:23 - 200 http://restcountries.eu/rest/v2/all 2208 #3 2017-11-10 11:02:24 - 200 http://battuta.medunes.net/api/country/all?key=... 1076 #4 2017-11-10 11:02:24 - http://localhost:8080/OpenDataForAll/ODataService.svc/Countries yes LOG structure LOG information Example Time Requested APIs Server response Opening: general request specific sub request 1 … specific sub request n Closing: general request
  22. 22. #1 2017-11-10 11:02:20 - http://localhost:8080/OpenDataForAll/ODataService.svc/Countries #2 2017-11-10 11:02:23 - 200 http://restcountries.eu/rest/v2/all 2208 #3 2017-11-10 11:02:24 - 200 http://battuta.medunes.net/api/country/all?key=... 1076 #4 2017-11-10 11:02:24 - http://localhost:8080/OpenDataForAll/ODataService.svc/Countries yes LOG structure LOG information Example Time Requested APIs Server response Opening: general request specific sub request 1 … specific sub request n Closing: general request
  23. 23. #1 2017-11-10 11:02:20 - http://localhost:8080/OpenDataForAll/ODataService.svc/Countries #2 2017-11-10 11:02:23 - 200 http://restcountries.eu/rest/v2/all 2208 #3 2017-11-10 11:02:24 - 200 http://battuta.medunes.net/api/country/all?key=... 1076 #4 2017-11-10 11:02:24 - http://localhost:8080/OpenDataForAll/ODataService.svc/Countries yes LOG structure LOG information Opening: general request specific sub request 1 … specific sub request n Closing: general request Example Time Requested APIs Server response
  24. 24. Step 2: Log Transformation
  25. 25. TRANSFORM the initial LOG FILE to enrich its information
  26. 26. TRANSFORMED LOGINITIAL LOG
  27. 27. TRANSFORMED LOGINITIAL LOG Input timestamp general / for sub-query Output timestamp general / for sub-query Response time for each request and sub-request Total time for resolving a request Time
  28. 28. TRANSFORMED LOGINITIAL LOG Input timestamp general / for sub-query Output timestamp general / for sub-query Response time for each request and sub-request Total time for resolving a request Time General request Specific sub-requests Number of sub-requests for each general request Number of requested APIs in each general request Requested APIs
  29. 29. TRANSFORMED LOGINITIAL LOG Input timestamp general / for sub-query Output timestamp general / for sub-query Response time for each request and sub-request Total time for resolving a request Time General request Specific sub-requests Number of sub-requests for each general request Number of requested APIs in each general request Requested APIs Reliability of each request and sub-request Server response Reliability of each request and sub-request
  30. 30. Step 3: Computing & Visualizing metrics
  31. 31. COMPUTE and VISUALIZE several USAGE METRICS
  32. 32. COMPUTE and VISUALIZE several USAGE METRICS
  33. 33. COMPUTE and VISUALIZE several USAGE METRICS PERFORMANCE METRICS SEMANTIC METRICS
  34. 34. the aim of the is to measure and report performance and volumes of manipulated APIs PERFORMANCE METRICS
  35. 35. API RELIABILITY Average RESPONSE TIME - by API - by request / sub-requests Average number of ACCESSED APIs for each request Average number of GENERATED SUB-REQUESTS for each request QUERY HISTORY PERFORMANCE METRICS
  36. 36. Response time by API: Response time by request / sub-request: % % % % % % API1 API2 API3 Request1 Sub-request1.1 Sub-request1.2 % API RELIABILITY Average RESPONSE TIME - by API - by request / sub-requests Average number of ACCESSED APIs for each request Average number of GENERATED SUB-REQUESTS for each request QUERY HISTORY PERFORMANCE METRICS
  37. 37. Accessed APIs for each request: % % Request1 Request2 Request3 % API RELIABILITY Average RESPONSE TIME - by API - by request / sub-requests Average number of ACCESSED APIs for each request Average number of GENERATED SUB-REQUESTS for each request QUERY HISTORY PERFORMANCE METRICS
  38. 38. Generated sub-requests for each request: % % Request1 Request2 Request3 % API RELIABILITY Average RESPONSE TIME - by API - by request / sub-requests Average number of ACCESSED APIs for each request Average number of GENERATED SUB-REQUESTS for each request QUERY HISTORY PERFORMANCE METRICS
  39. 39. Collecting response codes of each sub-request: Successfully served Error: Bad request Error: not found API RELIABILITY Average RESPONSE TIME - by API - by request / sub-requests Average number of ACCESSED APIs for each request Average number of GENERATED SUB-REQUESTS for each request QUERY HISTORY PERFORMANCE METRICS
  40. 40. Performance metrics can be filtered by several criteria: API RELIABILITY Average RESPONSE TIME - by API - by request / sub-requests Average number of ACCESSED APIs for each request Average number of GENERATED SUB-REQUESTS for each request QUERY HISTORY PERFORMANCE METRICS
  41. 41. the aim of the is to analyze the consumed data in the context of the UML model representing the requested APIs SEMANTIC METRICS
  42. 42. HEAT UML MODEL ENTITY/FIELD CONSUMPTION QUERY DIAGRAM SEMANTIC METRICS
  43. 43. Entities consumption is highlighted using different colours: High demand Low demand HEAT UML MODEL ENTITY/FIELD CONSUMPTION QUERY DIAGRAM SEMANTIC METRICS
  44. 44. Show the number of requests to an specific entity / field: HEAT UML MODEL ENTITY/FIELD CONSUMPTION QUERY DIAGRAM SEMANTIC METRICS
  45. 45. Show the navigability to resolve the performed query: HEAT UML MODEL ENTITY/FIELD CONSUMPTION QUERY DIAGRAM SEMANTIC METRICS
  46. 46. COMPUTE and VISUALIZE several USAGE METRICS
  47. 47. Search Processing Language (SPL) based on SQL index = TransformedLog | stats avg(timeForRequest) Example
  48. 48. COMPUTE and VISUALIZE several USAGE METRICS
  49. 49. dashboard (I) Average response time by API
  50. 50. dashboard (II) Average response time by request
  51. 51. dashboard (III) Reliability
  52. 52. dashboard (IV) Query history
  53. 53. dashboard (V) Heat Map & Consumption
  54. 54. Conclusions
  55. 55. we provide a Model-Driven Analytical tool for Open Data APIs the monitoring and visualization of the open data consumption report highly valuable information to data providers Improve data - Data precision - Avoiding overlapping - Removing non-accessed-data Infer new knowledge - New content to be published - Potential partnerships
  56. 56. Elena Planas eplanash@uoc.edu Open University of Catalonia Model-Driven Analytics for Open Data APIs David Baneres dbaneres@uoc.edu Open University of Catalonia Questions? * All the images of this presentation have been acquired from http://pixabay.com

×