0

I am currently working on a project that requires many platforms using many programming languages (including js) to communicate with a java server.

Currently the protocol is using thrift to serialize the data on all platforms, but each platform is using it's own transport mechanism to transmit the data to server (where it gets de-serialized).

However in js, since it is lacking the binary-protocol (TBinaryProtocol) this seems impossible.

Is this the case, can't js simply serialize the data (I don't mind if it serializes the data into the json-thrift format) and send it using other methods?

Thanks

1 Answers1

0

Thrift includes js library with TJSONProtocol implementation, and a transport on top of XMLHttpRequest. It should work fine as a client of TServlet+TJSONProtocol server, so you don't even need other means to send data.

Wildfire
  • 6,358
  • 2
  • 34
  • 50
  • I am aware of that , that wasn't the question. The problem is that I don't want to use thrift's RPC or network transport layer, but use my own. I only need thrift to do the serialization for me. – user1515011 Jul 10 '12 at 17:27
  • And still, thrift js library has implementation of protocol, compatible with TJSONProtocol. – Wildfire Jul 11 '12 at 12:51