Code Monkey home page Code Monkey logo

phoenixrestserver's Introduction

PhoenixRESTServer

Introduction

PhoenixRESTServer was introduced to serve as a stop gap for some features not currently supported by the Phoenix Query Server. At this time non Java clients cannot directly interact with the Phoenix Query Server. REST functionality is available in the Phoenix Query Server but functionality is limited (Array type will not work for example). In order to ease the adoption pains for non Java shops PhoenixRESTServer was created to fill these gaps.

Architecture

PhoenixRESTServer is a Java application written with the lightweight microframework Dropwizard. This application accepts REST requests from any client and translates those REST requests into the correlating Phoenix JDBC command. With this approach PhoenixRESTServer is capable of performing any of the supported Phoenix JDBC features from non Java languages. Since the applications are lightweight they can be colocated on your HBase Region Servers. Colocating them on the Region Servers also saves bandwidth since this eliminates the network traffic that would otherwise be required to transfer the larger datasets to the client where client side operations would occur. PhoenixRESTServer could also be deployed behind a HTTP/TCP load balancer to balance requests traffic. Here is a high level (and ugly) deployment architecture. PhoenixRESTServer Deployment Architecture

Configuration

PhoenixRESTServer configuration is done via a single YAML file. All Dropwizard configuration values are valid as well. A sample is present at PhoenixRESTServer.yml for reference. TODO: add more information around configuration and clean up.

Running

git clone https://github.com/jdye64/PhoenixRESTServer.git
cd ./PhoenixRESTServer
mvn clean install package && java -jar ./target/PhoenixRESTServer-1.0-SNAPSHOT.jar server PhoenixRESTServer.yml

Example Clients

Known areas for improvement

  • Documentation about REST API and expected payloads
  • Phoenix error catching a propagation. More elegant error catching and gracefully propagating those errors back to the client.
  • Python client module (@randerzander =) )
  • CURL examples for most common requests
  • Simple query logging to file. This should be easy to achieve with a mixture of standard file logging and splashing in a few statements here and there

phoenixrestserver's People

Contributors

jdye64 avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

kakamessi99

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.