News for hackers. Stuff that matters.
Re:Apache Thrift Library by alexchamberlain on Thursday October 27, 2011 @03:44AM (#3162022)
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.

Re:Apache Thrift Library by icebraining on Thursday October 27, 2011 @04:56AM (#3162195)
Well, 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 [2]: http://cppcms.sourceforge.net/wikipp/en/page/main [3]: http://www.treefrogframework.org/

Re:Apache Thrift Library by rojabuck on Thursday October 27, 2011 @04:43AM (#3162162)
Not 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?
Re:Apache Thrift Library by azov on Thursday October 27, 2011 @06:24AM (#3162379)
JSON 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).
Re:Apache Thrift Library by alexchamberlain on Thursday October 27, 2011 @05:24AM (#3162261)
I 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.