[ https://issues.apache.org/jira/browse/PHOENIX-971?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14236536#comment-14236536 ]
Nick Dimiduk commented on PHOENIX-971: -------------------------------------- I've been thinking a bit about this lately. I think we cannot get away from a "gateway" style of deployment model for such a server, same as we have in HBase for REST and Thrift. I looked in on our friends over at Cassandra and I see that they're doing the same; clients are "thin", unaware of cluster topology... they send request to any participating cluster member, which acts as a gateway for the requests on their behalf. I also poked around the [MySQL wire protocol|http://dev.mysql.com/doc/internals/en/overview.html]. It's not too complex, but I think we would have to implemented from scratch. I also had a look at HiveServer2. It defines a simple Thrift service interface (quite similar endpoints to MySQL's, actually). The implementation of HS2 isn't extensible at the moment, though there's an oldish [design doc|https://cwiki.apache.org/confluence/display/Hive/AccessServer+Design+Proposal] that talks about making it extensible. After getting a feel for it's implementation, I had a go at [hacking up|https://github.com/ndimiduk/hive/tree/HS2-Phoenix-hack] HS2 to expose Phoenix queries. See the commit message for instructions; it basically works. I thought I could prove end-to-end from Python (not Jython) with this, but apparently the [python connector|https://cwiki.apache.org/confluence/display/Hive/Setting+Up+HiveServer2#SettingUpHiveServer2-PythonClientDriver] doesn't support authMechanism='NONE' and I haven't worked out how to enable some kind of authentication from my sandbox deploy. In theory, we can implement the HS2 thrift interface and open Phoenix up to the world of Hive connectivity, which includes an ODBC driver. This appears to be what the [Spark folks did|https://github.com/apache/spark/tree/master/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver] with Spark-SQL. I think it'll give us a nice bang-for-the-buck, considering the implementation complexity. None of this is wiring Phoenix into Hive metastore or HCat or any of that stuff. For such connectivity we'll still need [~nicomaillard]'s work on PHOENIX-92. > Query server > ------------ > > Key: PHOENIX-971 > URL: https://issues.apache.org/jira/browse/PHOENIX-971 > Project: Phoenix > Issue Type: New Feature > Reporter: Andrew Purtell > > Host the JDBC driver in a query server process that can be deployed as a > middle tier between lighter weight clients and Phoenix+HBase. This would > serve a similar optional role in Phoenix deployments as the > [HiveServer2|https://cwiki.apache.org/confluence/display/Hive/Setting+Up+HiveServer2] > does in Hive deploys. -- This message was sent by Atlassian JIRA (v6.3.4#6332)