REST API:n siirtäminen serverless-ympäristöön
Aaro, Pennanen (2023)
Aaro, Pennanen
2023
All rights reserved. This publication is copyrighted. You may download, display and print it for Your own personal use. Commercial use is prohibited.
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi:amk-2023120233672
https://urn.fi/URN:NBN:fi:amk-2023120233672
Tiivistelmä
Tämän opinnäytetyön tarkoituksena oli tutkia serverless-arkkitehtuuria ja sen soveltamista .NET-ympäristössä. Ensimmäiseksi työssä tutustutaan serverless-arkkitehtuuriin ja sen ominaisuuksiin. Toisessa osassa käydään lyhyesti läpi C# ohjelmointikieli ja .NET Core-ohjelmistokehys, sekä esitellään REST-API, joka oli toteutettu .NET Core:lla ja C# ohjelmointikielellä.
Tämän jälkeen syvennyttiin konkreettisiin koodimuutoksiin, jotka mahdollistavat API:n toiminnan eri palveluntarjoajien serverless-ympäristöissä. Lisäksi työssä tarkasteltiin siirtoprosessia, missä perinteisessä ympäristössä oleva REST-API siirrettiin serverless-ympäristöihin, sekä käytiin läpi tarvittavien serverless-konfiguraatioiden määrittelyä, joka on oleellinen osa serverless-arkkitehtuuria.
Lopuksi opinnäytetyössä pohditaan siirtoprosessin tuloksia ja onnistumista. Tuloksista ilmeni, että REST-API:n siirtäminen serverless-ympäristöihin, joka oli tämän opinnäytetyön päätarkoituksena, onnistui hyvin. Serverless-ympäristöön siirretty API toimi odotetulla tavalla, vaikka koodiin ja infrastruktuuriin oli tehty muutoksia. Tuloksissa pohdittiin myös serverless-ympäristöihin siirtymiseen liittyviä haasteita esimerkiksi mahdollisen autentikoinnin tai tiedostonkäsittelyn toteuttamisen osalta. The purpose of this thesis was to investigate serverless architecture and its application in a .NET environment. First, the work introduces the features of serverless architecture. In the second part, the C# programming language and the .NET Core software framework are briefly introduced, followed by an introduction to the REST API, which was implemented with .NET Core and the C# programming language.
After this, the thesis delves into the specific code changes that enables the API functionality across various serverless environments provided by different service providers. In addition, the work examines the migration process in which a REST API in a traditional environment is transferred to serverless environments, as well as the management of necessary serverless configurations, which are an essential part of serverless architecture.
Finally, the results and success of the transfer process are discussed. The results showed that the transfer of the REST API to serverless environments, which was the main purpose of this thesis, was successful. The API transferred to the serverless environment worked as expected, even though changes had been made to the code and infrastructure. The results also addressed challenges associated with migrating to serverless environments, such as the implementation of possible authentication or file handling.
Tämän jälkeen syvennyttiin konkreettisiin koodimuutoksiin, jotka mahdollistavat API:n toiminnan eri palveluntarjoajien serverless-ympäristöissä. Lisäksi työssä tarkasteltiin siirtoprosessia, missä perinteisessä ympäristössä oleva REST-API siirrettiin serverless-ympäristöihin, sekä käytiin läpi tarvittavien serverless-konfiguraatioiden määrittelyä, joka on oleellinen osa serverless-arkkitehtuuria.
Lopuksi opinnäytetyössä pohditaan siirtoprosessin tuloksia ja onnistumista. Tuloksista ilmeni, että REST-API:n siirtäminen serverless-ympäristöihin, joka oli tämän opinnäytetyön päätarkoituksena, onnistui hyvin. Serverless-ympäristöön siirretty API toimi odotetulla tavalla, vaikka koodiin ja infrastruktuuriin oli tehty muutoksia. Tuloksissa pohdittiin myös serverless-ympäristöihin siirtymiseen liittyviä haasteita esimerkiksi mahdollisen autentikoinnin tai tiedostonkäsittelyn toteuttamisen osalta.
After this, the thesis delves into the specific code changes that enables the API functionality across various serverless environments provided by different service providers. In addition, the work examines the migration process in which a REST API in a traditional environment is transferred to serverless environments, as well as the management of necessary serverless configurations, which are an essential part of serverless architecture.
Finally, the results and success of the transfer process are discussed. The results showed that the transfer of the REST API to serverless environments, which was the main purpose of this thesis, was successful. The API transferred to the serverless environment worked as expected, even though changes had been made to the code and infrastructure. The results also addressed challenges associated with migrating to serverless environments, such as the implementation of possible authentication or file handling.