[ 
https://issues.apache.org/jira/browse/THRIFT-332?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bryan Duxbury updated THRIFT-332:
---------------------------------

    Attachment: thrift-332-v2.patch

This patch contains the completed and tested pure-Ruby implementation of the 
compact protocol. The spec passes fully.

I also included a few new scripts to be used for testing serialization across 
languages. WriteStruct.java and ReadStruct.java will write a certain struct to 
any file in any protocol based on command line specifications. Likewise 
lib/rb/script/write_struct.rb and lib/rb/script/read_struct.rb do exactly the 
same thing, but in Ruby. Using these tests to verify cross-language protocol 
compatibility indicates that everything is working (though I ran into an issue 
with set and map equality). 

I also wrote up a comparative protocol benchmark to see what kind of 
performance we're getting:

||proto||operation||time for test (sec)||
|binary protocol|write|2.039999|
|accelerated binary protocol|write|0.326499|
|compact protocol|write|1.803780|
|binary protocol|read|2.020129|
|accelerated binary protocol|read|0.604584|
|compact protocol|read|2.620025|

So it looks like, without doing any optimization so far, we're not that much 
slower than the pure Ruby binary protocol, but we have some room to try and 
catch up with the accelerated binary protocol. 

> Compact Protocol in Ruby
> ------------------------
>
>                 Key: THRIFT-332
>                 URL: https://issues.apache.org/jira/browse/THRIFT-332
>             Project: Thrift
>          Issue Type: Sub-task
>          Components: Library (Ruby)
>            Reporter: Bryan Duxbury
>            Assignee: Bryan Duxbury
>            Priority: Trivial
>         Attachments: thrift-332-v2.patch, thrift-332.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to