Giter Site home page Giter Site logo

yonglehou / sql-layer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aydinsakar/sql-layer

0.0 2.0 0.0 123.4 MB

SQL on FoundationDB

Home Page: https://foundationdb.com/layers/sql

License: GNU Affero General Public License v3.0

Shell 0.37% Makefile 0.01% Inno Setup 0.06% HTML 0.01% Java 99.20% Protocol Buffer 0.31% Python 0.02% JavaScript 0.03% Groff 0.01% PLpgSQL 0.01%

sql-layer's Introduction

Welcome to the FoundationDB SQL Layer

IMPORTANT NOTICE: This repository is undergoing significant changes and is not ready for your use.

The FoundationDB SQL Layer is being transitioned for use exclusivley with the FoundationDB storage substrate. The codebase currently uses a local btree by default and is used only for experimental purposes. If you'd like to be informed once the Layer is ready for primetime, please watch this repo, or sign up at https://foundationdb.com/layers/sql.

1. Overview

The FoundationDB SQL layer is a full SQL implementation that builds upon FoundationDB’s storage substrate core properties. It provides the same high performance, multi-node scalability, fault-tolerance, and true multi-key ACID transactions, alongside higher level capabilities that include direct object access and a sophisticated SQL environment. It was written from the ground up in Java and utilizes the FoundationDB SQL Parser.

2. Prerequisites

The FoundationDB SQL Layer requires Java 7 Runtime Environment, a postgreSQL client, and FoundationDB.

Java

The FoundationDB SQL Layer requires the Java 7 Runtime Environment (JRE). Both OpenJDK and the Oracle JDK are supported but for production deployments, we recommend installing Oracle's JDK. Oracle Java can be downloaded from Oracle's website - http://java.com/en/download/manual.jsp?locale=en

PostgreSQL Client

The psql command line utility for PostgreSQL is used for connecting to the FoundationDB SQL Layer beacause the layer natively speaks the PostgreSQL protocol.

On CentOS use the official PostgreSQL yum repositories::

rpm -ivh http://yum.pgrpms.org/8.1/redhat/rhel-5-x86_64/postgresql-libs-8.1.23-1PGDG.rhel5.x86_64.rpm rpm -ivh http://yum.pgrpms.org/8.1/redhat/rhel-5-x86_64/postgresql-8.1.23-1PGDG.rhel5.x86_64.rpm

On ubuntu simply type:

sudo apt-get install postgresql-client

As of version 10.7, Mac OS X Ships with the required drivers and command line utility, so no action is required. Clients for earlier version of OS X (Lion and Snow Leopard 64bit only) should download and install the PostgreSQL_Client-9.1.4-1.dmg file.

For windows use the psql client that comes bundled with the PostgreSQL installer

FoundationDB

To install the FoundationDB Storage substrate please follow the directions in the docs, and verify that the FoundationDB cluster is up and running (see 'Testing your FoundationDB installation' sections in the differnet getting started guides). Please make sure the FoundationDB cluster is running before moving any further.

3. Building FoundationDB SQL Layer From Source

Use Maven to build the project:

$ mvn package

All unit and integration tests will be run by default, which could be lengthy. Test execution can be avoided with the skipTests option:

$ mvn package -DskipTests=true

An executable jar, and required dependencies, will be the target/ directory once packaging is complete.

The server can then be started with the fdbsqllayer script. The -f flag will run it in the foreground:

$ ./bin/fdbsqllayer -f

A handful of informational messages will print and then the server will state it is ready:

2013-03-22 15:36:29,561 [main] INFO  ServiceManager - FoundationDB SQL Layer x.y.z.rev ready.

4. Alternatively, Install the SQL Layer From Packages

Packages for Debian/Ubuntu and Centos/RedHat will be avaliable shortly on https://foundationdb.com/layers/sql.

Using them on Ubuntu can be done as follows (replace x.y.z with appropriate version):

$ sudo dpkg -i fdb-sql-layer_x.y.z_all.deb \ 
fdb-sql-layer_x.y.z_all.deb

Similarly on CentOS:

$ sudo rpm -Uvh fdb-sql-layer-x.y.z-r.noarch.rpm \
fdb-sql-layer-x.y.z-r.noarch.rpm

Windows and Mac OSX installers will also be avaliable at https://foundationdb.com/layers/sql.

By default a single instance of the FoundationDB SQL Layer is installed, appropriate for a development workstation. Consult the documentation for recommended multi node configurations.

5. Testing your SQL Layer installation

The SQL Layer can then be accessed through a RESTful API on port 8091:

$ curl http://localhost:8091/v1/version
[
{"server_name":"FoundationDB SQL Layer","server_version":"x.y.z.rev"}
]

And the Postgres protocol on port 15432:

$ psql "host=localhost port=15432" -c 'SELECT * FROM information_schema.server_instance_summary'
  server_name           | server_version
------------------------+-----------------
 FoundationDB SQL Layer | x.y.z.rev
(1 row)

More Information

For more information, visit our community site at http://community.foundationdb.com or hop on the #foundationdb IRC channel on irc.freenode.net

sql-layer's People

Contributors

mmcm avatar nathanlws avatar akiban-build avatar yshavit avatar posulliv avatar fdb-build avatar tjoneslo avatar oriherrnstadt avatar

Watchers

James Cloos avatar  avatar

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.