11 Matching Annotations
  1. Jun 2021
    1. We use a single stream/queue/channel to deliver messages from RPC to WS. RPC server acts as publisher: it pushes a JSON-encoded command. Pubsub connection is initialized lazily in this case (during the first #broadcast call). WS server (anycable-go) acts as subscriber: subscription is initialized on server start, messages are received, deserialized and passed to the app.
  2. May 2021
    1. Since the two streams are independent, the client and server can read and write messages in any order

      That's how batching can happen in gRPC. With bi-directional streaming

    2. the server is notified that the RPC has been invoked with the client’s metadata for this call, the method name, and the specified deadline if applicable.

      Two-prong approach. The server is notified "of the intent to invoke the method on server side".

    3. protocol buffers as the Interface Definition Language (IDL) for describing both the service interface and the structure of the payload messages.
    4. The gRPC infrastructure decodes incoming requests, executes service methods, and encodes service responses.

      Encoding and decoding does happen in gRPC

  3. Dec 2020
  4. Oct 2020
    1. However, if you want to create a backend API that is meant to be consumed only by your frontend, then you don't need REST nor GraphQL — RPC, such as Wildcard, is enough.
  5. Nov 2019
    1. REST and GraphQL are wonderful tools to create an API that is meant to be consumed by third parties. Facebook's API, for example, is consumed by ~200k third parties. It is no surprise that Facebook is using (and invented) GraphQL; a GraphQL API enables third parties to extensively access Facebook's social graph enabling them to build all kinds of applications. For an API with that many consumers, GraphQL is the fitting tool. But, to create an internal API (an API developed and consumed by code written by the same organization), RPC offers a simpler and more powerful alternative. Large companies, such as Netflix, Google and Facebook, are starting to replace REST/GraphQL with RPC for their internal APIs. Most notably with gRPC which is getting popular in the industry.
    2. RPC is increasingly used to create backend APIs as most are internal: most of the time, a backend API is consumed only by frontends developed within the same organization. In general, REST and GraphQL are the right tools if you want to create an API consumed by code written by third parties and RPC is the right tool if you want to create an API consumed by code written by yourself / your organization.
  6. Mar 2017