Exploring the Scala Macro System for Compile Time Model-Based Generation of Statically Type-Safe REST Services

Detalhes bibliográficos
Autor(a) principal: Filipe Rui Rocha Oliveira
Data de Publicação: 2015
Tipo de documento: Dissertação
Idioma: eng
Título da fonte: Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos)
Texto Completo: https://hdl.handle.net/10216/83537
Resumo: The amount of web services has increased dramatically over the past years due to the growth of mobile applications that use them, and to the business potential that they offer (e.g. Google Maps API, Facebook API). REpresentational State Transfer (REST) is a prolific architectural style used as an interface to these web services, mainly due to its better performance (when compared to other techniques like SOAP), scalability and simplicity. Some common usages of this style include the simple manipulation of structured data, by using default behaviours that are based on user defined models and which provide default CRUD operations. Known implementations are Django REST framework, Eve, Sails, and the LoopBack framework. These frameworks apply the models' logic in run-time usually using reflection or in-memory data structures, and are commonly written in programming languages that are based on (or at least optionally support) dynamic type systems. Although easier to write and more flexible, such technical choices usually hinder two software quality attributes: performance (due to run-time adaptation) and maintainability (due to absence of compile-time guarantees). Assuming such observations and potential shortcomings, the obvious follow-up would be to explore more efficient (and correct) solutions, by interpreting the models at compile-time using a programming language with a sufficiently powerful static and extendable type system. Scala meets these requirements, while still providing enough flexibility to developers looking for it in this kind of framework. With that in mind the this work aimed to explore the design and implementation of such frameworks using the Scala Macro System. The result of this research was materialized in the Metamorphic framework, which by using a semantically rich DSL is capable of generating an entire application from data storage to services logic. Such generated applications mostly contain components of well known and tested libraries, following either an interface or a model. Evaluation was executed by performing both quantitative benchmarks and qualitative analysis of Metamorphic against other frameworks.
id RCAP_efcbe748126397520b1f2ecd8a76cfca
oai_identifier_str oai:repositorio-aberto.up.pt:10216/83537
network_acronym_str RCAP
network_name_str Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos)
repository_id_str 7160
spelling Exploring the Scala Macro System for Compile Time Model-Based Generation of Statically Type-Safe REST ServicesEngenharia electrotécnica, electrónica e informáticaElectrical engineering, Electronic engineering, Information engineeringThe amount of web services has increased dramatically over the past years due to the growth of mobile applications that use them, and to the business potential that they offer (e.g. Google Maps API, Facebook API). REpresentational State Transfer (REST) is a prolific architectural style used as an interface to these web services, mainly due to its better performance (when compared to other techniques like SOAP), scalability and simplicity. Some common usages of this style include the simple manipulation of structured data, by using default behaviours that are based on user defined models and which provide default CRUD operations. Known implementations are Django REST framework, Eve, Sails, and the LoopBack framework. These frameworks apply the models' logic in run-time usually using reflection or in-memory data structures, and are commonly written in programming languages that are based on (or at least optionally support) dynamic type systems. Although easier to write and more flexible, such technical choices usually hinder two software quality attributes: performance (due to run-time adaptation) and maintainability (due to absence of compile-time guarantees). Assuming such observations and potential shortcomings, the obvious follow-up would be to explore more efficient (and correct) solutions, by interpreting the models at compile-time using a programming language with a sufficiently powerful static and extendable type system. Scala meets these requirements, while still providing enough flexibility to developers looking for it in this kind of framework. With that in mind the this work aimed to explore the design and implementation of such frameworks using the Scala Macro System. The result of this research was materialized in the Metamorphic framework, which by using a semantically rich DSL is capable of generating an entire application from data storage to services logic. Such generated applications mostly contain components of well known and tested libraries, following either an interface or a model. Evaluation was executed by performing both quantitative benchmarks and qualitative analysis of Metamorphic against other frameworks.2015-07-202015-07-20T00:00:00Zinfo:eu-repo/semantics/publishedVersioninfo:eu-repo/semantics/masterThesisapplication/pdfhttps://hdl.handle.net/10216/83537TID:201303345engFilipe Rui Rocha Oliveirainfo:eu-repo/semantics/openAccessreponame:Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos)instname:Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informaçãoinstacron:RCAAP2023-11-29T12:52:55Zoai:repositorio-aberto.up.pt:10216/83537Portal AgregadorONGhttps://www.rcaap.pt/oai/openaireopendoar:71602024-03-19T23:28:36.981210Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos) - Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informaçãofalse
dc.title.none.fl_str_mv Exploring the Scala Macro System for Compile Time Model-Based Generation of Statically Type-Safe REST Services
title Exploring the Scala Macro System for Compile Time Model-Based Generation of Statically Type-Safe REST Services
spellingShingle Exploring the Scala Macro System for Compile Time Model-Based Generation of Statically Type-Safe REST Services
Filipe Rui Rocha Oliveira
Engenharia electrotécnica, electrónica e informática
Electrical engineering, Electronic engineering, Information engineering
title_short Exploring the Scala Macro System for Compile Time Model-Based Generation of Statically Type-Safe REST Services
title_full Exploring the Scala Macro System for Compile Time Model-Based Generation of Statically Type-Safe REST Services
title_fullStr Exploring the Scala Macro System for Compile Time Model-Based Generation of Statically Type-Safe REST Services
title_full_unstemmed Exploring the Scala Macro System for Compile Time Model-Based Generation of Statically Type-Safe REST Services
title_sort Exploring the Scala Macro System for Compile Time Model-Based Generation of Statically Type-Safe REST Services
author Filipe Rui Rocha Oliveira
author_facet Filipe Rui Rocha Oliveira
author_role author
dc.contributor.author.fl_str_mv Filipe Rui Rocha Oliveira
dc.subject.por.fl_str_mv Engenharia electrotécnica, electrónica e informática
Electrical engineering, Electronic engineering, Information engineering
topic Engenharia electrotécnica, electrónica e informática
Electrical engineering, Electronic engineering, Information engineering
description The amount of web services has increased dramatically over the past years due to the growth of mobile applications that use them, and to the business potential that they offer (e.g. Google Maps API, Facebook API). REpresentational State Transfer (REST) is a prolific architectural style used as an interface to these web services, mainly due to its better performance (when compared to other techniques like SOAP), scalability and simplicity. Some common usages of this style include the simple manipulation of structured data, by using default behaviours that are based on user defined models and which provide default CRUD operations. Known implementations are Django REST framework, Eve, Sails, and the LoopBack framework. These frameworks apply the models' logic in run-time usually using reflection or in-memory data structures, and are commonly written in programming languages that are based on (or at least optionally support) dynamic type systems. Although easier to write and more flexible, such technical choices usually hinder two software quality attributes: performance (due to run-time adaptation) and maintainability (due to absence of compile-time guarantees). Assuming such observations and potential shortcomings, the obvious follow-up would be to explore more efficient (and correct) solutions, by interpreting the models at compile-time using a programming language with a sufficiently powerful static and extendable type system. Scala meets these requirements, while still providing enough flexibility to developers looking for it in this kind of framework. With that in mind the this work aimed to explore the design and implementation of such frameworks using the Scala Macro System. The result of this research was materialized in the Metamorphic framework, which by using a semantically rich DSL is capable of generating an entire application from data storage to services logic. Such generated applications mostly contain components of well known and tested libraries, following either an interface or a model. Evaluation was executed by performing both quantitative benchmarks and qualitative analysis of Metamorphic against other frameworks.
publishDate 2015
dc.date.none.fl_str_mv 2015-07-20
2015-07-20T00:00:00Z
dc.type.status.fl_str_mv info:eu-repo/semantics/publishedVersion
dc.type.driver.fl_str_mv info:eu-repo/semantics/masterThesis
format masterThesis
status_str publishedVersion
dc.identifier.uri.fl_str_mv https://hdl.handle.net/10216/83537
TID:201303345
url https://hdl.handle.net/10216/83537
identifier_str_mv TID:201303345
dc.language.iso.fl_str_mv eng
language eng
dc.rights.driver.fl_str_mv info:eu-repo/semantics/openAccess
eu_rights_str_mv openAccess
dc.format.none.fl_str_mv application/pdf
dc.source.none.fl_str_mv reponame:Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos)
instname:Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informação
instacron:RCAAP
instname_str Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informação
instacron_str RCAAP
institution RCAAP
reponame_str Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos)
collection Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos)
repository.name.fl_str_mv Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos) - Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informação
repository.mail.fl_str_mv
_version_ 1799135592892596225