[ 
https://issues.apache.org/jira/browse/HBASE-794?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12705223#action_12705223
 ] 

Chad Walters commented on HBASE-794:
------------------------------------

>I just wish that compact binary protocols wasn't a late addition. It doesn't 
>give me
>confidence by the late addition of what should have been there from day one.

I think you are assuming a lot of things with this statement. I suggested 
testing both protocols out -- the performance characteristics are different, 
not necessarily monotonically better one way or another. It's not like the 
original Thrift writers didn't consider more compact protocols -- they were 
just optimizing for a particular performance space. At least they had the 
foresight to allow for different protocol implementations (albeit not without 
some restrictions and wrinkles). I suspect that you might not find much 
difference between the two for HBase's needs but I am curious to see what you 
come up with.

>Perhaps you can outline exactly how you can work around lack of NULLs in thrift
>that does not involve exceptions? I think it should not be required to use 
>exceptions
>during non-exceptional events - many systems have lower performance under 
>thrown
>exceptions, and the code path is complex.

Haven't thought about it too deeply and it's late on Friday so here is are some 
extremely off-the-cuff answers:

1. Return a struct that has a two fields -- a required boolean and an optional 
field of the object type. Certainly not ideal but could be used in the 
hopefully limited cases where you really want to be able to return null 
sometimes.

2. Return a flag object somehow outside the range of valid responses that 
indicates null. Not possible in all cases if all values are valid but certainly 
viable in some.

I am sure we could come up with more if need be. That said, and like I said 
before, please go ahead and contribute a "nulllable" type annotation for Thrift.

> Language neutral IPC as a first class component of HBase architecture
> ---------------------------------------------------------------------
>
>                 Key: HBASE-794
>                 URL: https://issues.apache.org/jira/browse/HBASE-794
>             Project: Hadoop HBase
>          Issue Type: New Feature
>          Components: client, ipc, master, regionserver
>            Reporter: Andrew Purtell
>            Assignee: Andrew Purtell
>            Priority: Minor
>
> This issue considers making a language neutral IPC mechanism and wire format 
> a first class component of HBase architecture. Clients could talk to the 
> master and regionserver using this protocol instead of HRPC at their option.
> Options for language neutral IPC include:
> * Thrift: http://incubator.apache.org/thrift/
> * Protocol buffers: http://code.google.com/p/protobuf/
> * XDR: http://en.wikipedia.org/wiki/External_Data_Representation

-- 
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