# The Motivation of gRPC

## Communication Between Different Languages

* Back and dan Front End bisa ditulis dengan bahasa pemrograman yang berbeda
* Microservices arsitektur yang bisa ditulis dengan berbagai macam bahasa pemrograman
  * Dalam microservice untuk berkomunikasi antar service maka harus ada API contract
    * Communication channel : REST , SOAP , message queue
    * Authetication mechanism : Basic, OAuth, JWT
    * Payload format : JSON, XML, binary
    * Data Model
    * Error Handling
  * Banyak sekali hal yang harus diperhatikan dalam membuat API, oleh karena itu membuat API menjadi sesuatu yang sangat sulit

## Communication Should Be Efficient

* Pertukaran data antar microservice yang membutuhkan biaya yang besar
* Mobile Network yang lebih lambat daripada komunikasi server

## Communication Should Be Simple

Ketika mempunyai banyak sekali service dalam microservice, maka kita tidak mau menghabiskan banyak waktu hanya untuk membuat code yang berfungsi untuk menhubungkan antara service

* Client dan server yang fokus untuk mengimplementasikan core logic dari service tersebut
* Memberikan semua komunikasi kepada Framework untuk menghandle nya

##


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://grpc.dhfnr.com/master.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
