You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by Joe Stein <jo...@medialets.com> on 2010/10/07 06:09:11 UTC

Python TJSONProtocol ??? 0.2.0

Hi, is there a Python implementation of the TJSONProtocol for 2.0 or in
other version that i can use for 2.0 (compiling it in)?

Also, something in Python like the TIOStreamTransport or
TSimpleFileTransport?

Assuming there isn't I am debating in my own head if it is going to be
faster to

1) write some c++ client with TSimpleFileTransport get the JSON (or in java
with the TIOStreamTransport) and turn it into binary and send it over socket
to a Python server so i can parse our data in Python (since we have it in
JSON and already working c++ & java implementations).

or

2) Implement the TJSONProtocol and some type of TSomethingFileTransport in
Python

#2 is much more appealing (perhaps a solution already exists??) but not sure
where to start to-do this... is there some code to look at i can use to
modify into this? would be happy to contribute it back once I am done if it
comes to that.

Thanks!

/*
Joe Stein, 973-944-0094
http://www.medialets.com
Twitter: @allthingshadoop
*/

Re: Python TJSONProtocol ??? 0.2.0

Posted by Joe Stein <jo...@medialets.com>.
awesome, TFileObjectTransport works fine.... i guess i just have to build a
quick app to take our JSON data and turn it into binary, save that file and
read it in through TFileObjectTransport

Thanks!


On Thu, Oct 7, 2010 at 12:27 AM, David Reiss <dr...@facebook.com> wrote:

> There's a TFileObjectTransport in TTransport.py.  There's no Python version
> of TJSONProtocol in Python, though.
>
> On 10/06/2010 09:09 PM, Joe Stein wrote:
> > Hi, is there a Python implementation of the TJSONProtocol for 2.0 or in
> > other version that i can use for 2.0 (compiling it in)?
> >
> > Also, something in Python like the TIOStreamTransport or
> > TSimpleFileTransport?
> >
> > Assuming there isn't I am debating in my own head if it is going to be
> > faster to
> >
> > 1) write some c++ client with TSimpleFileTransport get the JSON (or in
> java
> > with the TIOStreamTransport) and turn it into binary and send it over
> socket
> > to a Python server so i can parse our data in Python (since we have it in
> > JSON and already working c++ & java implementations).
> >
> > or
> >
> > 2) Implement the TJSONProtocol and some type of TSomethingFileTransport
> in
> > Python
> >
> > #2 is much more appealing (perhaps a solution already exists??) but not
> sure
> > where to start to-do this... is there some code to look at i can use to
> > modify into this? would be happy to contribute it back once I am done if
> it
> > comes to that.
> >
> > Thanks!
> >
> > /*
> > Joe Stein, 973-944-0094
> > http://www.medialets.com
> > Twitter: @allthingshadoop
> > */
> >
>



-- 
/*
Joe Stein, 973-944-0094
http://www.medialets.com
Twitter: @allthingshadoop
*/

Re: Python TJSONProtocol ??? 0.2.0

Posted by David Reiss <dr...@facebook.com>.
There's a TFileObjectTransport in TTransport.py.  There's no Python version of TJSONProtocol in Python, though.

On 10/06/2010 09:09 PM, Joe Stein wrote:
> Hi, is there a Python implementation of the TJSONProtocol for 2.0 or in
> other version that i can use for 2.0 (compiling it in)?
> 
> Also, something in Python like the TIOStreamTransport or
> TSimpleFileTransport?
> 
> Assuming there isn't I am debating in my own head if it is going to be
> faster to
> 
> 1) write some c++ client with TSimpleFileTransport get the JSON (or in java
> with the TIOStreamTransport) and turn it into binary and send it over socket
> to a Python server so i can parse our data in Python (since we have it in
> JSON and already working c++ & java implementations).
> 
> or
> 
> 2) Implement the TJSONProtocol and some type of TSomethingFileTransport in
> Python
> 
> #2 is much more appealing (perhaps a solution already exists??) but not sure
> where to start to-do this... is there some code to look at i can use to
> modify into this? would be happy to contribute it back once I am done if it
> comes to that.
> 
> Thanks!
> 
> /*
> Joe Stein, 973-944-0094
> http://www.medialets.com
> Twitter: @allthingshadoop
> */
>