3 ms·
This looks like it could solve a lot of problems. I will look into this in greater detail later; I would like to see whether this can be used as a web service.
by alexchamberlain 15y ago
This looks like it could solve a lot of problems. I will look into this in greater detail later; I would like to see whether this can be used as a web service.
If I can write my web service in C++ and call it in Javascript, that would be amazing.
- rojabuck 15y agoNot to take away from thrift in any way but could you not do this already using any portable serialisation method? Json has c++ and JavaScript (de)serialisation implementations as does XML. Combined with a Rest-ful web service api surely it doesn't matter what the transport mechanism is?
- alexchamberlain 15y agoI guess their focus was on speed. XML is pretty slow and verbose, and whilst JSON is better, it's not the best solution. MongoDB's BSON is quite cool though. Web Services and the associated HTTP headers are relatively slow, but browsers can make them, so are kind of necessary.
- azov 15y agoJSON does not work well for binary data. BJSON tries to fix this, but in languages like C++ you will still have to deal with clumsy parser syntax when you deserialize your stuff. It's much more convenient to have native classes representing protocol objects in your language (protocol compiler generates them for you).
- icebraining 15y agoWell, Thrift is an RPC mechanism; while it can use an HTTP transport, I'd say it makes more sense to use raw TCP streams to call it. If you want to develop a web service in C++, you could check out the available web frameworks, like OKWS[1], CppCMS[2] or TreeFrog[3]. [1]: http://okws.org/doku.php?id=okws http://okws.org/doku.php?id=okws [2]: http://cppcms.sourceforge.net/wikipp/en/page/main http://cppcms.sourceforge.net/wikipp/en/page/main [3]: http://www.treefrogframework.org/ http://www.treefrogframework.org/