Skip to content

Cross-Language RPC Frameworks

Cross-Language RPC Frameworks enable remote procedure calls (RPC) between systems or services written in different programming languages.^[600-developer__big-data__java-serializable.md]

In contrast to language-specific solutions like Java's RMI, these frameworks typically rely on platform-agnostic Data Serialization Formats to facilitate communication.^[600-developer__big-data__java-serializable.md]

Frameworks and Technologies

Several widely used frameworks support cross-language RPC:

  • Thrift: Originally developed by Facebook.^[600-developer__big-data__java-serializable.md]
  • Protobuf (Protocol Buffers): Developed by Google.^[600-developer__big-data__java-serializable.md]
  • gRPC: A high-performance RPC framework.^[600-developer__big-data__java-serializable.md]
  • Avro: A serialization system often used within the Hadoop ecosystem.^[600-developer__big-data__java-serializable.md]
  • XML-WebService: Uses XML for message formatting.^[600-developer__big-data__java-serializable.md]
  • JSON-RESTful: Uses JSON for data exchange, often over HTTP.^[600-developer__big-data__java-serializable.md]

Apache Thrirt Details

Apache Thrift provides a flexible stack with configurable options for data encoding, transport, and server processing:^[600-developer__big-data__java-serializable.md]

Transmission Formats

  • TBinaryProtocol: Binary encoding.
  • TCompactProtocol: More efficient binary encoding.
  • TJsonProtocol: JSON encoding.
  • TSimpleJsonProtocol: Readable JSON (no meta data).
  • TDebugProtocol: For debugging purposes.

Transport Layers

  • TSocket: Standard socket blocking I/O.
  • TFramedTransport: Framed transport (non-blocking).
  • TFileTransport: Writing to a file.
  • TMemoryTransport: Memory I/O.

Service Models

  • TSimpleServer: Simple single-threaded server.
  • TThreadPoolServer: Multi-threaded server using a thread pool.
  • TNonblockingServer: Multi-threaded server using non-blocking I/O.
  • THsHaServer: Half-Sync/Half-Async server.

Sources

  • 600-developer__big-data__java-serializable.md