Upgrade to Pro — share decks privately, control downloads, hide ads and more …

gRPCとSwift (導入編)

gRPCとSwift (導入編)

CA.Swift #5
2017.01.25

shinji hayashi

January 26, 2018
Tweet

More Decks by shinji hayashi

Other Decks in Technology

Transcript

  1. ಋೖ FDIPQSPUP syntax = "proto3"; package echo; service Echo {

    rpc Get(EchoRequest) returns (EchoResponse) {} rpc Expand(EchoRequest) returns (stream EchoResponse) {} rpc Collect(stream EchoRequest) returns (EchoResponse) {} rpc Update(stream EchoRequest) returns (stream EchoResponse) {} } message EchoRequest { // The text of a message to be echoed. string text = 1; } message EchoResponse { // The text of an echo response. string text = 1; }
  2. FDIPQSPUP syntax = "proto3"; package echo; service Echo { rpc

    Get(EchoRequest) returns (EchoResponse) {} rpc Expand(EchoRequest) returns (stream EchoResponse) {} rpc Collect(stream EchoRequest) returns (EchoResponse) {} rpc Update(stream EchoRequest) returns (stream EchoResponse) {} } message EchoRequest { // The text of a message to be echoed. string text = 1; } message EchoResponse { // The text of an echo response. string text = 1; }
  3. FDIPQSPUP syntax = "proto3"; package echo; service Echo { rpc

    Get(EchoRequest) returns (EchoResponse) {} rpc Expand(EchoRequest) returns (stream EchoResponse) {} ← serverStreaming rpc Collect(stream EchoRequest) returns (EchoResponse) {} ← clientStreaming rpc Update(stream EchoRequest) returns (stream EchoResponse) {} ← bidirectionalStreaming } message EchoRequest { // The text of a message to be echoed. string text = 1; } message EchoResponse { // The text of an echo response. string text = 1; } ← unaryStreaming
  4. FDIPQSPUP syntax = "proto3"; package echo; service Echo { rpc

    Get(EchoRequest) returns (EchoResponse) {} rpc Expand(EchoRequest) returns (stream EchoResponse) {} rpc Collect(stream EchoRequest) returns (EchoResponse) {} rpc Update(stream EchoRequest) returns (stream EchoResponse) {} } message EchoRequest { // The text of a message to be echoed. string text = 1; } message EchoResponse { // The text of an echo response. string text = 1; } ϦΫΤετϝοηʔδ Ϩεϙϯεϝοηʔδ ϝιουఆٛ ϝοηʔδ ఆٛ αʔϏεఆٛ