Slashdot Mirror


Facebook's Cross-Language Network Library

koreth writes "Facebook has released Thrift, a toolkit for making remote method calls. It generates interoperable network code in C++, Java, PHP, Python, and Ruby. Its protocol is much more lightweight (and probably much higher-performance) than SOAP or CORBA. Facebook uses it internally for high-traffic services like search. The license is extremely permissive."

12 of 104 comments (clear)

  1. Re:Ohhh, goody by Gr8Apes · · Score: 1, Informative

    I wish I could say "Who still uses CORBA?", unfortunately, the answer would include me. :( Give me Sun's RMI implementation any day of the week, or even C++ married to JMS. CORBA gives black holes a run for the money.

    --
    The cesspool just got a check and balance.
  2. Re:potential privacy concern? by Anonymous Coward · · Score: 1, Informative

    I think this raises a potential privacy concern. Not only has Facebook released a nice API in a multitude of useful programming/scripting languages, Dude, this *isn't* an API to Facebook's database. It's a stand-alone remote procedure call mechanism (think SOAP or CORBA - you know, like they said in the summary) that happens to be developed by and used by Facebook.

  3. The license by Anonymous+Conrad · · Score: 5, Informative

    Is basically the MIT license with a few tweaks to the first paragraph (e.g. person -> person or organisation), the second paragraph expanded to cover some of the ideas in the middle section of the BSD licence and the third paragraph verbatim (or practically verbatim). Note that it appears equivalent to the MIT license in that there's no non-endorsement clause as you'd find in BSD or Apache 1.1.

  4. Re:potential privacy concern? by Kyle_Katarn-(ISF) · · Score: 4, Informative

    He's not saying THIS is an API, but that they have released one. Which is true; I've dabbled with it a bit myself.

  5. Re:Facebook is releasing this? by NickCatal · · Score: 3, Informative

    I can't agree more! And the creator of Facebook has said multiple times that they are not going to allow custom CSS on profiles or crazy stuff like that. They have also gone a long way with privacy settings (after much outrage in the facebook community)

    As a college student, I love Facebook. I use it to keep up with high school friends, keep in contact with people from the school I transfered from, know the people in my classes so I can throw questions at them if I have one, and since I am bad with names it is a great tool to remember people by!

    The information I have on Facebook you could probably find elsewhere. But having such a clean interface is great. and their improvements are going to be great (membership required)

    --
    -nick
  6. Re:Ohhh, goody by Cthefuture · · Score: 2, Informative

    No kidding.

    XML is a standard for heavyweight text type communication.

    ASN.1 BER encoding is a standard for lightweight binary communication (similar to this Thrift crap except ASN.1 is an ISO standard and used everywhere).

    Any RPC method worth its salt would use one of those.

    --
    The ratio of people to cake is too big
  7. Re:OT: A good C++ RPC library without code generat by Anonymous Coward · · Score: 1, Informative

    Try RCF http://www.codeproject.com/threads/RMI_For_Cpp.asp

    Or roll your own with boost::asio - http://tinyurl.com/2zpbfd, though I think a boost library is already in progress

  8. Re:Ohhh, goody by LizardKing · · Score: 3, Informative

    I've worked with CORBA at my last three jobs, and I've been pretty happy with it. I've used OmniORB, Orbacus, JacORB and MICO - all of which work very well, although the licensing cost of Orbacus puts it out of reach for most of the things I work on. I do have to wrap a lot of the C++ stuff in helper classes though, as the mapping for that language is far too baroque. One of the consultants at IONA has produced an open source CORBA utilities library that which is far more extensive than my one.

  9. Re:Facebook is releasing this? by yabos · · Score: 2, Informative

    That's funny you say that since Facebook's users are not mostly teenage morons.
    http://www.comscore.com/press/release.asp?press=10 19
    Hmm, seems 12-17 year olds only make up 14% of Facebook users.

  10. Re:OT: A good C++ RPC library without code generat by indifferent+children · · Score: 2, Informative
    Does anybody know any good C++ RPC library which uses templates and which does not need code generating with any external tool nor executable?

    Yes, CORBA. You can do DII (Dynamic Interface Invocation) on the client side, and DSI (Dynamic Skeleton Interface) on the server-side. You are never required to use generated code with CORBA. OTOH, the amount of code that you will have to write using DII/DSI is large (not as large as the generated code would be, but large), and usually a PITA. BTW, you can mix and match with a dynamic client talking to a static (generated) server. You can even have some dynamic clients and some static clients using the same server.

    I have been programming CORBA-based systems for eight years, and only one time did DII make a lot of sense (I extended a COS-standard service, and I didn't want to generate/maintain a custom set of stubs for the clients).

    --
    Censorship is telling a man he can't have a steak just because a baby can't chew it. --Mark Twain
  11. Re:Pretty low level, but interesting by FueledByRamen · · Score: 3, Informative

    growable arrays
    On the transport layer? That doesn't make any sense. The endpoint implementations insert into language-standard growable arrays (PHP native indexed arrays, C++ std::vector, et al), as they should.

    hashes
    Easily represented as maps.

    sets
    They have those. Templated type 'set' in the Thrift interface file (just like std::set).

    arbitrary nested structures
    And those. map<string, map<string, set<string> > > is a perfectly valid construct in the Thrift file, and will emit (as you might expect) the same thing using STL data structures in the C++ endpoint, or nested assocative arrays in the PHP endpoint. The same thing applies to non-templated structure nesting as well, and to templating around user defined structures.

    canonicalized timestamps
    There's no good reason to make a separate timestamp class; an int64 is plenty big enough to hold microseconds (or nanoseconds, even) since the epoch.
    --
    Every cloud has a silver lining (except for the mushroom shaped ones, which have a lining of Iridium & Strontium 90)
  12. Re:potential privacy concern? by UltraAyla · · Score: 2, Informative

    Their API requires that a user authorize a site to collect their information. If, after a warning for each site, a user still authorizes it, then that's their own problem