{"id":583,"date":"2019-02-17T00:42:00","date_gmt":"2019-02-16T22:42:00","guid":{"rendered":"http:\/\/amagdy.me\/blog\/?p=583"},"modified":"2019-05-30T22:56:25","modified_gmt":"2019-05-30T20:56:25","slug":"grpc-in-action","status":"publish","type":"post","link":"https:\/\/magdy.dk\/arblog\/?p=583","title":{"rendered":"gRPC in Action"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\" style=\"font-size:18px\">\u0633\u0646\u062a\u0639\u0631\u0641 \u0645\u0646 \u062e\u0644\u0627\u0644 \u0647\u0630\u0627 \u0627\u0644\u0645\u0642\u0627\u0644 \u0639\u0644\u0649 \u062a\u0642\u0646\u064a\u0629 Grpc \u0648\u0643\u064a\u0641\u064a\u0629 \u0627\u0633\u062a\u062e\u062f\u0627\u0645\u0647\u0627 \u0645\u0639 \u0645\u062b\u0627\u0644 \u0644\u0647\u0627.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:18px\"><strong>\u0623\u0648\u0644\u0627<\/strong>: \u0645\u0627\u0647\u0648 gRPC:<br>\u062f\u0639\u0648\u0646\u0627 \u0623\u0648\u0644\u0627 \u0646\u0642\u0648\u0645 \u0628\u062a\u0639\u0631\u064a\u0641 RPC \u0641\u0642\u0637 :<br>RPC \u0647\u0648 \u0625\u062e\u062a\u0635\u0627\u0631 \u0644 Remote Procedure Call \u0648\u0647\u0648 \u062a\u0642\u0646\u064a\u0629 \u062a\u064e\u0633\u062a\u062e\u062f\u0645 \u0646\u0638\u0627\u0645 client server model \u0644\u0646\u0642\u0644 \u0627\u0644\u0628\u064a\u0627\u0646\u0627\u062a \u0628\u064a\u0646 \u0627\u0644client \u0648 \u0627\u0644server \u0648\u062a\u0643\u0648\u0646 \u0639\u0645\u0644\u064a\u0629 \u062a\u0632\u0627\u0645\u0646\u064a\u0629 &#8220;Synchronous&#8221; \u0648\u062a\u0633\u0645\u0649 Unary \u0628\u062d\u064a\u062b \u0627\u0646\u0643 \u0639\u0646\u062f\u0645\u0627 \u062a\u0631\u0633\u0644 request \u062a\u0646\u062a\u0638\u0631 \u062d\u062a\u0649 \u062a\u062d\u0635\u0644 \u0639\u0644\u0649 \u0627\u0644response \u0648\u062a\u0643\u0648\u0646 \u0645\u0646 \u062e\u0644\u0627\u0644 \u0646\u0641\u0633 \u0627\u0644\u0634\u0628\u0643\u0629 &#8220;Shared Netword&#8221; \u060c \u0643\u0645\u0627 \u064a\u062f\u0639\u0645 \u0627\u064a\u0636\u0627 \u0627\u0644Streaming \u0645\u0646 \u0627\u0644client \u0644\u0644Server \u0627\u0648 \u0627\u0644\u0639\u0643\u0633 \u0627\u0648 \u0643\u0644\u0627\u0647\u0645\u0627 \u0645\u0639\u0627 &#8220;bidirectional&#8221; . <br>\u064a\u0633\u062a\u062e\u062f\u0645 RPC \u0639\u0627\u062f\u0629 \u0645\u0639 \u0627\u0644\u0640distributed systems \u0644\u0627\u0646\u0647 \u064a\u0633\u0647\u0644 \u0627\u0644\u062a\u0648\u0627\u0635\u0644 \u0628\u064a\u0646 \u0627\u0644systems \u0627\u0648 \u0627\u0644services \u0627\u0644\u0645\u062e\u062a\u0644\u0641\u0629 \u0648\u064a\u062c\u0639\u0644\u0647\u0627 \u062a\u0639\u0645\u0644 \u0648\u062a\u062a\u0648\u0627\u0635\u0644 \u0643\u0627\u0646\u0647\u0627 \u0645\u0646 \u0645\u0635\u062f\u0631 \u0648\u0627\u062d\u062f\u060c \u0643\u0645\u0627 \u0627\u0646\u0647 \u064a\u0645\u0643\u0646\u0643 \u0645\u0646 \u0643\u062a\u0627\u0628\u0629 \u0627\u0644services \u0627\u0644\u062e\u0627\u0635\u0629 \u0628\u0643 \u0628\u062a\u0642\u0646\u064a\u0627\u062a \u0648\u0644\u063a\u0627\u062a \u0645\u062e\u062a\u0644\u0641\u0629 \u0648\u062c\u0639\u0644\u0647\u0627 \u062a\u062a\u0648\u0627\u0635\u0644 \u0645\u0639 \u0628\u0639\u0636\u0647\u0627 \u0628\u0637\u0631\u064a\u0642\u0629 \u0641\u0639\u0627\u0644\u0629 \u0648\u0633\u0631\u064a\u0639\u0629 \u0648\u0628\u0633\u064a\u0637\u0629.<br>\u0646\u0623\u062a\u064a \u0627\u0644\u0622\u0646 \u0644\u062a\u0639\u0631\u064a\u0641 gRPC:<br>\u0647\u0648 \u0625\u0637\u0627\u0631 \u0639\u0645\u0644 \u0645\u0641\u062a\u0648\u062d \u0627\u0644\u0645\u0635\u062f\u0631 \u064a\u062a\u0645\u062a\u0639 \u0628\u0643\u0641\u0627\u0621\u0629 \u0639\u0627\u0644\u064a\u0629 \u0645\u0628\u0646\u064a \u0639\u0644\u0649 \u062a\u0642\u0646\u064a\u0629 RPC \u0648\u064a\u0633\u062a\u062e\u062f\u0645 HTTP\/2 \u062a\u0645 \u0625\u0637\u0644\u0627\u0642\u0647 \u0645\u0646 \u0642\u0628\u0644 \u0634\u0631\u0643\u0629 Google.<br>\u064a\u0633\u062a\u062e\u062f\u0645 gRPC \u0627\u0644\u0640Protocol Buffer Implementaiton \u0644\u064a\u0642\u0648\u0645 \u0628\u0639\u0645\u0644 Serialization \u0644\u0644\u0628\u064a\u0627\u0646\u0627\u062a.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">\u062a\u0639\u0644\u0645 \u0628\u0627\u0644\u062a\u0637\u0628\u064a\u0642 <\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/grpc.io\/img\/landing-2.svg\" alt=\"\"\/><figcaption>\u0645\u0635\u062f\u0631 \u0627\u0644\u0635\u0648\u0631\u0629 <a href=\"https:\/\/grpc.io\/docs\/guides\/\">grpc.io<\/a><\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:18px\">\u0633\u0646\u062a\u0639\u0644\u0645 \u0643\u064a\u0641 \u064a\u0639\u0645\u0644 gRPC \u0645\u0646 \u062e\u0644\u0627\u0644 \u0639\u0645\u0644 \u062a\u0637\u0628\u064a\u0642 \u0628\u0633\u064a\u0637 \u064a\u062a\u0643\u0648\u0646 \u0645\u0646 \u062c\u0632\u0626\u064a\u0646 \u0628\u0644\u063a\u062a\u064a\u0646 \u0645\u062e\u062a\u0644\u0641\u062a\u064a\u0646 <br>\u0633\u0646\u0633\u062a\u062e\u062f\u0645 \u0644\u063a\u0629 Go \u0648 C# \u0645\u0639 .NET Core.<br>\u0645\u0646 \u0627\u0644\u0645\u0645\u0643\u0646 \u0627\u0646 \u062a\u0643\u0648\u0646 C++ \u0627\u0648 Java \u0627\u0648 Python \u0627\u0648 \u0627\u064a \u0644\u063a\u0629 \u0627\u062e\u0631\u0649 \u0644\u0643\u0646 \u0627\u0646\u0627 \u0641\u0636\u0644\u062a \u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0647\u0627\u062a\u064a\u0646 \u0627\u0644\u0644\u063a\u062a\u064a\u0646 \u0641\u064a \u0647\u0630\u0627 \u0627\u0644\u0645\u062b\u0627\u0644 \u060c \u064a\u0645\u0643\u0646\u0643 \u0627\u0644\u062a\u062d\u0642\u0642 \u0645\u0646 \u0627\u0644\u0644\u063a\u0627\u062a \u0627\u0644\u0645\u062f\u0639\u0648\u0645\u0629 \u0645\u0646 \u062e\u0644\u0627\u0644 <a href=\"https:\/\/grpc.io\/docs\/reference\/\">\u0627\u0644\u0645\u0648\u0642\u0639 \u0627\u0644\u0631\u0633\u0645\u064a <\/a>.<br><br>\u0633\u0646\u0642\u0648\u0645 \u0628\u0639\u0645\u0644 \u062a\u0637\u0628\u064a\u0642 \u0628\u0633\u064a\u0637 \u0648\u0633\u064a\u0643\u0648\u0646 \u0639\u0628\u0627\u0631\u0629 \u0639\u0646 service \u0645\u0643\u062a\u0648\u0628\u0629 \u0628\u0644\u063a\u0629 go \u0645\u0633\u0624\u0648\u0644\u0629 \u0639\u0646 \u0627\u062f\u0627\u0631\u0629 \u0627\u0644accounts \u0648\u0633\u0646\u0633\u062a\u062e\u062f\u0645\u0647\u0627 \u0645\u0646 \u062e\u0644\u0627\u0644 C# Client.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u0623\u0648\u0644\u0627: \u062a\u0639\u0631\u064a\u0641 \u0627\u0644Services \u0648\u0627\u0644Message Types \u0645\u0646 \u062e\u0644\u0627\u0644 Protobuf<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:18px\">\u0643\u0645\u0627 \u0630\u0643\u0631\u0646\u0627 \u0633\u0627\u0628\u0642\u0627 gRPC \u064a\u0633\u062a\u062e\u062f\u0645 Protobuf \u0643\u0640default serialization format \u0644\u062a\u0636\u0645\u064a\u0646 \u0627\u0644\u0628\u064a\u0627\u0646\u0627\u062a \u0628\u064a\u0646 \u0627\u0644client \u0648\u0627\u0644server \u060c \u064a\u0636\u0645\u0646 \u0647\u0630\u0627 \u0627\u0644format \u0633\u0631\u0639\u0629 \u0648\u0643\u0641\u0627\u0621\u0629 \u0641\u064a \u0646\u0642\u0644 \u0627\u0644\u0628\u064a\u0627\u0646\u0627\u062a \u0623\u0643\u062b\u0631 \u0645\u0646 XML \u0648 JSON.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:18px\">\u062a\u0639\u0631\u064a\u0641 \u0645\u0644\u0641 \u0627\u0644Protobuf:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:18px\">\u062f\u0639\u0646\u0627 \u0646\u0642\u0648\u0645 \u0628\u0625\u0646\u0634\u0627\u0621 \u0645\u0644\u0641 \u0648\u0644\u0646\u0633\u0645\u0647 <em>account.proto<\/em><\/p>\n\n\n\n<pre class=\"line-numbers\" dir=\"ltr\"><code class=\"language-protobuf\">syntax = \"proto3\";\n\npackage accountproto;\n\nmessage CreateAccountRequest{\n    string username = 1;\n    string email = 2;\n}\n\nmessage CreateAccountResponse{\n    string id = 1;\n}\n\nmessage GetAccountInformationRequest{\n    string id = 1;\n}\n\nmessage GetAccountInformationResponse{\n    string id = 1;\n    string username = 2;\n    string email = 3;\n}\n\nservice AccountService{\n    rpc CreateAccount(CreateAccountRequest) returns (CreateAccountResponse){}\n    rpc GetAccountInformation(GetAccountInformationRequest) returns (GetAccountInformationResponse){}\n}\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:18px\">\u0641\u064a \u0627\u0644\u0628\u062f\u0627\u064a\u0629 \u0642\u0645\u0646\u0627 \u0628\u062a\u0639\u0631\u064a\u0641 \u0627\u0646\u0646\u0627 \u0646\u0633\u062a\u062e\u062f\u0645 proto3 \u0645\u0646 \u0627\u0644\u0640protocol buffers language \u0648\u0625\u0630\u0627 \u0644\u0645 \u0646\u0630\u0643\u0631\u0647\u0627 \u0633\u064a\u0641\u062a\u0631\u0636 \u0627\u0646\u0646\u0627 \u0646\u0633\u062a\u062e\u062f\u0645 proto2 \u0648\u0646\u062d\u0646 \u0644\u0627 \u0646\u0631\u064a\u062f \u0630\u0644\u0643.<br>\u0628\u0639\u062f\u0647\u0627 package \u0648\u0647\u064a \u0633\u062a\u0643\u0648\u0646 \u0627\u0644package name \u0644\u0645\u0644\u0641 go \u0627\u0644\u0630\u064a \u0633\u064a\u062a\u0643\u0648\u0646 \u0645\u0646 \u0647\u0630\u0627 \u0627\u0644proto, \u0641\u064a \u062d\u0627\u0644\u0629 c# \u062d\u0642\u0644 package \u0633\u064a\u0643\u0648\u0646 \u0647\u0648 \u0627\u0644namespace \u0644\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u0645\u0639\u0644\u0648\u0645\u0627\u062a \u064a\u0645\u0643\u0646\u0643 \u0627\u0644\u062a\u0623\u0643\u062f \u0645\u0646 <a href=\"https:\/\/developers.google.com\/protocol-buffers\/docs\/proto3#packages\">\u0627\u0644\u0645\u0648\u0642\u0639 \u0627\u0644\u0631\u0633\u0645\u064a<\/a>.<br>\u064a\u062a\u0643\u0648\u0646 \u0628\u0627\u0642\u064a \u0627\u0644\u0645\u0644\u0641 \u0645\u0646 \u0646\u0648\u0639\u064a\u0646 \u0645\u0646 \u0627\u0644\u0628\u064a\u0627\u0646\u0627\u062a \u0648\u0647\u064a service \u0648 message.<br>\u0627\u0644\u0640message \u0647\u064a \u0645\u0627\u0633\u064a\u062f\u062e\u0644 \u0627\u0648 \u0645\u0627\u0633\u064a\u062e\u0631\u062c \u0645\u0646 method \u0645\u0639\u064a\u0646\u0629 \u0641\u064a \u0627\u0644service \u0627\u0644\u062e\u0627\u0635\u0629 \u0628\u0643, \u0628\u062f\u0627\u062e\u0644\u0647\u0627 properties \u0648\u0627\u0644\u0627\u0646\u0648\u0627\u0639 \u0627\u0644\u0645\u062f\u0639\u0648\u0645\u0629 \u0644\u0647\u0630\u0647 \u0627\u0644\u062d\u0642\u0648\u0644 \u0647\u064a string, bytes, int32,float,double \u0648\u064a\u0645\u0643\u0646\u0643 \u0645\u0639\u0631\u0641\u0629 \u0628\u0627\u0642\u064a \u0627\u0644\u0627\u0646\u0648\u0627\u0639 \u0627\u0644\u0645\u062f\u0639\u0648\u0645\u0629 <a href=\"https:\/\/developers.google.com\/protocol-buffers\/docs\/proto3#scalar\">\u0645\u0646 \u0647\u0646\u0627<\/a>.<br>\u0627\u0644\u0631\u0642\u0645 \u0628\u0639\u062f \u062a\u0639\u0631\u064a\u0641 \u0627\u0644property \u0644\u0627\u0628\u062f \u0627\u0646 \u064a\u0643\u0648\u0646 \u0631\u0642\u0645 \u0641\u0631\u064a\u062f &#8220;unique&#8221; \u0644\u0627\u0646\u0647 \u0633\u064a\u0645\u062b\u0644 \u0627\u0644property name \u0639\u0646\u062f \u0639\u0645\u0644 serialization \u0644\u0647\u0627 \u0648\u062a\u062d\u0648\u064a\u0644\u0647\u0627 binary.<br><br>\u0646\u0642\u0648\u0645 \u0628\u062a\u0639\u0631\u064a\u0641 rpc methods \u0627\u0644\u0645\u062a\u0639\u0644\u0642\u0629 \u0628\u0627\u0644\u0640service \u0648\u0646\u062d\u062f\u062f \u0645\u0627\u0647\u064a \u0627\u0644inputs \u0648\u0627\u0644outputs \u0627\u0644\u062a\u064a \u0639\u0631\u0641\u0646\u0627\u0647\u0627 \u0633\u0627\u0628\u0642\u0627\u064b.<br>\u0643\u0645\u0627 \u0646\u0631\u0649 \u0644\u062f\u064a\u0646\u0627 method \u062a\u062f\u0639\u0649 CreateAccount \u062a\u0627\u062e\u0630 CreateAccountRequest \u0643\u0645\u062f\u062e\u0644 \u0648\u062a\u0631\u062c\u0639 CreateAccountResponse. <br>\u0627\u0644implementaion \u0627\u0644\u062e\u0627\u0635 \u0628\u0647\u0630\u0627 \u0628\u0647\u0630\u0647 \u0627\u0644method \u0633\u0646\u0639\u0631\u0641\u0647 \u0641\u064a \u0627\u0644\u0645\u0631\u062d\u0644\u0629 \u0627\u0644\u062a\u0627\u0644\u064a\u0629 \u0628\u0639\u062f \u062a\u0648\u0644\u064a\u062f go file \u0627\u0644\u0630\u064a \u064a\u062d\u062a\u0648\u064a \u0639\u0644\u0649 \u0627\u0644interface \u0627\u0644\u062e\u0627\u0635 \u0628\u0627\u0644account.proto \u0627\u0644\u0630\u064a \u0642\u0645\u0646\u0627 \u0628\u062a\u0639\u0631\u064a\u0641\u0647.<br>\u0646\u0627\u062a\u064a \u0627\u0644\u0627\u0646 \u0644\u062e\u0637\u0648\u0627\u062a \u0639\u0645\u0644 compilation \u0644\u0647\u0630\u0627 \u0627\u0644\u0645\u0644\u0641<br>\u0623\u0648\u0644\u0627: \u0642\u0645 \u0628\u062a\u0646\u0632\u064a\u0644 \u0627\u0644compliler <a href=\"https:\/\/developers.google.com\/protocol-buffers\/docs\/downloads\">\u0645\u0646 \u0647\u0646\u0627<\/a>.<br>\u062b\u0627\u0646\u064a\u0627: \u0642\u0645 \u0628\u0627\u0644\u0630\u0647\u0627\u0628 \u0627\u0644\u0649 \u0627\u0644\u0645\u062c\u0644\u062f \u0648\u062a\u0646\u0641\u064a\u0630 \u0647\u0630\u0627 \u0627\u0644\u0627\u0645\u0631 \u0645\u0646 \u062e\u0644\u0627\u0644 \u0627\u0644Terminal :<\/p>\n\n\n\n<pre class=\"line-numbers\" dir=\"ltr\"><code class=\"language-javascript\">protoc -I ..\/account-proto --go_out=plugins=grpc:.\/proto-go ..\/account-proto\/account.proto\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:18px\">\u0628\u0639\u062f \u062a\u0646\u0641\u064a\u0630 \u0647\u0630\u0627 \u0627\u0644\u0623\u0645\u0631 \u0648\u0625\u0630\u0627 \u0643\u0627\u0646 \u0643\u0644 \u0634\u0626 \u0639\u0644\u0649 \u0645\u0627\u064a\u0631\u0627\u0645 &#8220;Hopefully&#8221; \u0633\u0646\u062c\u062f \u0627\u0646\u0647 \u062a\u0645 \u062a\u0648\u0644\u064a\u062f \u0645\u0644\u0641 \u062c\u062f\u064a\u062f \u0628\u0627\u0633\u0645 account.pb.go \u064a\u062d\u062a\u0648\u064a \u0639\u0644\u0649 \u0647\u0630\u0627 \u0627\u0644\u0645\u0644\u0641 \u0639\u0644\u0649 \u0627\u0644\u0627\u0648\u0627\u0645\u0631 \u0627\u0644\u0644\u0627\u0632\u0645\u0629 \u0644\u062a\u0633\u062c\u064a\u0644 \u0648\u062a\u0634\u063a\u064a\u0644 \u0627\u0644service \u0627\u0644\u062e\u0627\u0635\u0629 \u0628\u0646\u0627 \u0643\u0645\u0627 \u064a\u062d\u062a\u0648\u064a \u0623\u064a\u0636\u0627\u064b \u0639\u0644\u0649 structs \u062a\u0645 \u062a\u0648\u0644\u064a\u062f\u0647\u0627 \u062a\u0644\u0642\u0627\u0626\u064a\u0627 \u0644\u0644messages \u0627\u0644\u062a\u064a \u0642\u0645\u0646\u0627 \u0628\u062a\u0639\u0631\u064a\u0641\u0647\u0627 \u0641\u064a \u0627\u0644\u0645\u0644\u0641 \u0648 \u0623\u064a\u0636\u0627\u064b interface \u0644\u0644service \u0627\u0644\u062e\u0627\u0635\u0629 \u0628\u0646\u0627 \u0644\u0643\u064a \u0646\u062a\u0645\u0643\u0646 \u0645\u0646 \u0639\u0645\u0644 implementation \u0644\u0644methods \u0627\u0644\u062a\u064a \u0639\u0631\u0641\u0646\u0627\u0647\u0627.<\/p>\n\n\n\n<pre class=\"line-numbers\" dir=\"ltr\"><code class=\"language-go\">package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"net\"\n\t\"errors\"\n\n\tpb \"github.com\/Ahmad-Magdy\/grpc-by-example\/proto-go\"\n\n\t\"google.golang.org\/grpc\"\n\t\"google.golang.org\/grpc\/reflection\"\n\t\"github.com\/satori\/go.uuid\"\n)\n\ntype Account struct {\n\tID       string\n\tUsername string\n\tEmail    string\n}\n\nvar (\n\taccounts []*Account\n)\n\ntype server struct{}\n\nfunc (s *server) CreateAccount(ctx context.Context, accountRequest *pb.CreateAccountRequest) (*pb.CreateAccountResponse, error) {\n\tfmt.Printf(\"Server: Recived, %s\\n\", accountRequest.GetUsername())\n\n\tnewAccount := &amp;Account{\n\t\tID: uuid.NewV4().String()  ,\n\t\tUsername: accountRequest.GetUsername(),\n\t\tEmail:    accountRequest.GetEmail(),\n\t}\n\n\taccounts = append(accounts, newAccount)\n\treturn &amp;pb.CreateAccountResponse{Id: newAccount.ID}, nil\n}\n\nfunc (s *server) GetAccountInformation(ctx context.Context, m *pb.GetAccountInformationRequest) (*pb.GetAccountInformationResponse,error){\n\t for _,accountItem:= range accounts{\n\t\t if accountItem.ID == m.GetId(){\n\t\t\t return &amp;pb.GetAccountInformationResponse{\n\t\t\t\t\t\t\t\t\t\t\tId:accountItem.ID, \n\t\t\t\t\t\t\t\t\t\t\tUsername : accountItem.Username, \n\t\t\t\t\t\t\t\t\t\t\tEmail:accountItem.Email, }, nil\n\t\t }\n\n\t }\n\t return nil, errors.New(\"account not found\")\n}\n\nfunc main() {\n\tlis, err := net.Listen(\"tcp\", \":3000\")\n\tif err != nil {\n\t\tlog.Fatal(\"Failed to listen: %v\", err)\n\t}\n\n\ts := grpc.NewServer()\n\tpb.RegisterAccountServiceServer(s, &amp;server{})\n\treflection.Register(s)\n\tif err := s.Serve(lis); err != nil {\n\t\tlog.Fatal(\"Failed to serve: %v\", err)\n\t}\n}\n\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:18px\">\u062f\u0639\u0648\u0646\u064a \u0627\u0642\u0648\u0645 \u0628\u062a\u0648\u0636\u064a\u062d \u0645\u0627\u0642\u0645\u062a \u0628\u0643\u062a\u0627\u0628\u062a\u0647 \u0641\u064a \u0647\u0630\u0627 \u0627\u0644\u0645\u0644\u0641 \u062e\u0637\u0648\u0629 \u0628\u062e\u0637\u0648\u0629:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u0642\u0645\u062a \u0628\u0627\u0633\u062a\u064a\u0631\u0627\u062f pb &#8220;github.com\/Ahmad-Magdy\/grpc-by-example\/proto-go&#8221; \u0648\u0627\u0644\u0630\u064a \u064a\u0645\u062b\u0644 \u0627\u0644\u0640folder \u0627\u0644\u0630\u064a \u064a\u062d\u062a\u0648\u064a \u0639\u0644\u0649 \u0645\u0644\u0641 \u0627\u0644\u0645\u062a\u0648\u0644\u062f \u0645\u0646 \u0627\u0644proto file.<\/li><li>\u0642\u0645\u062a \u0628\u062a\u0639\u0631\u064a\u0641 struct \u064a\u0645\u062b\u0644 \u0627\u0644server \u0648\u0627\u0644\u0630\u064a \u0633\u064a\u062d\u062a\u0648\u064a \u0639\u0644\u0649 \u0627\u0644implementation \u0644\u0644methods \u0627\u0644\u0630\u064a \u0642\u0645\u0646\u0627 \u0628\u062a\u0639\u0631\u064a\u0641\u0647\u0627 \u0641\u064a \u0627\u0644proto file.<\/li><li>\u0643\u0645\u0627 \u0630\u0643\u0631\u0646\u0627 \u064a\u0648\u062c\u062f \u0644\u062f\u064a\u0646\u0627 2 methods \u0648\u0627\u062d\u062f\u0629 \u062a\u062f\u0639\u0649 CreateAccount \u0648\u0627\u0644\u0627\u062e\u0631\u0649 GetAccountInformation.<\/li><li>\u0642\u0645\u062a \u0628\u0639\u0645\u0644 implementation \u0628\u0633\u064a\u0637 \u064a\u0648\u0636\u062d \u0643\u064a\u0641 \u062a\u0639\u0645\u0644 \u0647\u0630\u0647 \u0627\u0644methods \u0648\u0647\u0648 \u0644\u064a\u0633 efficient \u0648\u0644\u0643\u0646 \u064a\u0643\u0641\u064a \u0644\u062a\u0648\u0636\u064a\u062d \u0648\u062a\u0628\u0633\u064a\u0637 \u0627\u0644\u0641\u0643\u0631\u0629.<\/li><li>\u0641\u064a func main \u0642\u0645\u062a \u0628\u0625\u0646\u0634\u0627\u0621 server \u062c\u062f\u064a\u062f \u0644\u0644grpc \u0648\u062a\u0633\u062c\u064a\u0644 \u0627\u0644service \u0627\u0644\u062e\u0627\u0635\u0629 \u0628\u064a, \u0627\u0644\u0643\u0648\u062f \u0627\u0644\u062e\u0627\u0635 \u0628\u062a\u0633\u062c\u064a\u0644 \u0627\u0644service \u0648\u0647\u0648 \u0628\u062f\u0627\u062e\u0644 &#8220;RegisterAccountServiceServer&#8221; \u062a\u0645 \u062a\u0648\u0644\u064a\u062f\u0647 \u062a\u0644\u0642\u0627\u0626\u064a\u0627 \u0639\u0646\u062f \u0639\u0645\u0644 compile \u0644\u0645\u0644\u0641 \u0627\u0644proto \u0627\u0644\u0630\u064a \u0642\u0645\u0646\u0627 \u0628\u062a\u0639\u0631\u064a\u0641\u0647 \u0633\u0627\u0628\u0642\u0627\u064b.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:18px\">\u0643\u0641\u0649 \u062d\u062f\u064a\u062b\u0627 \u0648\u062f\u0639\u0648\u0646\u0627 \u0646\u0642\u0648\u0645 \u0628\u062a\u0634\u063a\u064a\u0644 \u0627\u0644\u0628\u0631\u0646\u0627\u0645\u062c \u0644\u0646\u0631\u0649 \u0627\u0644\u0646\u062a\u064a\u062c\u0629:<br><\/p>\n\n\n\n<div class=\"wp-block-media-text alignwide\" style=\"grid-template-columns:100% auto\"><figure class=\"wp-block-media-text__media\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"290\" src=\"http:\/\/amagdy.me\/blog\/wp-content\/uploads\/2019\/02\/Screenshot-2019-02-16-at-9.07.29-PM-1024x290.png\" alt=\"\" class=\"wp-image-604\" srcset=\"https:\/\/magdy.dk\/arblog\/wp-content\/uploads\/2019\/02\/Screenshot-2019-02-16-at-9.07.29-PM-1024x290.png 1024w, https:\/\/magdy.dk\/arblog\/wp-content\/uploads\/2019\/02\/Screenshot-2019-02-16-at-9.07.29-PM-300x85.png 300w, https:\/\/magdy.dk\/arblog\/wp-content\/uploads\/2019\/02\/Screenshot-2019-02-16-at-9.07.29-PM-768x217.png 768w, https:\/\/magdy.dk\/arblog\/wp-content\/uploads\/2019\/02\/Screenshot-2019-02-16-at-9.07.29-PM-1920x543.png 1920w, https:\/\/magdy.dk\/arblog\/wp-content\/uploads\/2019\/02\/Screenshot-2019-02-16-at-9.07.29-PM-720x204.png 720w, https:\/\/magdy.dk\/arblog\/wp-content\/uploads\/2019\/02\/Screenshot-2019-02-16-at-9.07.29-PM-580x164.png 580w, https:\/\/magdy.dk\/arblog\/wp-content\/uploads\/2019\/02\/Screenshot-2019-02-16-at-9.07.29-PM-320x91.png 320w, https:\/\/magdy.dk\/arblog\/wp-content\/uploads\/2019\/02\/Screenshot-2019-02-16-at-9.07.29-PM.png 2036w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><div class=\"wp-block-media-text__content\">\n<p class=\"wp-block-paragraph\"><\/p>\n<\/div><\/div>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:18px\">\u0644\u0627 \u0645\u0634\u0627\u0643\u0644 \u0648\u0643\u0644 \u0634\u0626 \u0639\u0644\u0649 \u0645\u0627\u064a\u0631\u0627\u0645 \u0627\u0644\u0649 \u062d\u062f \u0627\u0644\u0627\u0646 \ud83c\udf89\ud83c\udf89 \u062f\u0639\u0648\u0646\u0627 \u0646\u0646\u062a\u0642\u0644 \u0627\u0644\u0649 \u062c\u0632\u0621 \u0627\u0644C# ,<\/p>\n\n\n\n<pre class=\"line-numbers\" dir=\"ltr\"><code class=\"language-bash\">dotnet new sln --name xyz\ndotnet new classlib --name AccountServiceBase\ndotnet sln account-service-client.sln add AccountServiceBase\/AccountServiceBase.csproj\ncd AccountServiceBase\ndotnet add package Grpc\ndotnet add package Grpc.Tools\ndotnet add package Google.Protobuf\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:18px\">\u0646\u0642\u0648\u0645 \u0628\u0639\u0645\u0644 solution \u062c\u062f\u064a\u062f \u0648\u0639\u0645\u0644 project \u0643base \u0644\u0646\u0627 \u064a\u062d\u062a\u0648\u064a \u0639\u0644\u0649 \u0627\u0644proto generated files  \u0648\u0627\u0644client \u0641\u064a project \u0645\u0646\u0641\u0635\u0644 \u064a\u0633\u062a\u062e\u062f\u0645\u0647.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:18px\">\u064a\u0644\u0632\u0645 \u062a\u0636\u0645\u064a\u0646 &lt;Protobuf&gt; \u0643 item group \u0644\u064a\u0642\u0648\u0645 \u0628\u0639\u0645\u0644 compile \u0644\u0644proto files \u0641\u064a \u0643\u0644 \u0645\u0631\u0629 \u0646\u0642\u0648\u0645 \u0628\u0647\u0627 \u0628\u0639\u0645\u0644 build \u0644\u0644project.<br>\u0641\u064a \u0627\u0644\u0646\u0647\u0627\u064a\u0629 \u064a\u0646\u0628\u063a\u064a \u0627\u0646 \u064a\u0643\u0648\u0646 \u0644\u062f\u064a\u0646\u0627 csproj \u064a\u0634\u0628\u0647 \u0647\u0630\u0627 \u0627\u0644\u0634\u0643\u0644.<\/p>\n\n\n\n<pre\n    class=\"wp-block-preformatted line-numbers\" dir=\"ltr\"><code class=\"language-markup\"><\/code>&lt;Project Sdk=&#8221;Microsoft.NET.Sdk&#8221;><br><br>  &lt;PropertyGroup><br>    &lt;TargetFramework>netstandard2.0&lt;\/TargetFramework><br>  &lt;\/PropertyGroup><br><br>  &lt;ItemGroup><br>    &lt;PackageReference Include=&#8221;Google.Protobuf&#8221; Version=&#8221;3.6.1&#8243; \/><br>    &lt;PackageReference Include=&#8221;Grpc&#8221; Version=&#8221;1.18.0&#8243; \/><br>    &lt;PackageReference Include=&#8221;Grpc.Tools&#8221; Version=&#8221;1.18.0&#8243;><br>      &lt;IncludeAssets>runtime; build; native; contentfiles; analyzers&lt;\/IncludeAssets><br>      &lt;PrivateAssets>all&lt;\/PrivateAssets><br>    &lt;\/PackageReference><br>  &lt;\/ItemGroup><br><br>  &lt;ItemGroup><br>    &lt;Protobuf Include=&#8221;..\/..\/**\/*.proto&#8221; OutputDir=&#8221;%(RelativePath)&#8221; CompileOutputs=&#8221;false&#8221; \/><br>  &lt;\/ItemGroup><br><br>&lt;\/Project><br><br><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:18px\">\u0625\u0630\u0627 \u0642\u0645\u062a \u0628\u062a\u062c\u0631\u0628\u0629 dotnet build \u0641\u0633\u062a\u062c\u062f \u0627\u0646\u0647 \u062a\u0645 \u062a\u0648\u0644\u064a\u062f \u0645\u0644\u0641\u064a\u0646 \u0648\u0647\u0645\u0627 Account \u0648 AccountGrpc \u0627\u0644\u0630\u064a\u0646 \u0633\u064a\u062a\u0645 \u0627\u0633\u062a\u062e\u062f\u0627\u0645\u0647\u0645\u0627 \u0644\u0627\u062d\u0642\u0627.<br>\u0627\u0644\u0623\u0646 \u0646\u0642\u0648\u0645 \u0628\u0627\u0646\u0634\u0627\u0621 \u0627\u0644client \u0644\u0647\u0630\u0647 \u0627\u0644service \u0641\u064a \u0646\u0641\u0633 \u0627\u0644\u0645\u062c\u0644\u062f \u0627\u0644\u062e\u0627\u0635 \u0628\u0627\u0644solution \u0646\u0642\u0648\u0645 \u0628\u062a\u0646\u0641\u064a\u0630 \u0627\u0644\u0627\u062a\u064a:<\/p>\n\n\n\n<pre class=\"line-numbers\" dir=\"ltr\"><code class=\"language-bash\">dotnet new console --name AccountServiceClient\ndotnet sln account-service-client.sln add AccountServiceClient\/AccountServiceClient.csproj\ndotnet add AccountServiceClient\/AccountServiceClient.csproj reference AccountServiceBase\/AccountServiceBase.csproj\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<pre class=\"line-numbers\" dir=\"ltr\"><code class=\"language-csharp\">static void Main(string[] args)\n{\n    var channel = new Channel(\"localhost:3000\", ChannelCredentials.Insecure);\n\n    var client = new AccountService.AccountServiceClient(channel);\n\n    var reply = client.CreateAccount(new CreateAccountRequest() {Username = \"Adam\",Email = \"a@amagdy.me\"});\n   \n    Console.WriteLine($\"Reply from the server with message {reply.Id}\");\n\n    channel.ShutdownAsync().Wait();\n}\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li>\u0641\u064a \u0627\u0644\u0628\u062f\u0627\u064a\u0629 \u0642\u0645\u0646\u0627 \u0628\u062a\u0639\u0631\u064a\u0641 channel \u0644\u062a\u062a\u0635\u0644 \u0639\u0644\u0649 \u0646\u0641\u0633 \u0627\u0644server \u0627\u0644\u0630\u064a \u0642\u0645\u0646\u0627 \u0628\u062a\u0639\u0631\u064a\u0641\u0647 \u0641\u064a go \u0628\u0646\u0641\u0633 \u0627\u0644port \u0648\u0627\u0644\u0630\u064a \u0643\u0627\u0646 3000 `, \u0648\u0627\u062e\u062a\u0631\u0646\u0627 \u0627\u0646 \u062a\u0643\u0648\u0646 \u0627\u0644Credentials Insecure \u0648\u0628\u0630\u0644\u0643 \u0644\u0646 \u062a\u0643\u0648\u0646 \u0645\u0639 SSL \u0648\u064a\u0645\u0643\u0646\u0643 \u0642\u0631\u0627\u0621\u0629 \u0627\u0644\u0645\u0632\u064a\u062f \u0645\u0646 \u0627\u0644\u062a\u0641\u0627\u0635\u064a\u0644 <a href=\"https:\/\/grpc.io\/grpc\/csharp\/api\/Grpc.Core.ChannelCredentials.html#Grpc_Core_ChannelCredentials_Insecure\">\u0645\u0646 \u0647\u0646\u0627<\/a>.<\/li><li>\u0628\u0639\u062f \u0630\u0644\u0643 \u0642\u0645\u0646\u0627 \u0628\u062a\u0639\u0631\u064a\u0641 client \u0644\u0644service \u0627\u0644\u062e\u0627\u0635\u0629 \u0628\u0646\u0627 \u0648\u062a\u0646\u0641\u064a\u0630 CreateAccount \u0648\u0627\u0646\u062a\u0638\u0627\u0631 \u0627\u0644\u0631\u062f \u0645\u0646 \u0627\u0644\u0633\u064a\u0631\u0641\u0631 \u0645\u0646 \u0627\u0644\u062c\u0627\u0646\u0628 \u0627\u0644\u0627\u062e\u0631.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/amagdy.me\/blog\/wp-content\/uploads\/2019\/02\/Screenshot-2019-02-16-at-11.21.54-PM-1024x289.png\" alt=\"\" class=\"wp-image-629\" width=\"976\" height=\"275\" srcset=\"https:\/\/magdy.dk\/arblog\/wp-content\/uploads\/2019\/02\/Screenshot-2019-02-16-at-11.21.54-PM-1024x289.png 1024w, https:\/\/magdy.dk\/arblog\/wp-content\/uploads\/2019\/02\/Screenshot-2019-02-16-at-11.21.54-PM-300x85.png 300w, https:\/\/magdy.dk\/arblog\/wp-content\/uploads\/2019\/02\/Screenshot-2019-02-16-at-11.21.54-PM-768x217.png 768w, https:\/\/magdy.dk\/arblog\/wp-content\/uploads\/2019\/02\/Screenshot-2019-02-16-at-11.21.54-PM-1920x541.png 1920w, https:\/\/magdy.dk\/arblog\/wp-content\/uploads\/2019\/02\/Screenshot-2019-02-16-at-11.21.54-PM-720x203.png 720w, https:\/\/magdy.dk\/arblog\/wp-content\/uploads\/2019\/02\/Screenshot-2019-02-16-at-11.21.54-PM-580x164.png 580w, https:\/\/magdy.dk\/arblog\/wp-content\/uploads\/2019\/02\/Screenshot-2019-02-16-at-11.21.54-PM-320x90.png 320w\" sizes=\"auto, (max-width: 976px) 100vw, 976px\" \/><\/figure>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\">\u0627\u0644\u062e\u0644\u0627\u0635\u0629:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:18px\">\u0641\u064a \u0647\u0630\u0647 \u0627\u0644\u0645\u0642\u0627\u0644\u0629 \u0623\u062e\u0630\u0646\u0627 \u0646\u0628\u0630\u0629 \u0633\u0631\u064a\u0639\u0629 \u0639\u0646 \u0627\u0644gRPC \u0648\u0643\u064a\u0641 \u062a\u0628\u062f\u0623 \u0628\u0627\u0633\u062a\u062e\u062f\u0627\u0645\u0647 \u0641\u064a \u0645\u0634\u0631\u0648\u0639\u0643, \u062a\u0639\u0631\u0641\u0646\u0627 \u0627\u064a\u0636\u0627 \u0627\u0646\u0647 \u064a\u062f\u0639\u0645 \u0627\u0644\u0643\u062b\u064a\u0631 \u0645\u0646 \u0627\u0644\u0644\u063a\u0627\u062a \u0645\u062b\u0644 C#, Go, PHP , Python, Ruby, Node.js and <a href=\"https:\/\/grpc.io\/docs\/reference\/\">much more<\/a>.<br>\u062d\u0627\u0648\u0644\u0646\u0627 \u0641\u064a \u0647\u0630\u0627 \u0627\u0644\u0645\u0642\u0627\u0644 \u062a\u0637\u0628\u064a\u0642 \u0645\u062b\u0627\u0644 \u0628\u0633\u064a\u0637 \u0644service \u0648\u0637\u0631\u064a\u0642\u0629 \u0627\u0633\u062a\u062f\u0639\u0627\u0626\u0647\u0627 \u0641\u064a \u0644\u063a\u0629 \u0627\u062e\u0631\u0649 \u0648\u0627\u0633\u062a\u062e\u062f\u0627\u0645\u0647\u0627 \u0643\u0627\u0646 \u0645\u0646 \u0627\u0644\u0645\u0645\u0643\u0646 \u0627\u064a\u0636\u0627 \u0627\u0646\u062a \u062a\u0643\u0648\u0646 \u0645\u062c\u0645\u0648\u0639\u0629 \u0645\u0646 \u0627\u0644services \u062a\u062a\u0648\u0627\u0635\u0644 \u0641\u064a\u0645\u0627 \u0628\u064a\u0646\u0647\u0627 \u0648\u0644\u0643\u0646 \u0631\u0627\u0639\u064a\u062a \u0627\u0646 \u064a\u0643\u0648\u0646 \u0627\u0644\u0645\u0642\u0627\u0644 \u0642\u0635\u064a\u0631\u0627 \u0641\u064a\u0633\u0647\u0644 \u0642\u0631\u0627\u0621\u062a\u0647 \u0648\u064a\u0645\u0643\u0646\u0643 \u062a\u0637\u0628\u064a\u0642 \u0627\u0644\u0628\u0627\u0642\u064a \u0628\u0646\u0641\u0633 \u0627\u0644\u0637\u0631\u064a\u0642\u0629.<br>\u0633\u0623\u0642\u0648\u0645 \u0644\u0627\u062d\u0642\u0627\u064b \u0628\u0645\u0634\u0627\u0631\u0643\u0629 \u0647\u0630\u0627 \u0627\u0644\u0645\u062b\u0627\u0644 \u0639\u0644\u0649 Github.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0645\u0635\u0627\u062f\u0631 \u0645\u0641\u064a\u062f\u0629:<br><a href=\"https:\/\/github.com\/vladimirvivien\/go-grpc\">https:\/\/github.com\/vladimirvivien\/go-grpc<br><\/a><a href=\"https:\/\/github.com\/grpc\/grpc-go\">https:\/\/github.com\/grpc\/grpc-go<br><\/a><a href=\"https:\/\/github.com\/grpc\/grpc\/blob\/master\/src\/csharp\/BUILD-INTEGRATION.md\">https:\/\/github.com\/grpc\/grpc\/blob\/master\/src\/csharp\/BUILD-INTEGRATION.md<br><\/a><a href=\"https:\/\/github.com\/grpc\/grpc\/tree\/master\/examples\/csharp\/Helloworld\">https:\/\/github.com\/grpc\/grpc\/tree\/master\/examples\/csharp\/Helloworld<br><\/a><a href=\"https:\/\/grpc.io\/docs\/tutorials\/basic\/csharp.html\">https:\/\/grpc.io\/docs\/tutorials\/basic\/csharp.html<br><\/a><br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0633\u0646\u062a\u0639\u0631\u0641 \u0645\u0646 \u062e\u0644\u0627\u0644 \u0647\u0630\u0627 \u0627\u0644\u0645\u0642\u0627\u0644 \u0639\u0644\u0649 \u062a\u0642\u0646\u064a\u0629 Grpc \u0648\u0643\u064a\u0641\u064a\u0629 \u0627\u0633\u062a\u062e\u062f\u0627\u0645\u0647\u0627 \u0645\u0639 \u0645\u062b\u0627\u0644 \u0644\u0647\u0627. \u0623\u0648\u0644\u0627: \u0645\u0627\u0647\u0648 gRPC:\u062f\u0639\u0648\u0646\u0627 \u0623\u0648\u0644\u0627 \u0646\u0642\u0648\u0645 \u0628\u062a\u0639\u0631\u064a\u0641 RPC \u0641\u0642\u0637 :RPC \u0647\u0648 \u0625\u062e\u062a\u0635\u0627\u0631 \u0644 Remote Procedure Call \u0648\u0647\u0648 \u062a\u0642\u0646\u064a\u0629 \u062a\u064e\u0633\u062a\u062e\u062f\u0645 \u0646\u0638\u0627\u0645 client server model \u0644\u0646\u0642\u0644 \u0627\u0644\u0628\u064a\u0627\u0646\u0627\u062a \u0628\u064a\u0646 \u0627\u0644client \u0648 \u0627\u0644server \u0648\u062a\u0643\u0648\u0646 \u0639\u0645\u0644\u064a\u0629 \u062a\u0632\u0627\u0645\u0646\u064a\u0629 &#8220;Synchronous&#8221; \u0648\u062a\u0633\u0645\u0649 Unary \u0628\u062d\u064a\u062b \u0627\u0646\u0643 \u0639\u0646\u062f\u0645\u0627 \u062a\u0631\u0633\u0644 request \u062a\u0646\u062a\u0638\u0631 \u062d\u062a\u0649 \u062a\u062d\u0635\u0644 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[62],"tags":[],"class_list":["post-583","post","type-post","status-publish","format-standard","hentry","category---en"],"aioseo_notices":[],"views":1396,"_links":{"self":[{"href":"https:\/\/magdy.dk\/arblog\/index.php?rest_route=\/wp\/v2\/posts\/583","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/magdy.dk\/arblog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/magdy.dk\/arblog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/magdy.dk\/arblog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/magdy.dk\/arblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=583"}],"version-history":[{"count":52,"href":"https:\/\/magdy.dk\/arblog\/index.php?rest_route=\/wp\/v2\/posts\/583\/revisions"}],"predecessor-version":[{"id":660,"href":"https:\/\/magdy.dk\/arblog\/index.php?rest_route=\/wp\/v2\/posts\/583\/revisions\/660"}],"wp:attachment":[{"href":"https:\/\/magdy.dk\/arblog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=583"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/magdy.dk\/arblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=583"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/magdy.dk\/arblog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=583"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}