[
https://issues.apache.org/jira/browse/HADOOP-9421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13668707#comment-13668707
]
Luke Lu commented on HADOOP-9421:
---------------------------------
The main problem with mixing SASL exchange with RPC engine is that's
architecturally and semantically unsound:
# Connection header check (version, DiffServ, serializationType) and SASL are
fundamentally session concepts (vs per remote procedure _call_ concept).
Jamming a session concept like SASL into a RPC call (with a fake call id (-33)
to boot) is an ugly hack that puts a square peg in a round hole.
# RPC engine should be constructed based on the IpcSerializationType, which is
now render completely useless. I know there is no plan to support serialization
other than protobuf in the near future but this does show the awkwardness of
having a session setup/exchange depending on the rpc engine implementation
(ProtoBufRpcEngine) details.
# It's not hard to separate the session init/setup (which we'll always use
protobuf) from the actual rpc engine implementation.
bq. How can you fix the bad version response to handle that?
Initially I thought we could just put these errors in the sasl response proto.
On the second thought, it does show a semantic flaw in my original sasl proto
proposal, which would lump connection errors as part of sasl errors. I now
propose that we use RpcSessionProtos which can contain session related fields,
including SASL stuff and all the connection header errors, instead of using
SaslProtos directly. The RpcSessionProtos would allows us to decouple the
session init/setup from the actually rpc engine implementation, so that if we
want to introduce a different rpc engine that supports nonblocking streaming
better, we can.
bq. low level RPC layer is not amenable to unit tests.
SaslRpc{Client,Server} should be unit testable. If SaslRpc* only depends on
RpcSession*, RPC engine can be left untouched.
> Convert SASL to use ProtoBuf and add lengths for non-blocking processing
> ------------------------------------------------------------------------
>
> Key: HADOOP-9421
> URL: https://issues.apache.org/jira/browse/HADOOP-9421
> Project: Hadoop Common
> Issue Type: Sub-task
> Affects Versions: 2.0.3-alpha
> Reporter: Sanjay Radia
> Assignee: Daryn Sharp
> Attachments: HADOOP-9421.patch, HADOOP-9421.patch,
> HADOOP-9421-v2-demo.patch
>
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira