You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by Yordan Pavlov <y....@gmail.com> on 2009/04/28 14:31:23 UTC

question about using one transport in both directions

Hello,
the intuitive way of offering a service seems to be to create a
server. For instance TNonblockingServer takes port number in its
constructor. What I want to achieve is establish a tcp connection and
use it for services offered by both parties in the communication. What
I have is a plugin based architecture, I want the main application to
open a listener and allow connections (some sort of authentication
should also take place). The main application should then offer some
service at this listener as well as being able to use services offered
by the other side when they connect to the the main application.

What seems to be the "good practice" to do this inThrift. I hope I
have managed to illustrate my question, if need is I will clarify
further. Thanks for your time!

Re: question about using one transport in both directions

Posted by Ted Dunning <te...@gmail.com>.
Hear, hear.

I would second this point.  It isn't like there is all that much to document
(at the first level).

>From the user's point of view, using thrift is remarkably easy and clean.
Getting to that point of enlightenment, however, is not easy.

On Mon, May 4, 2009 at 3:51 AM, Yordan Pavlov <y....@gmail.com> wrote:

> However I want to stress everyone's attention on the fact that
> Thrift's documentation is hard to access and not well structured.
>



-- 
Ted Dunning, CTO
DeepDyve

Re: question about using one transport in both directions

Posted by Jeff Hammerbacher <ha...@cloudera.com>.
Hey Yordan,

1) Check out http://thrift.markmail.org to search the thrift mailing lists.
2) It seems like http://wiki.apache.org/thrift/LibraryFeatures is a start
for what you're looking to see on the wiki. Given that it is a wiki, you
could help fill out the documentation with a skeleton of what you're
requesting, perhaps filling in some of it yourself.

Later,
Jeff

On Mon, May 4, 2009 at 3:51 AM, Yordan Pavlov <y....@gmail.com> wrote:

> Thanks for the help. The thirft community seems to be pretty helpful.
> However I want to stress everyone's attention on the fact that
> Thrift's documentation is hard to access and not well structured. As
> new users come around the mailing lists will get bloated with the same
> basic questions which everyone would have. I am not pretty sure what
> the hierarchy in the community is and who should initiate such an
> activity but I believe that the following should be done:
>
> 1) The mailing list archive should be searchable. Starting a forum
> might be even a better idea since it can structure the topics in
> sections.
> 2) The different libraries, their pros and cons and their api should
> be described in the wiki. I think the wiki format is best for this
> purpose so that the community can easily edit errors and improvements
> as they appear.
>
> On Tue, Apr 28, 2009 at 9:29 PM, Joel Meyer <jo...@gmail.com> wrote:
> >
> > There was a thread called "Using thrift as part of a game network
> protocol"
> > that dealt with a similar issue:
> >
> > Thread start (in March):
> >
> http://mail-archives.apache.org/mod_mbox/incubator-thrift-user/200903.mbox/%3cfba570180903222254u61876853o7daed3fee53f8db@mail.gmail.com%3e
> >
> > Thread continue (in April):
> >
> http://mail-archives.apache.org/mod_mbox/incubator-thrift-user/200904.mbox/%3c5e50457d0904021617x2056785dq1b7ed074e3919bf0@mail.gmail.com%3e
> >
> > In short (and it's nowhere near being a 'best practice') you could
> achieve
> > this using all 'oneway void' messages if you're willing to move the
> blocking
> > from the protocol layer into your application layer (or design your app
> to
> > use async calls).
> >
> > Hope that helps,
> > Joel
> >
>

Re: question about using one transport in both directions

Posted by Yordan Pavlov <y....@gmail.com>.
Thanks for the help. The thirft community seems to be pretty helpful.
However I want to stress everyone's attention on the fact that
Thrift's documentation is hard to access and not well structured. As
new users come around the mailing lists will get bloated with the same
basic questions which everyone would have. I am not pretty sure what
the hierarchy in the community is and who should initiate such an
activity but I believe that the following should be done:

1) The mailing list archive should be searchable. Starting a forum
might be even a better idea since it can structure the topics in
sections.
2) The different libraries, their pros and cons and their api should
be described in the wiki. I think the wiki format is best for this
purpose so that the community can easily edit errors and improvements
as they appear.

On Tue, Apr 28, 2009 at 9:29 PM, Joel Meyer <jo...@gmail.com> wrote:
>
> There was a thread called "Using thrift as part of a game network protocol"
> that dealt with a similar issue:
>
> Thread start (in March):
> http://mail-archives.apache.org/mod_mbox/incubator-thrift-user/200903.mbox/%3cfba570180903222254u61876853o7daed3fee53f8db@mail.gmail.com%3e
>
> Thread continue (in April):
> http://mail-archives.apache.org/mod_mbox/incubator-thrift-user/200904.mbox/%3c5e50457d0904021617x2056785dq1b7ed074e3919bf0@mail.gmail.com%3e
>
> In short (and it's nowhere near being a 'best practice') you could achieve
> this using all 'oneway void' messages if you're willing to move the blocking
> from the protocol layer into your application layer (or design your app to
> use async calls).
>
> Hope that helps,
> Joel
>

Re: question about using one transport in both directions

Posted by Joel Meyer <jo...@gmail.com>.
On Tue, Apr 28, 2009 at 5:31 AM, Yordan Pavlov <y....@gmail.com> wrote:

> Hello,
> the intuitive way of offering a service seems to be to create a
> server. For instance TNonblockingServer takes port number in its
> constructor. What I want to achieve is establish a tcp connection and
> use it for services offered by both parties in the communication. What
> I have is a plugin based architecture, I want the main application to
> open a listener and allow connections (some sort of authentication
> should also take place). The main application should then offer some
> service at this listener as well as being able to use services offered
> by the other side when they connect to the the main application.
>
> What seems to be the "good practice" to do this inThrift. I hope I
> have managed to illustrate my question, if need is I will clarify
> further. Thanks for your time!
>

There was a thread called "Using thrift as part of a game network protocol"
that dealt with a similar issue:

Thread start (in March):
http://mail-archives.apache.org/mod_mbox/incubator-thrift-user/200903.mbox/%3cfba570180903222254u61876853o7daed3fee53f8db@mail.gmail.com%3e

Thread continue (in April):
http://mail-archives.apache.org/mod_mbox/incubator-thrift-user/200904.mbox/%3c5e50457d0904021617x2056785dq1b7ed074e3919bf0@mail.gmail.com%3e

In short (and it's nowhere near being a 'best practice') you could achieve
this using all 'oneway void' messages if you're willing to move the blocking
from the protocol layer into your application layer (or design your app to
use async calls).

Hope that helps,
Joel