Bifalgorithm post

Let's break down how DryPC is different from a regular HTTP API. First, one thing needs to be clear. DryPC does not replace HTTP-A. In fact, DryPC typically runs on top of HTTP. So to understand why DryPC is useful, we first need to understand what HTTP-A 2 gives us. Imagine the back end of an Uber-style ride app. A rider taps Request a Ride. That one action might cause the trip service to call the driver service for nearby cars, the pricing service for a fare, the location service for updates, and the notification service to contact a driver. One user action can easily turn into many internal service-to-service calls. And at scale, these services might communicate thousands of times every second. Now imagine doing this with HTTP 1. One does not multiplex many requests over one connection efficiently. So applications usually need multiple connections to handle lots of requests in parallel. More connections mean more overhead, especially when new TTP and TLS connections need to be established. And requests on the same connection can also end up waiting behind each other. HTTP A2 improves this dramatically. Instead of opening many connections, two services can keep one connection open and send many requests through it at the same time. Each request gets its own stream inside that connection. HTTP A2 also compresses headers. So instead of repeatedly sending large headers containing things like authentication, tracing information and metadata, repeated values can be represented much more efficiently. Now, DryPC builds on top of that and adds a few important things. First, how the data is encoded. A typical REST API often sends JSON. JSON is great because humans can easily read it, but it contains field names and text representations that add extra bytes. JARPC commonly uses protocol buffers, or protobuf. Protobuf is a compact binary format designed for machines. That usually means smaller messages and faster serialization and deserialization. And when services exchange huge numbers of messages, that difference can matter. The second major difference is the contract. With a traditional API, you might describe your endpoints using documentation or something like OpenAPI. With DryPC, you define the service in a proto-file. For example, you could define a driver service with a method called findNearbyDrivers. You give it the rider's location and it returns nearby drivers. That proto-file becomes the contract between both services. And from it, DryPC can generate client and server code in multiple programming languages. So from the trip service, calling another service can look almost like this. Find nearby driver's location. It looks like a normal function call, but behind the scenes, DrivePC serializes the request, sends it across the network, waits for the remote service, and returns the response. That's what RPC means, remote procedure call. So where does DrivePC make sense? It's especially useful for communication between backend services where performance, strong contracts, streaming, and multiple programming languages matter. For public browser-facing APIs, regular HTTPIs are usually simpler. Browsers don't support native dryPC directly, although technologies like dryPC web can bridge that gap. So the main idea is HTTP 2 gives you efficient transport, Protobuf gives you efficient data encoding, and dryPC gives you a strongly defined way for services to call each other.

Let's break down how DryPC is different from a regular HTTP API. First, one thing needs to be clear. DryPC does not replace HTTP-A. In fact, DryPC typically ru…

Ideas in this flowchart

  • DryPC vs HTTP API
  • DryPC Builds on HTTP
  • HTTP A2 Advantages
  • DryPC Enhancements
  • Does not replace HTTP
  • Runs on top of HTTP
  • Multiplexing Requests
  • Header Compression
  • Data Encoding
  • Service Contract
  • Protobuf vs JSON
  • Proto-file Definition
  • Efficient Transport
  • Efficient Data Encoding
  • Strongly Defined Calls
  • Backend Service Communication
  • Public APIs Simplicity
Feed/

Let's break down how DryPC is different from a regular HTTP API. First, one thing needs to be clear. DryPC does not replace HTTP-A. In fact, DryPC typically runs on top of HTTP. So to understand why DryPC is useful, we first need to understand what HTTP-A 2 gives us. Imagine the back end of an Uber-style ride app. A rider taps Request a Ride. That one action might cause the trip service to call the driver service for nearby cars, the pricing service for a fare, the location service for updates, and the notification service to contact a driver. One user action can easily turn into many internal service-to-service calls. And at scale, these services might communicate thousands of times every second. Now imagine doing this with HTTP 1. One does not multiplex many requests over one connection efficiently. So applications usually need multiple connections to handle lots of requests in parallel. More connections mean more overhead, especially when new TTP and TLS connections need to be established. And requests on the same connection can also end up waiting behind each other. HTTP A2 improves this dramatically. Instead of opening many connections, two services can keep one connection open and send many requests through it at the same time. Each request gets its own stream inside that connection. HTTP A2 also compresses headers. So instead of repeatedly sending large headers containing things like authentication, tracing information and metadata, repeated values can be represented much more efficiently. Now, DryPC builds on top of that and adds a few important things. First, how the data is encoded. A typical REST API often sends JSON. JSON is great because humans can easily read it, but it contains field names and text representations that add extra bytes. JARPC commonly uses protocol buffers, or protobuf. Protobuf is a compact binary format designed for machines. That usually means smaller messages and faster serialization and deserialization. And when services exchange huge numbers of messages, that difference can matter. The second major difference is the contract. With a traditional API, you might describe your endpoints using documentation or something like OpenAPI. With DryPC, you define the service in a proto-file. For example, you could define a driver service with a method called findNearbyDrivers. You give it the rider's location and it returns nearby drivers. That proto-file becomes the contract between both services. And from it, DryPC can generate client and server code in multiple programming languages. So from the trip service, calling another service can look almost like this. Find nearby driver's location. It looks like a normal function call, but behind the scenes, DrivePC serializes the request, sends it across the network, waits for the remote service, and returns the response. That's what RPC means, remote procedure call. So where does DrivePC make sense? It's especially useful for communication between backend services where performance, strong contracts, streaming, and multiple programming languages matter. For public browser-facing APIs, regular HTTPIs are usually simpler. Browsers don't support native dryPC directly, although technologies like dryPC web can bridge that gap. So the main idea is HTTP 2 gives you efficient transport, Protobuf gives you efficient data encoding, and dryPC gives you a strongly defined way for services to call each other.

"Let's break down how DryPC is different from a regular HTTP API."

👍
0
0 comments0 shares

Sign in to view and post comments.