Understanding re-emergence of the RPC model in web development

Loading...
Thumbnail Image

Files

URL

Journal Title

Journal ISSN

Volume Title

Perustieteiden korkeakoulu | Bachelor's thesis
Electronic archive copy is available locally at the Harald Herlin Learning Centre. The staff of Aalto University has access to the electronic bachelor's theses by logging into Aaltodoc with their personal Aalto user ID. Read more about the availability of the bachelor's theses.

Department

Major/Subject

Mcode

SCI3027

Language

en

Pages

28

Series

Abstract

RPC is a request-response protocol from the 1980s, which allows developers to invoke remote functions from an application. It was originally used in distributed systems, but was also used in web development in the late 1990s and early 2000s. RPC's popularity began decreasing after the REST-style architecture appeared in the early 2000s. However, in the recent years, the RPC-model has re-emerged in web development. This bachelor's thesis focuses on understanding the recent growth in popularity of the RPC model. In addition, this work explores the impact of modern RPC frameworks on web development practices and offers comparison between REST, RPC and GraphQL. This thesis is a literature review that utilizes scientific articles, technological documentation and blog posts. This study found out that in the early 2000s, web development moved from RPC to REST architecture due to the low performance of RPC implementations at the time. The internet was growing rapidly, requiring scalable and high-performance web services, and REST answered to this demand. The 2010s saw new trends in web development, such as microservices and TypeScript. These trends led to the emergence of new RPC frameworks, such as gRPC and tRPC. These modern RPC frameworks leverage advancements in network protocols, serialization formats, and type systems to offer an alternative to the REST architectural style. gRPC is especially popular in microservices systems due to its high performance, whereas tRPC offers developers using TypeScript the ability to develop type-safe full-stack applications. The RPC model has also been integrated into the popular front-end framework React, which provides the ability to call server-side methods directly from client-side components. With the emergence of modern RPC frameworks, developers have more options in web service development tools. Developers have access to more specialized tools and can choose the one that best suits their needs. Although modern RPC implementations may not be as universally applicable as REST or GraphQL, they can offer significant benefits in certain types of applications. gRPC and tRPC streamline the development of web services by offering an improved developer experience. Additionally, they reduce the risk of errors through type safety.

Etäproseduurikutsu (engl. Remote Procedure Call, RPC) on 1980-luvulta peräisin oleva pyyntö-vastaus–protokolla, joka mahdollistaa palvelinpuolen funktioiden kutsun suoraan asiakasohjelmasta. Sen alkuperäinen käyttökohde oli hajautetut järjestelmät, mutta 1990-luvun lopussa ja 2000-luvun alussa sitä käytettiin myös web-palveluiden kehityksessä. RPC:n käytöstä web-kehityksessä siirryttiin kuitenkin 2000-luvun alkupuolella REST-tyyliseen arkkitehtuuriin, joka on nykyäänkin suosituin tapa toteuttaa web-palveluita. Tämä kandidaatintyö tarkastelee RPC-mallin paluuta web-kehityksessä kahden suositun RPC-viitekehyksen, tRPC:n ja gRPC:n näkökulmasta. Työn tavoitteena on löytää syitä, jotka ovat vaikuttaneet RPC-mallin suosion kasvuun viime vuosina. Työ tarkastelee myös nykyaikaisten RPC-viitekehyksien vaikutuksia web-kehityksen käytäntöihin sekä tarjoaa vertailua RESTin, RPC:n ja GraphQL:n välillä. Tämä työ on kirjallisuustutkimus, jossa hyödynnettiin tieteellisiä artikkeleita sekä teknologioiden dokumentaatioverkkosivuja. Työssä esitellään myös RPC-viitekehyksiä koodiesimerkkien avulla. Työssä huomattiin, että 2000-luvun alun web-kehityksessä siirryttiin RPC:stä REST-arkkitehtuuriin senaikaisten RPC-toteutuksien alhaisen suorituskyvyn takia. Internet kasvoi nopeasti, joten tarvittiin skaalautuvia ja suorituskykyisiä web-palveluita, ja REST vastasi kysyntään. 2010-luvulla web-kehityksessä ilmeni uusia trendejä, kuten mikropalveluarkkitehtuuri ja tyypitetyt kielet, kuten TypeScript. Uusien trendien myötä ilmestyi myös uusia RPC-toteutuksia, kuten gRPC ja tRPC. Nämä modernit RPC-toteutukset hyödyntävät verkkoprotokollien, serialisointimuotojen ja tyyppijärjestelmien edistysaskelia tarjotakseen vaihtoehdon REST-arkkitehtuurille. gRPC on suosittu erityisesti mikropalvelujärjestelmissä suorituskykynsä ja laajan ohjelmointikielituen ansiosta, kun taas tRPC tarjoaa TypeScript-kehittäjille keinon kehittää tyyppiturvallisia full-stack sovelluksia. Modernien RPC-viitekehysten myötä kehittäjillä on enemmän valinnanvaraa web-palveluiden kehitystyökaluissa. Kehittäjillä on käytössä entistä erikoistuneempia työkaluja, ja he voivat valita tarpeisiinsa parhaiten sopivan työkalun. Vaikka modernit RPC-viitekehykset eivät välttämättä ole yhtä yleiskäyttöisiä kuin REST tai GraphQL, voivat ne tarjota huomattavaa hyötyä tietyntyyppisissä sovelluksissa. gRPC ja tRPC säästävät kehittäjän aikaa, sillä palvelimelta palautettua dataa ei tarvitse erikseen validoida ja parsia. Tyyppiturvallisuus vähentää myös virheiden riskiä. Näin ollen tRPC ja gRPC voivat huomattavasti suoraviivaistaa web-palveluiden kehitystä. Työn tulokset osoittavat, että modernien RPC-viitekehysten käyttökelpoisuus on johtanut niiden suosion kasvuun.

Description

Supervisor

Savioja, Lauri

Thesis advisor

Vepsäläinen, Juho

Keywords

Other note

Citation