Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
electricjones committed Aug 21, 2015
2 parents c2a93e9 + 6a44a16 commit f02c99c
Show file tree
Hide file tree
Showing 176 changed files with 27,499 additions and 1,464 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Expand Up @@ -8,3 +8,4 @@
/phpunit.xml.dist export-ignore
/.scrutinizer.yml export-ignore
/tests export-ignore
/docs export-ignore
5 changes: 2 additions & 3 deletions .gitignore
@@ -1,5 +1,4 @@
composer.lock
vendor
build
composer.phar
sandbox
build/
docs/api/cache
22 changes: 21 additions & 1 deletion .travis.yml
Expand Up @@ -5,6 +5,26 @@ php:
- 5.5
- 5.6
- hhvm
- nightly

matrix:
allow_failures:
- php: nightly
env:
- NEO4J_VERSION="2.2.4" GREMLINSERVER_VERSION="3.0.0" ORIENT_VERSION="2.1.0"

before_install:
- sudo apt-get update > /dev/null

install:
# install Oracle JDK8
- sh -c ./CI/jdk8-install.sh
# install gremlin-server
- sh -c ./CI/gremlin-server/install.sh
# install neo4j
- sh -c ./CI/neo4j/install.sh
# install orient
- sh -c ./CI/orient/install.sh

before_script:
- travis_retry composer self-update
Expand All @@ -16,4 +36,4 @@ script:

after_script:
- php vendor/bin/coveralls -v

19 changes: 15 additions & 4 deletions CHANGELOG.md
@@ -1,14 +1,26 @@
# Changelog

All Notable changes to `Spider` will be documented in this file

## v0.3 - NEXT
- Basic Query Builder (without traversals)
- Where filters
- limit and group
- targets and projections
- OrientDB CommandProcessor
- Neo4j CommandProcessor
- Consistent Response Formats
- Implement `Object` and `Collection` classes
- Manager creates Connection from array of properties
- Refactor Drivers to hold configuration internally instead of by array
- Refactor and split CommandBuilder to BaseBuilder, Builder, and Query
- Introduce fixtures, integration tests, and proper stubs.
- Better documentation, both guides and api.

## v0.2.1 - 7-9-2015
- Updated: ConnectionInterface to mimic DriverInterface
- Refactor: Change Driver class naming to follow a convention
- Refactor: Rename QueryInterface to CommandInterface to better describe all commands
-

## v0.2 - 6-28--2015
- Updated: DriverInterface to include full api
- Added: First Party Driver for OrientDB (v2.*) with skipable tests (dependent on database installed)
Expand All @@ -17,10 +29,9 @@ All Notable changes to `Spider` will be documented in this file
- Added: Connection Manager caches and can return already instantiated connection
- Added: Throws `ConnectionNotFoundException` if make()ing a non-existent connection


## v0.1.1 - 4-28-2015
### Added
- Initialized contracts: DriverInterface and ConnectionInterface
- Setup connection manager
- Init Repo
- Initial Tests
- Initial Tests
64 changes: 64 additions & 0 deletions CI/gremlin-server/gremlin-server-spider.yaml
@@ -0,0 +1,64 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

host: localhost
port: 8182
threadPoolWorker: 1
gremlinPool: 8
scriptEvaluationTimeout: 30000
serializedResponseTimeout: 30000
channelizer: org.apache.tinkerpop.gremlin.server.channel.WebSocketChannelizer
graphs: {
graph: conf/tinkergraph-empty.properties ,
graphT: conf/neo4j-empty.properties
}
plugins:
- tinkerpop.neo4j
- tinkerpop.tinkergraph
scriptEngines: {
gremlin-groovy: {
imports: [java.lang.Math],
staticImports: [java.lang.Math.PI],
scripts: [scripts/gremlin-spider-script.groovy]},
nashorn: {
imports: [java.lang.Math],
staticImports: [java.lang.Math.PI]}}
serializers:
- { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0 } # application/vnd.gremlin-v1.0+gryo
- { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0, config: { serializeResultToString: true }} # application/vnd.gremlin-v1.0+gryo-stringd
- { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV1d0 } # application/vnd.gremlin-v1.0+json
- { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0 } # application/json
processors:
- { className: org.apache.tinkerpop.gremlin.server.op.session.SessionOpProcessor, config: { sessionTimeout: 28800000 }}
metrics: {
consoleReporter: {enabled: true, interval: 180000},
csvReporter: {enabled: true, interval: 180000, fileName: /tmp/gremlin-server-metrics.csv},
jmxReporter: {enabled: true},
slf4jReporter: {enabled: true, interval: 180000},
gangliaReporter: {enabled: false, interval: 180000, addressingMode: MULTICAST},
graphiteReporter: {enabled: false, interval: 180000}}
threadPoolBoss: 1
maxInitialLineLength: 4096
maxHeaderSize: 8192
maxChunkSize: 8192
maxContentLength: 65536
maxAccumulationBufferComponents: 1024
resultIterationBatchSize: 64
writeBufferHighWaterMark: 32768
writeBufferHighWaterMark: 65536
ssl: {
enabled: false}
39 changes: 39 additions & 0 deletions CI/gremlin-server/gremlin-spider-script.groovy
@@ -0,0 +1,39 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

// defines a sample LifeCycleHook that prints some output to the Gremlin Server console.
// it is important that the hook be assigned to a variable (in this case "hook").
// the exact name of this variable is unimportant.
hook = [
onStartUp: { ctx ->
ctx.logger.info("Executed once at startup of Gremlin Server.");
},
onShutDown: { ctx ->
ctx.logger.info("Executed once at shutdown of Gremlin Server.")
}
] as LifeCycleHook

// define the default TraversalSource to bind queries to.
t = graphT.traversal()
g = graph.traversal()

// An example of an initialization script that can be configured to run in Gremlin Server.
// Functions defined here will go into global cache and will not be removed from there
// unless there is a reset of the ScriptEngine.
//def addItUp(x, y) { x + y }
22 changes: 22 additions & 0 deletions CI/gremlin-server/install.sh
@@ -0,0 +1,22 @@
#!/bin/bash

# Add environment java vars
export JAVA_HOME=/usr/lib/jvm/java-8-oracle
export JRE_HOME=/usr/lib/jvm/java-8-oracle

# Install gremlin-server
wget --no-check-certificate -O $HOME/apache-gremlin-server-$GREMLINSERVER_VERSION-incubating-bin.zip https://www.apache.org/dist/incubator/tinkerpop/$GREMLINSERVER_VERSION-incubating/apache-gremlin-server-$GREMLINSERVER_VERSION-incubating-bin.zip
unzip $HOME/apache-gremlin-server-$GREMLINSERVER_VERSION-incubating-bin.zip -d $HOME/

# get gremlin-server configuration files
cp ./CI/gremlin-server/gremlin-spider-script.groovy $HOME/apache-gremlin-server-$GREMLINSERVER_VERSION-incubating/scripts/
cp ./CI/gremlin-server/gremlin-server-spider.yaml $HOME/apache-gremlin-server-$GREMLINSERVER_VERSION-incubating/conf/

# get neo4j dependencies
cd $HOME/apache-gremlin-server-$GREMLINSERVER_VERSION-incubating
bin/gremlin-server.sh -i org.apache.tinkerpop neo4j-gremlin $GREMLINSERVER_VERSION-incubating

# Start gremlin-server in the background and wait for it to be available
bin/gremlin-server.sh conf/gremlin-server-spider.yaml > /dev/null 2>&1 &
cd $TRAVIS_BUILD_DIR
sleep 30
15 changes: 15 additions & 0 deletions CI/jdk8-install.sh
@@ -0,0 +1,15 @@
#!/bin/bash

# Get dependencies (for adding repos)
sudo apt-get install -y python-software-properties
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update

# install oracle jdk 8
sudo apt-get install -y oracle-java8-installer
sudo update-alternatives --auto java
sudo update-alternatives --auto javac

# Add to environment
export JAVA_HOME=/usr/lib/jvm/java-8-oracle
export JRE_HOME=/usr/lib/jvm/java-8-oracle
14 changes: 14 additions & 0 deletions CI/neo4j/install.sh
@@ -0,0 +1,14 @@
#!/bin/bash

# Add environment java vars
export JAVA_HOME=/usr/lib/jvm/java-8-oracle
export JRE_HOME=/usr/lib/jvm/java-8-oracle

# install Neo4j locally:
wget -O $HOME/neo4j-community-$NEO4J_VERSION-unix.tar.gz dist.neo4j.org/neo4j-community-$NEO4J_VERSION-unix.tar.gz
tar -xzf $HOME/neo4j-community-$NEO4J_VERSION-unix.tar.gz -C $HOME/
$HOME/neo4j-community-$NEO4J_VERSION/bin/neo4j start
sleep 10

# changing password:
curl -vX POST http://neo4j:neo4j@localhost:7474/user/neo4j/password -d"password=j4oen"
16 changes: 16 additions & 0 deletions CI/orient/install.sh
@@ -0,0 +1,16 @@
#!/bin/bash

# Add environment java vars
export JAVA_HOME=/usr/lib/jvm/java-8-oracle
export JRE_HOME=/usr/lib/jvm/java-8-oracle

# Download orient
wget -O $HOME/orientdb-community-$ORIENT_VERSION.tar.gz wget http://www.orientechnologies.com/download.php?file=orientdb-community-$ORIENT_VERSION.tar.gz
tar -xzf $HOME/orientdb-community-$ORIENT_VERSION.tar.gz -C $HOME/

#update config with correct user/password
sed -i '/<users>/a <user name="root" password="root" resources="*"><\/user>' $HOME/orientdb-community-$ORIENT_VERSION/config/orientdb-server-config.xml

# run and wait for it to init
$HOME/orientdb-community-$ORIENT_VERSION/bin/server.sh > /dev/null 2>&1 &
sleep 15
7 changes: 2 additions & 5 deletions CONTRIBUTING.md
Expand Up @@ -2,7 +2,7 @@

Contributions are **welcome** and will be fully **credited**.

We accept contributions via Pull Requests on [Github](https://github.com/chrismichaels84/Spider-Graph).
We accept contributions via Pull Requests on [Github](https://github.com/spider/spider).

## Pull Requests

Expand All @@ -21,10 +21,7 @@ We accept contributions via Pull Requests on [Github](https://github.com/chrismi
- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please squash them before submitting.

## Running Tests

``` bash
$ phpunit
```
See documentation.

## Branches
The **master** branch always contains the most up-to-date, production ready release. In most cases, this will be the same as the latest release under the "releases" tab.
Expand Down

0 comments on commit f02c99c

Please sign in to comment.