{"id":1125,"date":"2024-08-20T23:22:00","date_gmt":"2024-08-20T16:22:00","guid":{"rendered":"https:\/\/thoaicoder.com\/?p=1125"},"modified":"2025-02-03T23:26:25","modified_gmt":"2025-02-03T16:26:25","slug":"grpc-introduction","status":"publish","type":"post","link":"https:\/\/thoaicoder.com\/index.php\/2024\/08\/20\/grpc-introduction\/","title":{"rendered":"gRPC introduction"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\">1. Introduction<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">gRPC is an open-source, high-performance <strong>Remote Procedure Call (RPC)<\/strong> framework developed by Google. It enables efficient communication between services by allowing clients to directly call methods on a server application as if it were a local object. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"928\" height=\"450\" src=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/08\/grpc-framework-by-google.png\" alt=\"\" class=\"wp-image-1128\" srcset=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/08\/grpc-framework-by-google.png 928w, https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/08\/grpc-framework-by-google-300x145.png 300w, https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/08\/grpc-framework-by-google-768x372.png 768w\" sizes=\"auto, (max-width: 928px) 100vw, 928px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">gRPC uses <strong>Protocol Buffers<\/strong> for defining service interfaces and message structures, and it operates over <strong>HTTP\/2<\/strong>, providing features like <strong>bi-directional<\/strong> streaming, flow control, and low latency. It&#8217;s widely used for connecting distributed systems and microservices across various programming languages.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">2. gRPC vs RESTful<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">gRPC, built on HTTP\/2, uses Protocol Buffers (protobuf) for compact, binary serialization, making it faster, more efficient, and suitable for low-latency microservices. It also supports bi-directional streaming and strongly typed contracts but requires specific client libraries and is not natively browser-friendly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In contrast, RESTful APIs, commonly using HTTP\/1.1 and JSON\/XML, are simpler, widely adopted, and more human-readable. They work seamlessly with browsers and are ideal for public APIs and CRUD-based applications, but they lack built-in streaming support and have higher overhead due to text-based data formats.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ultimately, gRPC is best for high-performance, real-time applications, while RESTful APIs are more flexible and accessible for general web-based services. \ud83d\ude80<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Feature<\/th><th>gRPC<\/th><th>RESTful API<\/th><\/tr><\/thead><tbody><tr><td><strong>Protocol<\/strong><\/td><td>Uses <strong>HTTP\/2<\/strong><\/td><td>Typically uses <strong>HTTP\/1.1<\/strong> (or HTTP\/2 in some cases)<\/td><\/tr><tr><td><strong>Data Format<\/strong><\/td><td><strong>Protocol Buffers (protobuf)<\/strong> (binary format)<\/td><td><strong>JSON\/XML<\/strong> (text-based format)<\/td><\/tr><tr><td><strong>Speed &amp; Performance<\/strong><\/td><td>Faster due to binary serialization and HTTP\/2 multiplexing<\/td><td>Slower due to text-based JSON\/XML parsing and separate connections<\/td><\/tr><tr><td><strong>Message Size<\/strong><\/td><td>Smaller due to compact binary format<\/td><td>Larger because JSON is human-readable<\/td><\/tr><tr><td><strong>Streaming Support<\/strong><\/td><td><strong>Yes<\/strong> (bi-directional streaming supported)<\/td><td><strong>Limited<\/strong> (server-sent events, WebSockets)<\/td><\/tr><tr><td><strong>Type Safety<\/strong><\/td><td><strong>Strongly typed<\/strong> with .proto files<\/td><td>Loosely typed (JSON schema optional)<\/td><\/tr><tr><td><strong>Code Generation<\/strong><\/td><td>Auto-generates client\/server code in multiple languages<\/td><td>Requires manual code implementation<\/td><\/tr><tr><td><strong>Interoperability<\/strong><\/td><td>Requires gRPC libraries; not natively browser-friendly<\/td><td>Works with any HTTP client (browsers, mobile, etc.)<\/td><\/tr><tr><td><strong>Browser Support<\/strong><\/td><td>Limited (requires gRPC-Web proxy)<\/td><td>Fully supported in browsers<\/td><\/tr><tr><td><strong>Security<\/strong><\/td><td>Supports TLS encryption<\/td><td>Supports TLS and OAuth for security<\/td><\/tr><tr><td><strong>Ease of Use<\/strong><\/td><td>More complex due to protobuf and code generation<\/td><td>Simpler, widely adopted, human-readable<\/td><\/tr><tr><td><strong>Best Use Cases<\/strong><\/td><td><strong>High-performance, low-latency, real-time applications, microservices<\/strong><\/td><td><strong>Web APIs, public APIs, CRUD-based applications<\/strong><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h1 class=\"wp-block-heading\">3. Demonstration<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Here\u2019s a basic gRPC project using Java with Gradle. This project includes:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>A gRPC server<\/strong> that provides a simple greeting service.<\/li>\n\n\n\n<li><strong>A gRPC client<\/strong> that calls the service.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">The project structure is as below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"512\" height=\"185\" src=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/08\/image.png\" alt=\"\" class=\"wp-image-1140\" srcset=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/08\/image.png 512w, https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/08\/image-300x108.png 300w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">3.1. Define the greeting.proto file<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Create <code>src\/main\/proto\/greeting.proto<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-1\" style=\"padding-top:var(--wp--preset--spacing--30);padding-right:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--30)\"><code>syntax = \"proto3\";\n\npackage com.example;\n\noption java_multiple_files = true;\noption java_package = \"com.example.grpc\";\n\nservice GreetingService {\n  rpc Greet (GreetRequest) returns (GreetResponse);\n}\n\nmessage GreetRequest {\n  string name = 1;\n}\n\nmessage GreetResponse {\n  string message = 1;\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">3.2. Update build.gradle<\/h2>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-2\" style=\"padding-top:var(--wp--preset--spacing--30);padding-right:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--30)\"><code>plugins {\n    id 'java'\n    id 'com.google.protobuf' version '0.9.4'\n}\n\ngroup = 'com.example'\nversion = '1.0'\n\nrepositories {\n    mavenCentral()\n}\n\ndependencies {\n    implementation 'io.grpc:grpc-netty-shaded:1.60.0'\n    implementation 'io.grpc:grpc-protobuf:1.60.0'\n    implementation 'io.grpc:grpc-stub:1.60.0'\n\n    runtimeOnly 'org.apache.tomcat:annotations-api:6.0.53'\n}\n\nprotobuf {\n    protoc {\n        artifact = 'com.google.protobuf:protoc:3.24.3'\n    }\n    plugins {\n        grpc {\n            artifact = 'io.grpc:protoc-gen-grpc-java:1.60.0'\n        }\n    }\n    generateProtoTasks {\n        all().each { task ->\n            task.plugins {\n                grpc {}\n            }\n        }\n    }\n}\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">3.3. Implement the Server<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><em>GrpcServer.java<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-3\" style=\"padding-top:var(--wp--preset--spacing--30);padding-right:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--30)\"><code>package com.example.server;\n\nimport io.grpc.Server;\nimport io.grpc.ServerBuilder;\nimport java.io.IOException;\n\npublic class GrpcServer {\n    public static void main(String&#91;] args) throws IOException, InterruptedException {\n        Server server = ServerBuilder.forPort(9090)\n                .addService(new GreetingServiceImpl())\n                .build();\n\n        System.out.println(\"Starting gRPC server on port 9090...\");\n        server.start();\n        server.awaitTermination();\n    }\n}\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><em>GreetingServiceImpl.java<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-4\" style=\"padding-top:var(--wp--preset--spacing--30);padding-right:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--30)\"><code>package com.example.server;\n\nimport com.example.grpc.GreetRequest;\nimport com.example.grpc.GreetResponse;\nimport com.example.grpc.GreetingServiceGrpc;\nimport io.grpc.stub.StreamObserver;\n\npublic class GreetingServiceImpl extends GreetingServiceGrpc.GreetingServiceImplBase {\n    @Override\n    public void greet(GreetRequest request, StreamObserver&lt;GreetResponse> responseObserver) {\n        String greeting = \"Hello, \" + request.getName();\n        GreetResponse response = GreetResponse.newBuilder().setMessage(greeting).build();\n\n        responseObserver.onNext(response);\n        responseObserver.onCompleted();\n    }\n}\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">3.4. Implement the Client<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><em>GrpcClient.java<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-5\" style=\"padding-top:var(--wp--preset--spacing--30);padding-right:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--30)\"><code>package com.example.client;\n\nimport com.example.grpc.GreetRequest;\nimport com.example.grpc.GreetResponse;\nimport com.example.grpc.GreetingServiceGrpc;\nimport io.grpc.ManagedChannel;\nimport io.grpc.ManagedChannelBuilder;\n\npublic class GrpcClient {\n    public static void main(String&#91;] args) {\n        ManagedChannel channel = ManagedChannelBuilder.forAddress(\"localhost\", 9090)\n                .usePlaintext()\n                .build();\n\n        GreetingServiceGrpc.GreetingServiceBlockingStub stub = GreetingServiceGrpc.newBlockingStub(channel);\n\n        GreetRequest request = GreetRequest.newBuilder().setName(\"User\").build();\n        GreetResponse response = stub.greet(request);\n\n        System.out.println(\"Response: \" + response.getMessage());\n\n        channel.shutdown();\n    }\n}\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">3.5. Build and Run<\/h2>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-6\" style=\"padding-top:var(--wp--preset--spacing--30);padding-right:var(--wp--preset--spacing--30);padding-bottom:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--30)\"><code>.\/gradlew build\n.\/gradlew runServer\n.\/gradlew runClient<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The client output should be &#8216;Response: Hello, User&#8217;<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">4. Conclusion<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">gRPC is a powerful and efficient RPC framework that enables fast, scalable, and cross-platform communication between services. With support for multiple programming languages, and built-in features like streaming, authentication, and load balancing, gRPC is well-suited for modern microservices architectures. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By leveraging Protocol Buffers for serialization, it achieves high performance while maintaining flexibility and ease of use. As organizations continue to build distributed systems, gRPC provides a reliable foundation for efficient service-to-service communication. This demo application can be found on\u00a0<a href=\"https:\/\/github.com\/ThoaiNguyenHuu842\/simple-grpc\">GitHub<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. Introduction gRPC is an open-source, high-performance Remote Procedure Call (RPC) framework developed by Google. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1132,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1125","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.14 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>gRPC introduction - I \u2764 Code<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/thoaicoder.com\/index.php\/2024\/08\/20\/grpc-introduction\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"gRPC introduction - I \u2764 Code\" \/>\n<meta property=\"og:description\" content=\"1. Introduction gRPC is an open-source, high-performance Remote Procedure Call (RPC) framework developed by Google. [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/thoaicoder.com\/index.php\/2024\/08\/20\/grpc-introduction\/\" \/>\n<meta property=\"og:site_name\" content=\"I \u2764 Code\" \/>\n<meta property=\"article:published_time\" content=\"2024-08-20T16:22:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-02-03T16:26:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/08\/Screenshot-2024-08-20-232908.png\" \/>\n\t<meta property=\"og:image:width\" content=\"592\" \/>\n\t<meta property=\"og:image:height\" content=\"355\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Thoai\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Thoai\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/thoaicoder.com\/index.php\/2024\/08\/20\/grpc-introduction\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/thoaicoder.com\/index.php\/2024\/08\/20\/grpc-introduction\/\"},\"author\":{\"name\":\"Thoai\",\"@id\":\"https:\/\/thoaicoder.com\/#\/schema\/person\/a3304c209434f63c501b05622d7d2720\"},\"headline\":\"gRPC introduction\",\"datePublished\":\"2024-08-20T16:22:00+00:00\",\"dateModified\":\"2025-02-03T16:26:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/thoaicoder.com\/index.php\/2024\/08\/20\/grpc-introduction\/\"},\"wordCount\":497,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/thoaicoder.com\/#\/schema\/person\/a3304c209434f63c501b05622d7d2720\"},\"articleSection\":[\"Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/thoaicoder.com\/index.php\/2024\/08\/20\/grpc-introduction\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/thoaicoder.com\/index.php\/2024\/08\/20\/grpc-introduction\/\",\"url\":\"https:\/\/thoaicoder.com\/index.php\/2024\/08\/20\/grpc-introduction\/\",\"name\":\"gRPC introduction - I \u2764 Code\",\"isPartOf\":{\"@id\":\"https:\/\/thoaicoder.com\/#website\"},\"datePublished\":\"2024-08-20T16:22:00+00:00\",\"dateModified\":\"2025-02-03T16:26:25+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/thoaicoder.com\/index.php\/2024\/08\/20\/grpc-introduction\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/thoaicoder.com\/index.php\/2024\/08\/20\/grpc-introduction\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/thoaicoder.com\/index.php\/2024\/08\/20\/grpc-introduction\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/thoaicoder.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"gRPC introduction\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/thoaicoder.com\/#website\",\"url\":\"https:\/\/thoaicoder.com\/\",\"name\":\"I \u2764 Code\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/thoaicoder.com\/#\/schema\/person\/a3304c209434f63c501b05622d7d2720\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/thoaicoder.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/thoaicoder.com\/#\/schema\/person\/a3304c209434f63c501b05622d7d2720\",\"name\":\"Thoai\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/thoaicoder.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2023\/03\/photo_2023-01-05_22-53-32.jpg\",\"contentUrl\":\"https:\/\/thoaicoder.com\/wp-content\/uploads\/2023\/03\/photo_2023-01-05_22-53-32.jpg\",\"width\":640,\"height\":640,\"caption\":\"Thoai\"},\"logo\":{\"@id\":\"https:\/\/thoaicoder.com\/#\/schema\/person\/image\/\"},\"sameAs\":[\"https:\/\/thoaicoder.com\",\"https:\/\/www.linkedin.com\/in\/huu-thoai-nguyen\/\"],\"url\":\"https:\/\/thoaicoder.com\/index.php\/author\/admin_cvyxq4b8\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"gRPC introduction - I \u2764 Code","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/thoaicoder.com\/index.php\/2024\/08\/20\/grpc-introduction\/","og_locale":"en_US","og_type":"article","og_title":"gRPC introduction - I \u2764 Code","og_description":"1. Introduction gRPC is an open-source, high-performance Remote Procedure Call (RPC) framework developed by Google. [&hellip;]","og_url":"https:\/\/thoaicoder.com\/index.php\/2024\/08\/20\/grpc-introduction\/","og_site_name":"I \u2764 Code","article_published_time":"2024-08-20T16:22:00+00:00","article_modified_time":"2025-02-03T16:26:25+00:00","og_image":[{"width":592,"height":355,"url":"https:\/\/thoaicoder.com\/wp-content\/uploads\/2024\/08\/Screenshot-2024-08-20-232908.png","type":"image\/png"}],"author":"Thoai","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Thoai","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/thoaicoder.com\/index.php\/2024\/08\/20\/grpc-introduction\/#article","isPartOf":{"@id":"https:\/\/thoaicoder.com\/index.php\/2024\/08\/20\/grpc-introduction\/"},"author":{"name":"Thoai","@id":"https:\/\/thoaicoder.com\/#\/schema\/person\/a3304c209434f63c501b05622d7d2720"},"headline":"gRPC introduction","datePublished":"2024-08-20T16:22:00+00:00","dateModified":"2025-02-03T16:26:25+00:00","mainEntityOfPage":{"@id":"https:\/\/thoaicoder.com\/index.php\/2024\/08\/20\/grpc-introduction\/"},"wordCount":497,"commentCount":0,"publisher":{"@id":"https:\/\/thoaicoder.com\/#\/schema\/person\/a3304c209434f63c501b05622d7d2720"},"articleSection":["Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/thoaicoder.com\/index.php\/2024\/08\/20\/grpc-introduction\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/thoaicoder.com\/index.php\/2024\/08\/20\/grpc-introduction\/","url":"https:\/\/thoaicoder.com\/index.php\/2024\/08\/20\/grpc-introduction\/","name":"gRPC introduction - I \u2764 Code","isPartOf":{"@id":"https:\/\/thoaicoder.com\/#website"},"datePublished":"2024-08-20T16:22:00+00:00","dateModified":"2025-02-03T16:26:25+00:00","breadcrumb":{"@id":"https:\/\/thoaicoder.com\/index.php\/2024\/08\/20\/grpc-introduction\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/thoaicoder.com\/index.php\/2024\/08\/20\/grpc-introduction\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/thoaicoder.com\/index.php\/2024\/08\/20\/grpc-introduction\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/thoaicoder.com\/"},{"@type":"ListItem","position":2,"name":"gRPC introduction"}]},{"@type":"WebSite","@id":"https:\/\/thoaicoder.com\/#website","url":"https:\/\/thoaicoder.com\/","name":"I \u2764 Code","description":"","publisher":{"@id":"https:\/\/thoaicoder.com\/#\/schema\/person\/a3304c209434f63c501b05622d7d2720"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/thoaicoder.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/thoaicoder.com\/#\/schema\/person\/a3304c209434f63c501b05622d7d2720","name":"Thoai","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/thoaicoder.com\/#\/schema\/person\/image\/","url":"https:\/\/thoaicoder.com\/wp-content\/uploads\/2023\/03\/photo_2023-01-05_22-53-32.jpg","contentUrl":"https:\/\/thoaicoder.com\/wp-content\/uploads\/2023\/03\/photo_2023-01-05_22-53-32.jpg","width":640,"height":640,"caption":"Thoai"},"logo":{"@id":"https:\/\/thoaicoder.com\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/thoaicoder.com","https:\/\/www.linkedin.com\/in\/huu-thoai-nguyen\/"],"url":"https:\/\/thoaicoder.com\/index.php\/author\/admin_cvyxq4b8\/"}]}},"_links":{"self":[{"href":"https:\/\/thoaicoder.com\/index.php\/wp-json\/wp\/v2\/posts\/1125","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thoaicoder.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thoaicoder.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thoaicoder.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thoaicoder.com\/index.php\/wp-json\/wp\/v2\/comments?post=1125"}],"version-history":[{"count":6,"href":"https:\/\/thoaicoder.com\/index.php\/wp-json\/wp\/v2\/posts\/1125\/revisions"}],"predecessor-version":[{"id":1142,"href":"https:\/\/thoaicoder.com\/index.php\/wp-json\/wp\/v2\/posts\/1125\/revisions\/1142"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/thoaicoder.com\/index.php\/wp-json\/wp\/v2\/media\/1132"}],"wp:attachment":[{"href":"https:\/\/thoaicoder.com\/index.php\/wp-json\/wp\/v2\/media?parent=1125"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thoaicoder.com\/index.php\/wp-json\/wp\/v2\/categories?post=1125"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thoaicoder.com\/index.php\/wp-json\/wp\/v2\/tags?post=1125"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}