User Tools

Site Tools


info:cross-language_communication

Cross-Language Communication

Foreign-Function Interfaces

Data/Serialization Formats

Binary Formats

  • Protocol Buffers from Google
    • Now has an RPC implementation, gRPC 1)
      • Doesn't directly support browser, at least not yet; there is at least one REST proxy: https://github.com/gengo/grpc-gateway 2), which supports Swagger
      • Both synchronous and asynchronous APIs
      • RPC methods support streaming data in either direction (in Python, this is exposed to the server as an iterator parameter for streaming from client, and the server can "yield" results to stream to the client)
    • Has a full RPC implementation built-in (unlike Protocol Buffers)
    • Appears to be pleasant to use in the case of simple RPC
    • Documentation looks immature; find documentation on the wiki
    • Possibly more mature than Thrift (which has very similar–but not exactly the same–basic design); it's not entirely clear
    • Not great "general" documentation (looks immature): check the documents on each language, and the wiki.
    • Seems to have an alternative JSON serialization format (in addition to using JSON for schemas)
  • Fudge - schema-free binary encoding
  • BSON (Binary JSON)
  • Hessian "binary web service protocol"
  • MessagePack seems to be gaining some popularity

Text Formats

JSON

JSON

In terms of speed, it seems that JSON can be as fast or faster than Protocol Buffers (probably depending on the language).

HTTP Communication

Other Communication

References / SO Questions

info/cross-language_communication.txt · Last modified: 2016-06-15 15:52 by sam