Git Product home page Git Product logo

jgit_jdbc's Introduction

com.sap.poc.jgit.storage.jdbc
-----------------------------

This package is a prototypical implementation (proof of concept, thus packaged
in com.sap.poc) of the (not final) org.eclipse.jgit.storage.dht.spi interface.
It binds JGit's generic DHT storage to JDBC.

The code is based on patch set 11 of Shawn Pearce's JGit change "RFC Store Git
on any DHT" (http://egit.eclipse.org/r/2295). Furthermore Shawn's JGit DHT
storage implementations for Apache Cassandra (https://github.com/spearce/jgit_
cassandra) and Apache HBase (https://github.com/spearce/jgit_hbase) have been
used as 'reference implementations'.

This version has been successfully tested on a PostgreSQL database (version
9.0.3-1). As a test repository, JGit itself was pushed and cloned. The current
version works with PostgreSQL only as it uses data type 'BYTEA'.

Here are the steps to try it out:

1. Download and install database software

2. Start database server
      e.g. PostgreSQL:
        initdb -D <...>/data -E UNICODE
        postgres -D <...>/data

3. Create database
      e.g. PostgreSQL:
        createdb <database>

4. Download JDBC driver

5. Copy driver to JRE's lib/ext directory

6. Build jgit-jdbc.jar

7. Create schema
      java -Djdbc.drivers=<fully-qualified-class-names> -jar jgit-jdbc.jar \
        jdbc-create-schema git+jdbc+<vendor>://<host>:<port>/<database>

      e.g. PostgreSQL on localhost:
        java -Djdbc.drivers=org.postgresql.Driver -jar jgit-jdbc.jar \
          jdbc-create-schema git+jdbc+postgresql://localhost:5432/<database>

8. Initialize repository
      java -Djdbc.drivers=<fully-qualified-class-names> -jar jgit-jdbc.jar \
        jdbc-init git+jdbc+<vendor>://<host>:<port>/<database>/<repository>.git

      e.g. PostgreSQL on localhost:
        java -Djdbc.drivers=org.postgresql.Driver -jar jgit-jdbc.jar jdbc-init \
          git+jdbc+postgresql://localhost:5432/<database>/<repository>.git

9. Start JGit daemon (with 800M)
      java -Xmx800m -jar jgit-jdbc.jar jdbc-daemon --enable receive-pack \
        git+jdbc+<vendor>://<host>:<port>/<database>/<repository>.git

      e.g. PostgreSQL on localhost:
        java -Xmx800m -jar jgit-jdbc.jar jdbc-daemon --enable receive-pack \
          git+jdbc+postgresql://localhost:5432/<database>/<repository>.git

10. Push
       git push git://<host>/<repository>.git master

11. Clone
       git clone git://<host>/<repository>.git

jgit_jdbc's People

Contributors

philippthun avatar

Watchers

James Cloos avatar Sam 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.