You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by Torsten Curdt <tc...@apache.org> on 2008/10/06 10:42:03 UTC

transport interface

Also wondering...

The TTransport exists in order to have full control over the  
interface? It so closely resembles the java stream interfaces which is  
why I am asking.

Any particular reason that input and output are combined?

cheers
--
Torsten

Re: transport interface

Posted by Torsten Curdt <tc...@apache.org>.
On Oct 9, 2008, at 00:35, Mark Slee wrote:

> Yes, the TTransport interface is provided to have consistency across
> languages about exactly what data transport in Thrift means.  
> Generally,
> yes, it looks very similar to InputStream/OutputStream, and
> InputStream/OutputStream can be trivially wrapped into a TTransport.
>
> We didn't think of it as "combining" input/output. Rather we thought  
> of
> it as *not* splitting them, since the most common TTransport is a TCP
> socket (and the interface follows the C interface). TTransports can be
> used for read-only/write-only, but it just seemed cleaner to design  
> for
> the common case of using one transport for both input and output, and
> not maintaining separate getInput()/getOutput() methods/variables.

I guess this came up for me mainly because I am more interested in the  
serialization than the RPC facilities. And from that perspective the  
combined input/output is not really as common as you describe. But as  
Thrift is coming from the RPC corner I guess this explains it. Alright.

Thanks
--
Torsten


RE: transport interface

Posted by Mark Slee <ms...@facebook.com>.
Yes, the TTransport interface is provided to have consistency across
languages about exactly what data transport in Thrift means. Generally,
yes, it looks very similar to InputStream/OutputStream, and
InputStream/OutputStream can be trivially wrapped into a TTransport.

We didn't think of it as "combining" input/output. Rather we thought of
it as *not* splitting them, since the most common TTransport is a TCP
socket (and the interface follows the C interface). TTransports can be
used for read-only/write-only, but it just seemed cleaner to design for
the common case of using one transport for both input and output, and
not maintaining separate getInput()/getOutput() methods/variables.

-----Original Message-----
From: Torsten Curdt [mailto:tcurdt@apache.org] 
Sent: Monday, October 06, 2008 1:42 AM
To: thrift-dev@incubator.apache.org
Subject: transport interface

Also wondering...

The TTransport exists in order to have full control over the interface?
It so closely resembles the java stream interfaces which is why I am
asking.

Any particular reason that input and output are combined?

cheers
--
Torsten