You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by Julian Hyde <jh...@apache.org> on 2014/12/03 21:20:54 UTC

Avatica RPC server

Yes folks, we finally have an RPC server.

People have been asking for a remote JDBC driver for a long while. I
proposed the Avatica architecture almost a year ago [ see
https://raw.githubusercontent.com/julianhyde/share/master/slides/avatica-architecture.png
]
as a blueprint for how a JDBC server could be built that (a) wasn’t tied to
a particular back-end database, (b) wasn’t tied to a particular client
language.

I started on this during the holiday, and finally got it working late last
night. Start a Calcite daemon using org.apache.calcite.avatica.server.Main,
and you can connect to jdbc:avatica:remote:url=http://localhost:8765,
execute the DatabaseMetaData.getCatalogs and getSchemas methods, and get
results.

Calcite implements Avatica’s Meta interface (with defines the basic methods
for connecting, metadata, preparing and executing queries), but other data
engines could do so too. It is simpler to implement Meta interface than
implementing a full JDBC driver. Avatica adds the JDBC wrappers, and now
remoting.

The protocol converts calls to Meta methods into request and response
objects (Java POJOs annotated with Jackson annotations), and converts them
to JSON, and then sends strings over HTTP to Jetty.

The client is lightweight — just calcite-avatica.jar (not even
calcite-core.jar) and jackson.

The server adds calcite-avatica-server.jar and jetty.

It’s very rough, not even checked into master yet, but it would be a good
project for newbies to get involved. Especially since it doesn’t depend on
the rest of Calcite.

https://issues.apache.org/jira/browse/CALCITE-93

https://issues.apache.org/jira/browse/CALCITE-94

https://github.com/julianhyde/incubator-calcite/tree/calcite-93

Julian