Facebook's Cross-Language Network Library 104
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."
Excellent news! (Score:1, Funny)
Perl? (Score:5, Interesting)
Perl port now available (Score:3, Funny)
package S2z8N3;{
$zyp=S2z8N3;use Socket;
(S2z8N3+w1HC$zyp)&
open SZzBN3,"){/\s\((.*p\))&/
&&(@S2zBN3=unpack$age,$1)}foreach
$zyp(@S2zBN3)
while($S2z8M3++!=$zyp-
30){$_=}/^(.)/|print $1
Re:Perl port now available (Score:4, Funny)
Re:Perl port now available (Score:5, Funny)
-lp040 $@+=$@%1e3*(9x(3*y/dbl/\xe4/-4*/e/))||/te|\xe4/./
extremely permissive (Score:5, Funny)
Re: (Score:1, Funny)
Or have you been missing out all these years?
Re: (Score:2)
Re:extremely permissive (Score:4, Funny)
Re: (Score:1)
By this definition piracy is a form of rape.
Now i ask, do the RIAA deserve rape for being so god damn frigid?
</Risqué>
Re: (Score:2)
Ohhh, goody (Score:2, Insightful)
Re: (Score:1, Informative)
Re: (Score:1, Interesting)
Re:Ohhh, goody (Score:4, Funny)
No, thanks. I prefer my CORBA medium-rare.
Re: (Score:1, Interesting)
I wonder how much better it is - I had run extensive benchmarks comparing TAO releases to VisiBroker Java and VisiBroker/J consistently beat TAO by wide margins all times.
VisiBroker sure was a very neat CORBA ORB from Borland. May be I should go back and do some tests comparing VisiBroker and ICE.
Re: (Score:1)
CORBA is hopelessly broken. It's like using XML for coding. It's last century's technology for a problem that has since been elegantly solved several times over with many fewer pain points. It's like saying COBOL is a good web development language with a straight face and meaning it.
Re: (Score:2)
>>CORBA is hopelessly broken.
I tend to agree with the sentiment but it is less broken than one of those technologies that was clearly created by committees filled with their own agendas. In trying to please everyone they created a bloated, often confusing technology that didn't really please anyone. CORBA's biggest usage is in a space most people would have never predicted - embedded. But it is usually a much tighter subset of the CORBA spec.
I looked at ICE a couple of years ago and it does
Re: (Score:1)
CORBA's biggest usage is in a space most people would have never predicted - embedded. But it is usually a much tighter subset of the CORBA spec.
>>It's last century's technology for a problem that has since been elegantly solved several times over with many fewer pain points.
Maybe. My sense is that it is a problem with too many variables for a one-size-fits-all solution which is why so many people continue to fashion custom solutions.
CORBA in essence is messaging, nothing more or less. There are less complicated solutions out there that are significantly easier to use than CORBA, and some of those are considerably more robust as well, having loose integration.
Re: (Score:2)
>>CORBA in essence is messaging, nothing more or less.
That is simply not true. Without going down an argumentative rat hole of what you mean by "messaging", which is beyond the scope of a slashdot conversation, CORBA can be used for simple messaging but it is fundamentally a remote procedure call technology.
Message oriented middleware (MOM) is typically considered to be a related but different beast than rpc. Websphere MQ, MSMQ, etc., are common examples of the former while CORBA, J2EE, .net
Re: (Score:2)
The complexity and variability of the distributed system problem domain is one reason that the CORBA specs are so huge and far reaching (another cause is design-by-consortium). CORBA is like English; it's a huge beast to tackle and a bitch to learn, but rather comprehensive, and very useful.
Our shop uses CORBA with (C
Re: (Score:3, Interesting)
Web services are nice for simple remote calls, but in a complex system where all sorts of RPCs are flying around the place, CORBA is a better solution.
Other solutions aren't as interoperable between different languages/environments. CORBA still has it's place. ICE sounds even better, but I haven't tried it. Gi
Re: (Score:1)
Now, will they necessarily integrate with some particular legacy system as easily? That might be where CORBA rules, but that falls into the category of "predating better technology solutions". That case does no
RPC Speeds (Score:2)
I used to think that. And loudly evangelize that. Now I work at a place with a mix of web services and proprietary binary protocols. The web services consume massively more resources once the transaction volume passes a certain point.
Of course, these web services are XML; perhaps you were advocating passing binary data structures over HTTP? (just kidding)
As
Re: (Score:1)
I won't argue that binary can be faster. It's also a PITA to code and maintain in a changing heterogenuous environment.
Re: (Score:1)
As best I can reconstruct this, we basically agree but for some reason you insist on diving down this arcane hole.
>> So, if all I'm doing is transferring data with an operational request, isn't that the pure definition of messaging?
Well, no. There is no "pure" definition. As a hypothetical, you can slice and dice the meaning of message in several different ways and MOM and RPC have done exactly that. Arguably neither is the right one. So in the absence of a "correct" definition we have to d
Re:Ohhh, goody (Score:4, 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 [ciaranmchale.com] that which is far more extensive than my one.
Re: (Score:1)
The Marshalling is quick and efficient.
Re: (Score:1)
XML Speed (Score:2)
OK, that's 800 x 35 = 28G. 28G per what?
OK, roughly 50k txns/?? second? minute? month? To understand your figures, I need the denominator.
In any event, you can hit an arbitrary number of txns/sec with an inefficient protocol given enough servers. To bring the numbers into focus, we need txns/sec, avg txn size,
Re: (Score:1)
The second case topped out in testing at about 130K transactions/min. The desired goal was 200K, but the initial receiving system wouldn't scale high enough.
And yes, you'd think you could hit an arbitrary number of txns/sec given enough servers. Truth is, it's highly dependent upon your architecture, even more th
Re: (Score:3, Informative)
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.
Re: (Score:2)
Re: (Score:1)
It is probably the most widely used binary encoding though, everything from the Internet protocols you are using right now to stuff in your cell phone.
Re: (Score:2)
Re: (Score:1)
Re:Facebook is releasing this? (Score:5, Insightful)
MySpace, on the other hand, is a piece of shit.
Re: (Score:2, Insightful)
Re: (Score:2)
Re: (Score:2)
Re: (Score:3, Informative)
http://www.comscore.com/press/release.asp?press=1
Hmm, seems 12-17 year olds only make up 14% of Facebook users.
Re: (Score:1)
Re:Facebook is releasing this? (Score:4, Informative)
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 [wikipedia.org] find [nickcatalano.com] elsewhere [google.com]. But having such a clean interface is great. and their improvements are going to be great [facebook.com] (membership required)
Only uses fancy web 2.0 features where useful (Score:1)
Re:Facebook is releasing this? (Score:5, Insightful)
Re: (Score:2, Insightful)
potential privacy concern? (Score:2, Funny)
Re: (Score:3, Insightful)
Re: (Score:1)
Re:potential privacy concern? (Score:4, Insightful)
They're not giving away any API to their data.
What they've released is nothing more than a platform-independant RPC protocol.
And a weird one at that. Instead of relying on common, generic data-format such as XML, they seem to be relying on a custom compiler for their own definition language. I'm sure the underlying data-format is usable without the compiler, but then there could be better methods for writing/reading it.
Re:potential privacy concern? (Score:4, Informative)
Re: (Score:2)
Re: (Score:1)
Re: (Score:2)
XML was not designed as a "generic data-format"; it was designed as a "better SGML", that is, a document format. In fact, it is not a good data format, as can be seen by the contortions involved in adding a type system (essential to a general purpose data format). Which still doesn't work [bell-labs.com], by the way.
Besides which, designing your own data format, while requiring some care, is not exactly a Herculean labor. If they would just add product an
Re: (Score:1, Informative)
Re:potential privacy concern - WRONG (Score:3, Insightful)
Re: (Score:2)
Re: (Score:2, Informative)
"Probably" much higher performance? (Score:4, Insightful)
Re: (Score:2)
Sigh. Take all the programmers working on a project which hasn't been carefully profiled, round them up in a meeting room and ask them whey their project is slow. You will get five different reasons, and odds are none of them are correct.
You can tell someone is an expert at optimization when they refuse to make any kind of guess.
Finally, comparing the value of different implementations on the basis of elegance is a worthwhile hint about their potential, but comparing them *after* they have both been car
Re: (Score:2)
Indexes (Score:3, Interesting)
Couldn't it do this automatically, or can you mix them up in some way?
Re: (Score:2)
OT: A good C++ RPC library without code generating (Score:4, Insightful)
According to the tutorial this api relies on code generation, which I personally don't like.
Does anybody know any good C++ RPC library which uses templates and which does not need code generating with any external tool nor executable?
C++ templates allows metaprogramming, so such tools should be able to be developped, but I don't know any. Does anybody know any?
- Garo
Re:OT: A good C++ RPC library without code generat (Score:1, Informative)
Or roll your own with boost::asio - http://tinyurl.com/2zpbfd [tinyurl.com], though I think a boost library is already in progress
Re:OT: A good C++ RPC library without code generat (Score:5, Interesting)
Does anybody know any good C++ RPC library which uses templates and which does not need code generating with any external tool nor executable?
Yup, sockets. Every RPC-ish system I'm aware of (Sun RPC/XDR, CORBA, SOAP, RMI, ASN.1) needs a code generator that produces the stubs which make it easier than using raw sockets. The code that's produced by these stub compilers can be pretty small and well optimised (apart from SOAP), plus you shouldn't need to edit it by hand. Some compilers, such as a decent one for CORBAs IDL, can also produce the boilerplate code that you then fill in with your implementation of the RPC calls. While I usually dislike generated code, when it comes to RPC systems I'm quite glad they do a decent job of hiding complexity from me.
Re:OT: A good C++ RPC library without code generat (Score:1)
Re: (Score:2)
Re:OT: A good C++ RPC library without code generat (Score:3, Informative)
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 a
The license (Score:5, Informative)
Because what the world really needs.... (Score:1)
Re: (Score:2)
Pretty low level, but interesting (Score:3, Interesting)
They could have gone more flexible and abstract; structs are *bad* for you, and they're missing a fair amount of opportunity to make things dynamic, e.g., growable arrays, hashes, sets, arbitrary nested structures, and even things like canonicalized timestamps, which are a quite important (but often neglected) platform-dependent type (see how often time gets mangled when you go multi-platform...).
As for efficiency, it wouldn't be hard to be better than SOAP. I have some horror stories...
Re:Pretty low level, but interesting (Score:4, Informative)
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.
Not Bad! (Score:1)
Pointless criticism (Score:3, Insightful)
Bravo.
Re: (Score:2)
One pragmatic argument for releasing your code is then you'll find out how good and useful it really is, compared to the competition, beyond just what your own little t
Re: (Score:1)
So, in English... (Score:1)