A complete introduction to RPC and gRPC

Microservices are usually written in different languages, making it challenging to manage them and exchange information.

Here gRPC comes into play.

Thread 🧵👇🏻
Before jumping onto gRPC, we need to understand what RPC is 👇🏻
📌 RPC

RPC stands for Remote Procedure Call, and it's a client-server communication method in use today.

In typical HTTP, the client makes a request and gets a response from the server.
RPC uses a function call. It means that on the client-side, you invoke a function that is written on the server-side code.

It only looks like you are calling it like a regular function but instead, it is happening through the network.
📌 gRPC

gRPC is an open-source framework developed by Google in 2015 for implementing RPC APIs using the HTTP/2 protocol.
The fun fact is that 'g' here does not stand for Google.

'g' stands for something different every gRPC release:

github.com/grpc/grpc/blob…
With gRPC, the abstraction has become easy since it is a function call. It also supports a lot of programming languages.

So you can use gRPC in microservices to communicate with other services that are written in some different programming language.
There are several benefits of using gRPC:

- Messages in gRPC are lightweight
- gRPC provides high performance
- 8 times faster than REST
- gRPC automatically generates code for different programming languages for the purpose of working with them
With that being said, this is the end of this thread.

We hope you find it useful. If so, follow @Rapid_API for more quality content. 💙

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with RapidAPI

RapidAPI Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @Rapid_API

30 Nov
A complete introduction to GraphQL

GraphQL is a query language that lets your client request the server to send only the required data.

Let's deep dive into it. 🧵👇🏻
GraphQL was created by developers at Facebook in 2012.

GraphQL was developed to support the complicated data structures required to show the Facebook News Feed on the mobile application.
Using GraphQL, the client can request the necessary data using a single endpoint with a defined schema.
Read 17 tweets
26 Nov
There are different kinds of specifications available that you can use while building an API.

In this thread, we will talk about the OpenAPI spec.

🧵 👇🏻
In simple terms, OpenAPI spec is a format to define structure and syntax for REST APIs.
OpenAPI spec provides a standard that allows both humans and computers to discover and understand the service's capabilities without access to source code, documentation, or traffic inspection
Read 13 tweets
25 Nov
CORS can be tackled quickly with the understanding of a few HTTP headers.

Let's discuss them in a bit more detail. 🧵👇🏻
We are going to cover HTTP request headers first, and then we will jump onto HTTP response headers.
📌 HTTP Request Headers

The client can use a few HTTP request methods with their API calls in order to make maximum use of the Cross-Origin resource sharing feature.
Read 12 tweets
23 Nov
Authentication and Authorization are generally the two most confusing terms when used together.

Let's discuss some key points of these two terms.

🧵👇🏻
In simple terms, authentication is the process of verifying the identity of a user.
Your ID and password are verified using the authentication process when you sign up or sign in.

Modern software implements biometric authentication which is associated with your fingerprint or facial recognition.
Read 7 tweets
19 Nov
There are four types of Web APIs:

- Public API
- Private API
- Partner API
- Composite API

Let's discuss them in detail 🧵👇🏻
1️⃣ Public API

Public APIs are accessible to all developers with a low or moderate level of authentication and authorization.

For example, the Windows API of Microsoft is a public API.
Stability is an essential factor of any public API. Any changes in the public API, let's say adding a new parameter, might break the applications that depend on that API.
Read 8 tweets
18 Nov
Millions of websites are using API somehow in today's era.

It's imperative to optimize your API to provide a better user experience.

Here are five ways to optimize your API performance and make it stand out. 🧵👇🏻
1️⃣ Use rate-limiting strategy

There might be a case where the user executes a loop, causing many API requests that can slow down your API performance.
In order to avoid such scenarios, use rate-limiting factors and limit the specific number or request in the given time period.
Read 11 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Thank you for your support!

Follow Us on Twitter!

:(