Asynchronous relational database access in the Grails framework

OData support
Imre Gábor
Department of Automation and Applied Informatics

The widespread adoption of internet services has changed expectations of how the systems

implementing them should work. It is a challenge to build an application that can deal

with a highly concurrent workload while trying to minimize the costs of such a system.

This thesis focuses on Java web applications that need to access relational databases to

provide their services. I’ve chosen Grails as the web application framework that I will

examine in particular.

Programs using non-blocking, asynchronous Input/Output operations aim to control

resource usage by reducing the number of operating system threads used in a program.

In the first chapter of this thesis I will take a look at what non-blocking IO means, and

how the Linux operating system implements such operations. Next I will take a look at

threads, as the de facto concurrency handling mechanism in many of the most popular

programming languages. I will take a look at what services they provide, and why reducing

the number of threads in a program may lead to better resource utilization.

In Chapter 3 I will examine alternative approaches to handling concurrency, how each

may be implemented, and how they compare to threads in terms of resource consumption,

and programming model.

After investigating different concurrency handling models, I choose one and create a

Grails application in Chapter 5 to see how threads can be replaced in a real use case.

Next I conduct a performance comparison of my chosen alternative concurrency model

with threads. I conclude my thesis with a summary of my overall results and experiences.


Please sign in to download the files of this thesis.