thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Abernethy <>
Subject Re: Visual Studio with C++ client Thrift
Date Sun, 02 Feb 2014 15:29:42 GMT
Hi Vikas,

Some thoughts:

>>  What are the basic differences between COM and Thrift?

As you know, DCOM (Distributed COM circa 1997) is an object oriented RPC
system which essentially implements COM over MSRPC (a flavor of DCE RPC,
circa 1994). In DCOM remote objects are (at least conceptually) created and
maintained through reference counting and garbage collected when no further
interface handles are held to them. Interface discovery is supported (via
Remote objects can be stateful and (in COM+) pooled and reused or included
in distributed transaction using MTS. All in all this is a heavy weight,
rich, and some would say, complex platform.

Apache Thrift (circa 2007) is a lightweight cross language remote procedure
platform. There are no middle ware components necessary and clients
directly with servers. Thrift offers no built in discovery, security, state
transaction support.

Like DCOM, Apache Thrift supplies an IDL to describe interfaces. IMHO,
IDL has two key features not present in DCOM IDL:

1. Interfaces can evolve without hard coded versions and without breaking
2. Collections like set/list/map are first class citizens

Thrift has a single compiler which will emit code for many languages from
IDL (unlike midl which is C/C++ oriented). With Thrift you generate the
stubs and you are ready to go. With DCOM you need to do a fair amount of
to wire things up, particularly when using non core MS languages/platforms.
DCOM middleware layer is required for DCOM to operate in most settings.

Both platforms need to marshal (serialize) types to a wire format. Thrift
offers a plug in platform allowing Binary, Compact, JSON and custom
engines to be used and interchanged easily.

COM provides an extensive embedding framework, Thrift supplies no such
but does include a plug in transport platform that makes it easy to
serialize Thrift
types to Memory, Disk or Network interfaces. Using this facility the core
library supports many transports, including TCP/IP sockets and named pipes
for example.

It is also fair to note that while innovative in its day DCOM is not
receiving a lot
of attention in modern development efforts (MS or otherwise). Thrift runs
on Windows,
OSX, all flavors of Linux, most all *nix, iOS/Android and embedded systems.
supports Java, C++, Python, C#, Go, Delphi, Node.js, JavaScript, Php, Ruby
and many other languages natively.

All in all, DCOM is a technology focused on the Client/Server computing era
the 90s bent on competing with CORBA. Thrift is a technology built for the
SOA/Cloud era.

>>  What are the performance benefits of using thrift vs. COM:
>>  1- Impact on binary size

The Thrift footprint varies by language but I think it is safe to say the
net effect
will be binaries much smaller than those built for DCOM. Particularly if
you include
all of the DLLs and middle ware involved in a communications session.

>>  2- Initialization time

DCOM connections are expensive to setup, one reason why all of the pooling
techniques are used. Most Thrift connections boil down to a TCP connection.
That said if you are gaining benefits from COM+ object pooling and DB
pooling on the server you will have to build those yourself or find them in
other layers
with Thrift. So in the end what you are "initializing" will define the
answer here. On
an apples to apples basis however a Thrift client will make a simple
connection to
a Thrift server much faster than DCOM will in my experience.

>>  3- Impact to boot time

There are no platform registration aspects of Thrift. When you start a
server it
loads and typically begins listening to a TCP/IP port. Clients just make a
connection and then are ready to run. Here again because Thrift does not
all of the middle ware features present in DCOM there is really no startup

The only way to really answer all three of these questions accurately is to
build a
client and server in Thrift with your language on your platform and then
again with

I built a large Windows DNA system with DCOM in the late 90s. It was a
platform for the times. However, I think the CAP theorem, massive scaling
and modern deployment sensibilities make platforms like DCOM too
for many modern application architectures.

Just my 2 cents, hope this helps,

On Sun, Feb 2, 2014 at 2:13 AM, vikas prasad <> wrote:

> Hi,
> I am c++ developer using COM for IPC all through out these days.. currently
> trying to write sample app with thrift..
> What are the basic differences between COM and Thrift?
> What are the performance benefits of using thrift vs. COM:
> 1- Impact on binary size
> 2- Initialization time
> 3- Impact to boot time
> Thanks,
> Vikas| Software Dev Engineer| McAfee Software (India) Pvt. Ltd. | Mobile
> Mobile
> - +91 9 6633 7 6688
> Skype - vikasmca05
> Also available on *Tango*,*Viber* and *WhatsApp*
> website
> On Mon, Jan 27, 2014 at 11:48 PM, Jake Farrell <>
> wrote:
> > The install guide is available at:
> >
> >
> > and there is also the windows README in the source:
> > compiler/cpp/README_Windows.txt
> >
> > -Jake
> >
> >
> > On Mon, Jan 27, 2014 at 1:05 PM, Jens Geyer <>
> wrote:
> >
> > > Vikas,
> > >
> > > the single best recommendation is to have a look at the tutorials. If
> you
> > > have specific questions or need help, you are free to ask here or at
> > > freenode at any time.
> > >
> > > Have fun!
> > > JensG
> > > ________________________________
> > > Von: vikas prasad
> > > Gesendet: 27.01.2014 15:03
> > > An:
> > > Betreff: Visual Studio with C++ client Thrift
> > >
> > > Hi,
> > >
> > > I am new  to Thrift framework
> > > I went through few of the online tutorials to develop c++ thrift client
> > > using c++/
> > > can someone please list down the steps to develop c++ thrift client?
> > >
> > > Thanks,
> > > Vikas| Software Dev Engineer| McAfee Software (India) Pvt. Ltd. |
> Mobile
> > > Mobile
> > > - +91 9 6633 7 6688
> > >
> > > Skype - vikasmca05
> > >
> > > Also available on *Tango*,*Viber* and *WhatsApp*
> > > website
> > >
> >

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message