Repository logo
 
Publication

gRPC and Protobuf: Performance and API flexibility

datacite.subject.fosEngenharia e Tecnologiapt_PT
dc.contributor.advisorAzevedo, Isabel de Fátima Silva
dc.contributor.authorSilva, Luís Miguel Gonçalves
dc.date.accessioned2024-09-30T14:39:45Z
dc.date.embargo2027-09-30
dc.date.issued2024-07-23
dc.description.abstractSoftware systems are constantly evolving, and traditional approaches such as REST API and GraphQL have been, and still are, crucial for implementing public-facing interfaces. However, gRPC allows for greater efficiency in managing multiple requests and responses through a single connection, enhancing application performance. Technology has followed a similar trajectory, leading to challenges in traditional implementations due to the complexity of systems and diverse needs. These challenges have prompted the implementation of methods to ensure that results only contain relevant information for a given system, thereby eliminating unnecessary data. The Netflix example illustrates and implements a solution that adapts responses using gRPC and Protobuf field mask [1]. With the increasing need to make systems responsive to various devices, there is a growing inclination to use standards that offer greater flexibility and modularity in development. Protobuf, which is agnostic, allows the production of a foundation across different languages without modification requirements. The main advantage highlighted in using Protobuf is performance, while the main disadvantage is its diminutive ecosystem. Subsequently, samples show how it is possible to eliminate irrelevant attributes in both REST with GraphQL and gRPC using the Protobuf field mask. These examples demonstrate that the latter option is more accessible and flexible. After, a systematic review is conducted using the PRISMA method to define a flexible API, identify software patterns that allow better flexibility when providing and using applications, and understand API performance and its significance. A migration is accomplished for GraphQL and gRPC, which is performance-tested later using k6 scripts. We execute the scripts, and the metrics are subsequently collected and compared. A flexibility test is achieved by adding, changing, and removing previously implemented methods and checking the effects of the modifications. The results show that, on average, gRPC is quicker than GraphQL, although latency peeks occur. These spikes are significantly reduced when using streams. As for the flexibility test, gRPC is more flexible due to having a well-established contract with other APIs. These contracts are then easily adapted when using field masks through their field ID.pt_PT
dc.identifier.tid203702441pt_PT
dc.identifier.urihttp://hdl.handle.net/10400.22/26155
dc.language.isoengpt_PT
dc.subjectFlexible APIpt_PT
dc.subjectgRPCpt_PT
dc.subjectPerformancept_PT
dc.subjectPatternspt_PT
dc.subjectMigrationpt_PT
dc.titlegRPC and Protobuf: Performance and API flexibilitypt_PT
dc.typemaster thesis
dspace.entity.typePublication
rcaap.rightsopenAccesspt_PT
rcaap.typemasterThesispt_PT
thesis.degree.nameMestrado em Engenharia Informáticapt_PT

Files

Original bundle
Now showing 1 - 1 of 1
No Thumbnail Available
Name:
Tese_5257_v2.pdf
Size:
4.45 MB
Format:
Adobe Portable Document Format
License bundle
Now showing 1 - 1 of 1
No Thumbnail Available
Name:
license.txt
Size:
1.71 KB
Format:
Item-specific license agreed upon to submission
Description: