<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Suchismita Goswami on Medium]]></title>
        <description><![CDATA[Stories by Suchismita Goswami on Medium]]></description>
        <link>https://medium.com/@suchismitagoswami?source=rss-7869bc460aa2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*SzUz9OR0Of7ADQis.</url>
            <title>Stories by Suchismita Goswami on Medium</title>
            <link>https://medium.com/@suchismitagoswami?source=rss-7869bc460aa2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 05:55:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@suchismitagoswami/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Rest v/s GraphQL v/s gRPC]]></title>
            <link>https://medium.com/@suchismitagoswami/rest-v-s-graphql-v-s-grpc-27cc3142ae2?source=rss-7869bc460aa2------2</link>
            <guid isPermaLink="false">https://medium.com/p/27cc3142ae2</guid>
            <dc:creator><![CDATA[Suchismita Goswami]]></dc:creator>
            <pubDate>Thu, 04 May 2023 13:11:24 GMT</pubDate>
            <atom:updated>2023-05-04T16:20:44.053Z</atom:updated>
            <content:encoded><![CDATA[<h3>Overview</h3><p>Rest, GraphQL, and gRPC are all different communication protocol to create APIs (Application Programming Interfaces) that allow different software systems to communicate with each other. The purpose of this document is to compare REST vs GraphQL vs gRPC to help developers and architects evaluate the pros and cons of each technology and choose the one that best fits their project requirement. By comparing these technologies side-by-side, developers can better understand their strengths and weaknesses and make an informed decision on which one to use based on the requirement.</p><blockquote>The most important single aspect of software development is to be clear about what you are trying to build.<br><em> —</em> <a href="http://en.wikipedia.org/wiki/Bjarne_Stroustrup">Bjarne Stroustrup</a></blockquote><h3>Details</h3><h4>REST (Representational State Transfer)</h4><p>REST is a widely used architectural style for creating APIs. REST APIs are based on HTTP protocol and rely on request/response mechanism. REST focuses on resources, which can be represented as URLs, and HTTP methods, such as GET, POST, PUT, DELETE, etc. REST is simple and easy to understand, making it a popular choice for building web applications.</p><p>Some key points about REST are as follows —</p><ol><li><strong>Simplicity</strong>: REST is a simple and easy-to-understand architecture that uses standard HTTP methods to interact with resources. It is easy to get started with REST, and it requires minimal setup and configuration.</li><li><strong>Caching</strong>: REST APIs are designed to be cacheable, which can significantly improve the performance of the API. Since REST uses standard HTTP methods, caching can be implemented at different levels, such as the client-side, server-side, or proxy level.</li><li><strong>Wide adoption</strong>: REST is a widely adopted architecture, and there are many tools and libraries available for building RESTful APIs. This makes it easier to find documentation, tutorials, and community support for REST.</li><li><strong>Compatibility</strong>: REST works well with a variety of programming languages, databases, and platforms. It is easy to integrate REST APIs with existing systems and technologies.</li><li><strong>Security</strong>: REST supports a variety of authentication and authorization mechanisms, such as OAuth2, JWT, and Basic Authentication. These mechanisms can be used to secure REST APIs and protect them from unauthorized access.</li></ol><h4>GraphQL</h4><p>GraphQL is a query language for APIs that was developed by Facebook in 2012 and open-sourced in 2015. It has gained popularity in recent years due to its ability to reduce over-fetching and under-fetching of data. Unlike REST, which requires multiple requests to fetch related data, GraphQL allows the client to specify the data it needs in a single request. This makes it more efficient and flexible than REST.</p><p>Some key points about GraphQL are as follows —</p><ol><li><strong>Strong typing</strong>: GraphQL uses a strong type system that allows clients to know what data they can expect to receive. The schema defines the types of data, their fields, and their relationships.</li><li><strong>Client-driven</strong>: GraphQL allows clients to drive the data-fetching process by defining their own queries. This reduces over-fetching and under-fetching of data, and allows for more efficient data transfer. Moreover, clients can specify the fields they want to retrieve, their relationships, and the level of depth.</li><li><strong>Flexibility</strong>: GraphQL is highly flexible and can be used with a variety of programming languages, databases, and platforms. It is easy to integrate with existing systems and technologies.</li><li><strong>Performance</strong>: GraphQL can improve performance by reducing the number of API requests needed to retrieve data. Since clients can specify the data they need in a single request, there is less overhead and latency.</li><li><strong>Subscription</strong>: GraphQL supports real-time updates through subscriptions. Clients can subscribe to specific data changes and receive real-time notifications when those changes occur.</li><li><strong>Tooling</strong>: There are many tools and libraries available for working with GraphQL, including client-side libraries, server-side libraries, and development tools. This makes it easier to develop, test, and maintain GraphQL APIs</li></ol><h4>gRPC</h4><p>gRPC is a high-performance, open-source framework developed by Google in March 2015 for building remote procedure call (RPC) APIs for communication among a large number of microservices running within and across its data centers, and later made it open source. gRPC is known for its speed, efficiency, and low latency, making it a good choice for building large-scale, distributed systems. Unlike REST and GraphQL, gRPC uses binary data format, which makes it more efficient and allows for faster data transfer. It uses Protocol Buffers, a language-neutral, platform-neutral, extensible mechanism for serializing structured data. Moreover, gRPC uses HTTP/2 as the underlying transport protocol, which allows for multiple concurrent requests over a single connection and reduces the overhead associated with creating multiple connections.</p><p>Some key points about gRPC are as follows —</p><ol><li><strong>RPC-based</strong>: gRPC is based on the traditional client-server model of remote procedure calls, where a client sends a request to a server and receives a response. It uses Protocol Buffers for serialization and deserialization of data, which is more efficient than JSON used in REST and GraphQL, as it reduces the size of data being transmitted over the network.</li><li><strong>Performance</strong>: gRPC is known for its high performance and low latency due to its use of binary data format and efficient serialization. This makes it a good choice for building large-scale, distributed systems.</li><li><strong>Multi-language support</strong>: gRPC supports multiple programming languages, including C++, Java, Python, Ruby, and many more. This allows developers to use their preferred programming language to build gRPC-based applications.</li><li><strong>Code generation</strong>: gRPC uses a code generation tool to automatically generate client and server code based on the API definition. This speeds up development and reduces the likelihood of errors.</li><li><strong>Streaming support</strong>: gRPC supports bidirectional streaming, where both the client and server can send multiple messages over a single connection. This allows for efficient data transfer and real-time communication.</li><li><strong>Security</strong>: gRPC supports secure communication using Transport Layer Security (TLS) encryption. It also provides built-in support for authentication and authorization mechanisms.</li><li><strong>Tooling</strong>: There are many tools and libraries available for working with gRPC, including client-side libraries, server-side libraries, and development tools. This makes it easier to develop, test, and maintain gRPC-based applications.</li></ol><h4>Comparing REST vs GraphQL vs gRPC</h4><p>Here is a comparison table for REST vs GraphQL vs gRPC based on some key features:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3MISqSVBNdSeHWDwi2B5EQ.jpeg" /></figure><h3>Conclusion</h3><p>In summary, REST is a widely used and simple architecture that uses standard HTTP methods, while GraphQL offers highly flexible queries and strong typing. gRPC is a high-performance framework for building remote procedure call APIs with efficient serialization and deserialization. The choice between these technologies depends on the specific requirements of the project, such as query flexibility, performance, and tooling support etc.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=27cc3142ae2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>