thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vikas prasad <vikasmc...@gmail.com>
Subject Re: Visual Studio with C++ client Thrift
Date Sun, 02 Feb 2014 15:53:35 GMT
Hi Randy,

Hope you are doing good !!
Thanks for detailed answer. I will definitely try out with COM & Thrift App
simultaneously and compare.


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 :www.vikasgomia.blogspot.com




On Sun, Feb 2, 2014 at 8:59 PM, Randy Abernethy
<randy.abernethy@gmail.com>wrote:

> 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
> IUnknown).
> 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,
> feature
> rich, and some would say, complex platform.
>
> Apache Thrift (circa 2007) is a lightweight cross language remote procedure
> call
> platform. There are no middle ware components necessary and clients
> interact
> directly with servers. Thrift offers no built in discovery, security, state
> or
> transaction support.
>
> Like DCOM, Apache Thrift supplies an IDL to describe interfaces. IMHO,
> Thrift
> IDL has two key features not present in DCOM IDL:
>
> 1. Interfaces can evolve without hard coded versions and without breaking
> compatibility
> 2. Collections like set/list/map are first class citizens
>
> Thrift has a single compiler which will emit code for many languages from
> this
> IDL (unlike midl which is C/C++ oriented). With Thrift you generate the
> client/server
> stubs and you are ready to go. With DCOM you need to do a fair amount of
> work
> to wire things up, particularly when using non core MS languages/platforms.
> The
> DCOM middleware layer is required for DCOM to operate in most settings.
>
> Both platforms need to marshal (serialize) types to a wire format. Thrift
> however
> offers a plug in platform allowing Binary, Compact, JSON and custom
> serialization
> engines to be used and interchanged easily.
>
> COM provides an extensive embedding framework, Thrift supplies no such
> feature
> 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
> Thrift
> 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.
> Thrift
> 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
> of
> 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
> connection
> 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
> TCP
> connection and then are ready to run. Here again because Thrift does not
> provide
> all of the middle ware features present in DCOM there is really no startup
> overhead.
>
> 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
> DCOM.
>
> I built a large Windows DNA system with DCOM in the late 90s. It was a
> great
> platform for the times. However, I think the CAP theorem, massive scaling
> needs
> and modern deployment sensibilities make platforms like DCOM too
> restrictive
> for many modern application architectures.
>
> Just my 2 cents, hope this helps,
> Randy
>
>
>
> On Sun, Feb 2, 2014 at 2:13 AM, vikas prasad <vikasmca05@gmail.com> 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 :www.vikasgomia.blogspot.com
> >
> >
> >
> >
> > On Mon, Jan 27, 2014 at 11:48 PM, Jake Farrell <jfarrell@apache.org>
> > wrote:
> >
> > > The install guide is available at:
> > > http://thrift.apache.org/docs/install/windows/
> > >
> > > 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 <jensgeyer@hotmail.com>
> > 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: user@thrift.apache.org
> > > > 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 :www.vikasgomia.blogspot.com
> > > >
> > >
> >
>

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