adaptive-caching-framework

Name Message Date
evaluation
framework
results
.gitignore
experiments.sh
jmeter.log
README.md

Seamless and adaptive application-level caching

Meeting performance and scalability requirements while delivering services is a critical issue in web applications. Recently, latency and cost of Internet-based services are encouraging the use of application-level caching to continue satisfying users' demands and improve the scalability and availability of origin servers. Application-level caching, in which developers manually control cached content, has been adopted when traditional forms of caching are insufficient to meet such requirements. Despite its popularity, this level of caching is typically addressed in an ad-hoc way, given that it depends on specific details of the application. Furthermore, it forces application developers to reason about a crosscutting concern, which is unrelated to the application business logic. As a result, application-level caching is a time-consuming and error-prone task, becoming a common source of bugs. Among all the issues involved with application-level caching, the decision of what should be cached must frequently be adjusted to cope with the application evolution and usage, making it a challenging task.

Application-level caching is mainly characterized by caching techniques employed along with the application code, i.e. business, presentation and data logic. Therefore, it is not tied up to a specific caching location (server-side, proxy or client-side), because it can be conceived at the server-side, to speed up a Java-based application that produces HTML pages sent to users, as well as at the client-side, as a JavaScript-based application that executes part of its logic directly on the client's browser. In both situations, developers can reason about caching and implement a caching logic to satisfy their needs.

Identifying cacheable methods automatically

Evaluation setup
  • Three applications
  • Three application setups each: NO, DEV, AP
  • Three randomized simulation of execution for each application

Simulations were performed using three different caching configurations: (i) no application-level caching (NO), (ii) application-level caching manually designed and implemented by developers (DEV); and (iii) our approach (AP).

Required Tools

  • [Jmeter] (http://jmeter.apache.org/)
  • MySQL
  • Java 8
  • Maven 3

Applications

To prevent application bias in our results, we selected applications with different sizes (6.3--111.3 KLOC) and domains.

Our evaluation was performed with three open-source web applications:

  • [Cloud Store] (http://www.cloudscale-project.eu/)
  • [Spring petclinic] (https://github.com/SpringSource/spring-petclinic/)
  • [Shopizer] (https://github.com/shopizer-ecommerce/shopizer)

Application's setup

Requirements
  • Java 8
  • Maven 3
  • Mysql database

[Shopizer] (https://github.com/shopizer-ecommerce/shopizer):

This application requires the installation of Elasticsearch (https://www.elastic.co/) to run properly.

Installation and configuration:

  • Create schema SALESMANAGER on the database
  • Configure the file database.properties with your database info
  • Database population: in the file shopizer-properties.xml there is the tag <prop key="POPULATE_TEST_DATA">true</prop>. Such configuration will provide 7 categories, 6 products, addresses USA, one customer, one admin, shipping info in the database in the first initialization of the system.
  • Compilar e rodar a aplicação: mvn clean install tomcat7:run-war -DskipTests

Use the urls above to access system's features

  • /shop → Páginas da loja
  • /admin → Administração com login: admin:password

[Petclinic] (https://github.com/spring-projects/spring-petclinic)

Installation and configuration:

  • Create schema perclinic on the database
  • Configure database on the file pom.xml
  • Populate database: on the first initialization it will be populated automatically
  • Compilar e rodar a aplicação: mvn clean install tomcat7:run-war -DskipTests
  • Url to access the system: http://localhost:9966/petclinic/

[CloudStore] (https://github.com/CloudScale-Project/CloudStore

Installation and configuration:

  • Restore the dump located in DEV/database/rds-tpcw-dump-latest.sql, such dump has 10000 books
  • Configure database on file src/main/resources/database/database.hibernate.properties
  • Compilar e rodar a aplicação: mvn clean install tomcat7:run-war -DskipTests
  • Url to access the system: http://localhost:9966/cloudstore/

Simulations

Our simulation emulated client sessions to exercise applications and evaluate decision criteria. Simulations consisted of 50 simultaneous users constantly navigating through the application, at a limit of 1000 requests per user.

Each emulated client navigates from an application page to another, randomly selecting the next page from those accessible from the current page. The navigation process starts on the application home page. Emulated clients thus follow the same navigation rules of a real user.

After run the application, JMeter is used to simulate load. Thus, open Jmeter, load the simulation setup according to the application that should be evaluated.

Metrics

To assess performance, we used two metrics: throughput (number of requests handled per second) and hit ratio, because they are well-known in the context of web applications and cache performance tests.

  • Throughput is obtained from Jmeter reports
  • Hit ratio must be acquired from jconsole after the end of the simulation. The hit ratio will be showed at EhCache → Estatistics → Hits