• Refine Query
  • Source
  • Publication year
  • to
  • Language
  • 1
  • Tagged with
  • 1
  • 1
  • 1
  • 1
  • 1
  • 1
  • 1
  • 1
  • 1
  • 1
  • 1
  • 1
  • About
  • The Global ETD Search service is a free service for researchers to find electronic theses and dissertations. This service is provided by the Networked Digital Library of Theses and Dissertations.
    Our metadata is collected from universities around the world. If you manage a university/consortium/country archive and want to be added, details can be found on the NDLTD website.
1

Blocking violations in reactive Java frameworks

Vallin, Morgan, Sundström, Robin January 2020 (has links)
Concurrency in programming is a way of interleaving tasks in order to enhance the performance of an application. Previous research has found that concurrency errors are hard to avoid, hard to find, and that they often degrade performance of the application. Reactive programming provides an abstraction, to make it easier to implement complex concurrent and asynchronous tasks. When programming reactively in Java, it is often done with a reactive framework, where RxJava and Project-Reactor are two of the more popular choices. Blocking a thread that is not supposed to be blocked will result in concurrency errors, without the Java compiler providing a warning. In order to find incorrect blocking, a tool called BlockHound can be used. BlockHound wraps the original code, intercepts any blocking calls, and provides an error if the blocking call was used incorrectly. In this study, BlockHound was used to detect erroneous blocking calls in open source projects which use RxJava or Project-Reactor. A JavaAgent was created to automate the process of adding BlockHound to a project. The selection of projects to test was done by evaluating the community usage, and selecting the projects with the most amount of stars and forks, as this indicates that the projects are widely used. The projects were tested with BlockHound, and the errors were saved to external log files for analysation. The study found that a considerable percentage of the projects investigated exhibited blocking violations. These violations were all caused by a low number of system calls, made from methods in threads that forbid blocking. Generalizable solutions to the violations were applied, and considered successful. / Samtidighet (concurrency) inom programmering är ett sätt att kombinera olika uppgifter, för att få utökad prestanda i ett program. Tidigare forskning har visat att concurrencybuggar är svåra att undvika, svåra att upptäcka och att dem ofta försämrar programmets prestanda. Reaktiv programmering skapar en abstraktion som gör det enklare att implementera komplexa samtidiga och asynkrona uppgifter. Reaktiv programmering i Java används ofta med hjälp av ett reaktivt ramverk, där två av de mer populära är RxJava och Project-reactor. Att blockera i en tråd som inte tillåter blockering kommer skapa concurrency buggar, som Javas kompilator inte varnar för. För att upptäcka felaktiga blockeringar kan ett verktyg som heter BlockHound användas. BlockHound omsluter den ursprungliga koden, fångar eventuella blockeringar, och skickar ett felmeddelande om en felaktig blockering har upptäckts. I den här studien har BlockHound använts för att hitta felaktiga blockeringar i open source projekt som använde sig av antingen RxJava eller Project-reactor. En JavaAgent skapades för att automatisera processen att lägga till BlockHound i projekten. Processen att välja projekt för testning gjordes genom att utvärdera hur stor användningen av projekten var, samt genom att välja de projekt med mest antal stjärnor och forks, eftersom de ger en bra indikering på att projekten används brett inom området. Projekten testades sedan med BlockHound, och loggarna sparades manuellt till externa loggfiler för analys. Studien fann att en betydande procent av projekten som undersöktes innehöll felaktiga blockeringar. Orsaken till dessa var ett fåtal systemanrop som kallades från trådar som inte tillåter blockering. Generaliserbara lösningar till dessa buggar testades, och ansågs vara lyckade.

Page generated in 0.0316 seconds