You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by Tarun Goyal <jo...@gmail.com> on 2012/08/25 07:14:53 UTC

Need Guidance

Hi All,

I am planning to use thrift as a communication protocol between java client
and cpp server.
Please guide me what transport,threading and protocol will be best suited
for my requirement.

I need huge data transfer and also no of users are unlimited so please help
me.


Thanks,
Tarun
+918095634804

Re: Need Guidance

Posted by fuyou <fu...@gmail.com>.
@Moreno
*             *how to use  one-thread-per-use in Thrift Server.would you
give some document about it ?
 Thanks.
*     *

2012/8/25 Juan Moreno <jw...@gmail.com>

> I am going to take a quick stab at this.
>
> Firstly the server: since you are serving a vast amount of users, I would
> advice the use of the one-thread-per-user model. This would require that
> your server be able to handle lots of threads.
>
> From the thrift definition file, take advantage of using async methods
> wherever possible. This allows non-blocking service calls.
>
> Since C++ and Java are fully featured languages, I suggest that you use the
> TBinary protocol, for it is more efficient than the JSON ones.
>
> If network traffic is a concern, you may also get around with compressing
> the Output Streams too. You may have to implement a Custom Client to
> de-compress it though. Just a suggestion.
>
>
> Hope that helps.
> On Aug 25, 2012 1:15 AM, "Tarun Goyal" <jo...@gmail.com> wrote:
>
> > Hi All,
> >
> > I am planning to use thrift as a communication protocol between java
> client
> > and cpp server.
> > Please guide me what transport,threading and protocol will be best suited
> > for my requirement.
> >
> > I need huge data transfer and also no of users are unlimited so please
> help
> > me.
> >
> >
> > Thanks,
> > Tarun
> > +918095634804
> >
>



-- 
   =============================================

  fuyou001
Best Regards

Re: Need Guidance

Posted by Juan Moreno <jw...@gmail.com>.
I am going to take a quick stab at this.

Firstly the server: since you are serving a vast amount of users, I would
advice the use of the one-thread-per-user model. This would require that
your server be able to handle lots of threads.

>From the thrift definition file, take advantage of using async methods
wherever possible. This allows non-blocking service calls.

Since C++ and Java are fully featured languages, I suggest that you use the
TBinary protocol, for it is more efficient than the JSON ones.

If network traffic is a concern, you may also get around with compressing
the Output Streams too. You may have to implement a Custom Client to
de-compress it though. Just a suggestion.


Hope that helps.
On Aug 25, 2012 1:15 AM, "Tarun Goyal" <jo...@gmail.com> wrote:

> Hi All,
>
> I am planning to use thrift as a communication protocol between java client
> and cpp server.
> Please guide me what transport,threading and protocol will be best suited
> for my requirement.
>
> I need huge data transfer and also no of users are unlimited so please help
> me.
>
>
> Thanks,
> Tarun
> +918095634804
>