┌──────────────────────────────────────────────────────────────────────────────────────────┐
│service BridgeService {                                                                   │
│  // CreateClient client a new bridge client                                              │
│  rpc CreateClient (CreateClient.Request) returns (CreateClient.Reply);                   │
│                                                                                          │
│  // ClientInvokeUnary invoke a unary method                                              │
│  rpc ClientInvokeUnary (ClientInvokeUnary.Request) returns (ClientInvokeUnary.Reply);    │
│                                                                                          │
│  // CreateStream create a stream                                                         │
│  rpc CreateClientStream (ClientCreateStream.Request) returns (ClientCreateStream.Reply); │
│                                                                                          │
│  // Send Message over the given stream                                                   │
│  rpc ClientStreamSend (ClientStreamSend.Request) returns (ClientStreamSend.Reply);       │
│                                                                                          │
│  // Recv message over the given stream                                                   │
│  rpc ClientStreamRecv (ClientStreamRecv.Request) returns (ClientStreamRecv.Reply);       │
│                                                                                          │
│  // Close the given stream                                                               │
│  rpc ClientStreamClose (ClientStreamClose.Request) returns (ClientStreamClose.Reply);    │
│}                                                                                         │
└──────────────────────────────────────────────────────────────────────────────────────────┘
                                              │
                                              │
                                              │
                                              │
                                              │
                       ┌──────────────────────┘
                       │
                       │
┏━━━━━━┳───────────────┼────────────────────────────────────────────┐       ┏━━━━━━━━━━━━━━━━━━━━━━━━┳─────────────────────┐           ┏━━━━━━┳──────────────────────────────────────────────────────────────┐
┃  JS  ┃               │                                            │       ┃  NATIVE (ios/android)  ┃                     │           ┃  Go  ┃                                                              │
┣━━━━━━┛               ◎                                            │       ┣━━━━━━━━━━━━━━━━━━━━━━━━┛                     │           ┣━━━━━━┛                                                              │
│            ┌──────────────────┐         ┌──────────────┐          │       │                                              │           │                                                                     │
│            │                  │         │              │          │       │                                              │           │                                                                     │
│            │                  │         │              │          │       │                                              │           │                                                                     │
│            │                  │         │              │          │       │                                              │           │    ┌────────────┐     ┌────────────────┐     ┌──────────────────┐   │
│            │                  │         │  RPC native  │          │       │ ┌───────────────────────────────────────────┐│           │    │            │     │                │     │                  │   │
│            │  Bridge Service  │         │  Transport   │          │       │ │                                           ││           │    │   Buffer   │     │   ClientConn   │     │  Bridge Service  │   │
│         ┌─▶│      Client      │────────▶│ (Unary Only) │──────────┼───────┼▶│InvokeMethod (Base64EncodedMessage: String)│├───────────┼───▶│  Listener  │────▶│(Bridge Service)│────▶│      Server      │──┐│
│         │  │                  │         │              │          │       │ │                                           ││           │    │            │     │                │     │                  │  ││
│         │  │                  │         │              │          │       │ └───────────────────────────────────────────┘│           │    └────────────┘     └────────────────┘     └──────────────────┘  ││
│         │  │                  │         │              │          │       │                                              │           │                                                                    ││
│         │  │                  │         │              │          │       │                                              │           │                                                                    ││
│         │  └──────────────────┘         └──────────────┘          │       │                                              │           │       ┌────────────────────────────────────────────────────────────┘│
│         │                                                         │       │                                              │           │       │                                                             │
│         └─────────────────────────────────────────────────┐       │       │                                              │           │       │                                                             │
│                                                           │       │       │                                              │           │       │                                                             │
│                                         ┌──────────────┐  │       │       │                                              │           │       │  ┌────────────────┐                                         │
│                                         │              │  │       │       └──────────────────────────────────────────────┘           │       │  │                │                                         │
│                                         │              │  │       │                                                                  │       │  │                │                                         │
│                                         │              │  │       │                                                                  │       │  │                │                                         │
│                                         │              │  │       │                                                                  │       │  │                │                                         │
│                                         │              │  │       │                                                                  │       │  │                │                                         │
│        ┌──────────────────────┐         │              │  │       │                                                                  │       │  │                │               ┌──────────────────────┐  │
│        │  Messenger Service   │         │              │  │       │                                                                  │       │  │                │               │  Messenger Service   │  │
│        │        Client        │────┐    │              │  │       │                                                                  │       │  │                │       ┌──────▶│        Server        │  │
│        │                      │    │    │              │  │       │                                                                  │       │  │                │       │       │                      │  │
│        └──────────────────────┘    │    │              │  │       │                                                                  │       │  │                │       │       └──────────────────────┘  │
│        ┌──────────────────────┐    │    │    Bridge    │  │       │                                                                  │       │  │                │       │       ┌──────────────────────┐  │
│        │   Protocol Service   │    │    │  Transport   │  │       │                                                                  │       │  │GRPC ClientConn │       │       │   Protocol Service   │  │
│        │        Client        │────┼───▶│(Stream/Unary)│──┘       │                                                                  │       └─▶│(Mixed Services)│───────┼──────▶│        Server        │  │
│        │                      │    │    │              │          │                                                                  │          │                │       │       │                      │  │
│        └──────────────────────┘    │    │              │          │                                                                  │          │                │       │       └──────────────────────┘  │
│        ┌──────────────────────┐    │    │              │          │                                                                  │          │                │       │       ┌──────────────────────┐  │
│        │                      │    │    │              │          │                                                                  │          │                │       │       │                      │  │
│        │         ...          │────┘    │              │          │                                                                  │          │                │       └──────▶│         ...          │  │
│        │                      │         │              │          │                                                                  │          │                │               │                      │  │
│        └──────────────────────┘         │              │          │                                                                  │          │                │               └──────────────────────┘  │
│                                         │              │          │                                                                  │          │                │                                         │
│                                         │              │          │                                                                  │          │                │                                         │
│                                         │              │          │                                                                  │          │                │                                         │
│                                         │              │          │                                                                  │          │                │                                         │
│                                         └──────────────┘          │                                                                  │          └────────────────┘                                         │
│                                                                   │                                                                  │                                                                     │
│                                                                   │                                                                  │                                                                     │
│                                                                   │                                                                  │                                                                     │
└───────────────────────────────────────────────────────────────────┘                                                                  └─────────────────────────────────────────────────────────────────────┘
