Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Restructured Rexster to extract RexPro and the Console.

  • Loading branch information...
commit f5eb857106b880c718a83fdbecadd69fff7d3b63 1 parent 5f807cd
@spmallette spmallette authored
Showing with 385 additions and 197 deletions.
  1. +2 −0  .gitignore
  2. +2 −0  pom.xml
  3. +1 −1  rexster-console.bat
  4. +2 −2 rexster-console.sh
  5. +5 −0 rexster-console/README.textile
  6. +110 −0 rexster-console/pom.xml
  7. 0  {rexster-server → rexster-console}/rexster-console.bat
  8. +3 −0  rexster-console/rexster-console.sh
  9. +38 −0 rexster-console/src/assembly/distribution.xml
  10. +32 −0 rexster-console/src/assembly/standalone.xml
  11. +6 −0 rexster-console/src/main/bin/README.txt
  12. 0  {rexster-server → rexster-console}/src/main/bin/rexster-console.bat
  13. 0  {rexster-server → rexster-console}/src/main/bin/rexster-console.sh
  14. 0  {rexster-server → rexster-console}/src/main/java/com/tinkerpop/rexster/protocol/RexsterConsole.java
  15. 0  {rexster-server → rexster-console}/src/test/java/com/tinkerpop/rexster/protocol/BitWorksTest.java
  16. 0  {rexster-server → rexster-console}/src/test/java/com/tinkerpop/rexster/protocol/EngineHolderTest.java
  17. 0  {rexster-server → rexster-console}/src/test/java/com/tinkerpop/rexster/protocol/RexsterBindingsTest.java
  18. +8 −0 rexster-core/README.textile
  19. +0 −4 rexster-core/pom.xml
  20. +2 −4 rexster-core/src/assembly/distribution.xml
  21. 0  {rexster-server → rexster-core}/src/main/java/com/tinkerpop/rexster/RexsterApplication.java
  22. 0  ...ster-server → rexster-core}/src/main/java/com/tinkerpop/rexster/gremlin/converter/ResultConverter.java
  23. +121 −0 rexster-protocol/pom.xml
  24. +25 −0 rexster-protocol/src/assembly/distribution.xml
  25. +22 −0 rexster-protocol/src/assembly/standalone.xml
  26. 0  ... → rexster-protocol}/src/main/java/com/tinkerpop/rexster/gremlin/converter/ConsoleResultConverter.java
  27. 0  ... → rexster-protocol}/src/main/java/com/tinkerpop/rexster/gremlin/converter/MsgPackResultConverter.java
  28. 0  {rexster-server → rexster-protocol}/src/main/java/com/tinkerpop/rexster/protocol/BitWorks.java
  29. 0  {rexster-server → rexster-protocol}/src/main/java/com/tinkerpop/rexster/protocol/EngineController.java
  30. 0  {rexster-server → rexster-protocol}/src/main/java/com/tinkerpop/rexster/protocol/EngineHolder.java
  31. 0  ...ster-server → rexster-protocol}/src/main/java/com/tinkerpop/rexster/protocol/RemoteRexsterSession.java
  32. 0  {rexster-server → rexster-protocol}/src/main/java/com/tinkerpop/rexster/protocol/ResultAndBindings.java
  33. 0  {rexster-server → rexster-protocol}/src/main/java/com/tinkerpop/rexster/protocol/RexPro.java
  34. 0  {rexster-server → rexster-protocol}/src/main/java/com/tinkerpop/rexster/protocol/RexProSession.java
  35. 0  ...ster-server → rexster-protocol}/src/main/java/com/tinkerpop/rexster/protocol/RexProSessionMonitor.java
  36. 0  {rexster-server → rexster-protocol}/src/main/java/com/tinkerpop/rexster/protocol/RexProSessions.java
  37. 0  {rexster-server → rexster-protocol}/src/main/java/com/tinkerpop/rexster/protocol/RexsterBindings.java
  38. 0  ...erver → rexster-protocol}/src/main/java/com/tinkerpop/rexster/protocol/filter/RexProMessageFilter.java
  39. 0  {rexster-server → rexster-protocol}/src/main/java/com/tinkerpop/rexster/protocol/filter/ScriptFilter.java
  40. 0  ...ster-server → rexster-protocol}/src/main/java/com/tinkerpop/rexster/protocol/filter/SessionFilter.java
  41. 0  ...→ rexster-protocol}/src/main/java/com/tinkerpop/rexster/protocol/msg/ConsoleScriptResponseMessage.java
  42. 0  ...-server → rexster-protocol}/src/main/java/com/tinkerpop/rexster/protocol/msg/ErrorResponseMessage.java
  43. 0  {rexster-server → rexster-protocol}/src/main/java/com/tinkerpop/rexster/protocol/msg/MessageType.java
  44. 0  ...→ rexster-protocol}/src/main/java/com/tinkerpop/rexster/protocol/msg/MsgPackScriptResponseMessage.java
  45. 0  {rexster-server → rexster-protocol}/src/main/java/com/tinkerpop/rexster/protocol/msg/RexProMessage.java
  46. 0  ...-server → rexster-protocol}/src/main/java/com/tinkerpop/rexster/protocol/msg/ScriptRequestMessage.java
  47. 0  ...server → rexster-protocol}/src/main/java/com/tinkerpop/rexster/protocol/msg/SessionRequestMessage.java
  48. 0  ...erver → rexster-protocol}/src/main/java/com/tinkerpop/rexster/protocol/msg/SessionResponseMessage.java
  49. +0 −3  ...rr; rexster-protocol}/src/test/java/com/tinkerpop/rexster/gremlin/converter/MsgPackResultConverterTest.java
  50. +6 −17 rexster-server/pom.xml
  51. +0 −3  rexster-server/rexster-console.sh
  52. +0 −1  rexster-server/src/main/java/com/tinkerpop/rexster/WebServer.java
  53. +0 −162 rexster-server/src/main/java/com/tinkerpop/rexster/protocol/RexProMsgPack.java
View
2  .gitignore
@@ -5,6 +5,8 @@
/rexster-server/target
/rexster-kibbles/*/target
/rexster-core/target
+/rexster-console/target
+/rexster-protocol/target
/bin
# eclipse project files and local rexster.xml
*.classpath
View
2  pom.xml
@@ -48,6 +48,8 @@
<module>rexster-server</module>
<module>rexster-kibbles</module>
<module>rexster-core</module>
+ <module>rexster-console</module>
+ <module>rexster-protocol</module>
</modules>
<properties>
View
2  rexster-console.bat
@@ -1,5 +1,5 @@
:: Windows launcher script for Rexster Console
@echo off
-cd %CD%\rexster-server
+cd %CD%\rexster-console
call rexster-console.bat %*
View
4 rexster-console.sh
@@ -1,4 +1,4 @@
#!/bin/bash
-cd rexster-server
-target/rexster-server-*-standalone/bin/rexster-console.sh $@
+cd rexster-console
+target/rexster-console-*-standalone/bin/rexster-console.sh $@
View
5 rexster-console/README.textile
@@ -0,0 +1,5 @@
+!https://github.com/tinkerpop/rexster/raw/master/doc/images/rexster-logo.png!
+
+Rexster Console is a remote REPL for "Rexster":http://rexster.tinkerpop.com.
+
+The documentation for Rexster Console can be found at this "location":https://github.com/tinkerpop/rexster/wiki/Rexster-Console. Finally, please visit "TinkerPop":http://tinkerpop.com for other software products.
View
110 rexster-console/pom.xml
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <artifactId>rexster</artifactId>
+ <groupId>com.tinkerpop.rexster</groupId>
+ <version>2.1.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>rexster-console</artifactId>
+ <name>Rexster Console: A remote REPL for Rexster</name>
+ <description>Rexster Console is a remote REPL for Rexster graph server.</description>
+ <inceptionYear>2012</inceptionYear>
+ <contributors>
+ <contributor>
+ <name>Stephen Mallette</name>
+ <email>spmva@genoprime.com</email>
+ <url>http://stephen.genoprime.com</url>
+ </contributor>
+ </contributors>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.tinkerpop.rexster</groupId>
+ <artifactId>rexster-core</artifactId>
+ <version>2.1.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>com.tinkerpop.rexster</groupId>
+ <artifactId>rexster-protocol</artifactId>
+ <version>2.1.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>com.tinkerpop</groupId>
+ <artifactId>pipes</artifactId>
+ <version>${pipes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>jline</groupId>
+ <artifactId>jline</artifactId>
+ <version>0.9.94</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-cli</groupId>
+ <artifactId>commons-cli</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <!-- TESTING -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jmock</groupId>
+ <artifactId>jmock-junit4</artifactId>
+ <version>2.5.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <directory>${basedir}/target</directory>
+ <finalName>${project.artifactId}-${project.version}</finalName>
+ <testSourceDirectory>src/test/java</testSourceDirectory>
+ <resources>
+ <resource>
+ <directory>${basedir}/src/main/resources
+ </directory>
+ </resource>
+ </resources>
+ <testResources>
+ <testResource>
+ <directory>${basedir}/src/test/resources
+ </directory>
+ </testResource>
+ </testResources>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2-beta-4</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>attached</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <descriptors>
+ <descriptor>src/assembly/standalone.xml</descriptor>
+ <descriptor>src/assembly/distribution.xml</descriptor>
+ </descriptors>
+ <finalName>${project.artifactId}-${project.version}</finalName>
+ <outputDirectory>target</outputDirectory>
+ <workDirectory>target/assembly/work</workDirectory>
+ <tarLongFileMode>warn</tarLongFileMode>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
View
0  rexster-server/rexster-console.bat → rexster-console/rexster-console.bat 100755 → 100644
File renamed without changes
View
3  rexster-console/rexster-console.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+target/rexster-console-*-standalone/bin/rexster-console.sh $@
View
38 rexster-console/src/assembly/distribution.xml
@@ -0,0 +1,38 @@
+<assembly>
+ <formats>
+ <format>zip</format>
+ </formats>
+
+ <fileSets>
+ <fileSet>
+ <fileMode>0775</fileMode>
+ <directory>target/${project.artifactId}-${project.version}-standalone/bin</directory>
+ <outputDirectory>bin</outputDirectory>
+ <includes>
+ <include>*.sh</include>
+ <include>*.bat</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>src</directory>
+ </fileSet>
+ <fileSet>
+ <directory>target/${project.artifactId}-${project.version}-standalone/lib</directory>
+ <outputDirectory>lib</outputDirectory>
+ </fileSet>
+ </fileSets>
+ <files>
+ <file>
+ <source>pom.xml</source>
+ <outputDirectory>src</outputDirectory>
+ </file>
+ <file>
+ <source>../LICENSE.txt</source>
+ <outputDirectory>/</outputDirectory>
+ </file>
+ <file>
+ <source>src/main/bin/README.txt</source>
+ <outputDirectory>/</outputDirectory>
+ </file>
+ </files>
+</assembly>
View
32 rexster-console/src/assembly/standalone.xml
@@ -0,0 +1,32 @@
+<assembly>
+ <id>standalone</id>
+ <formats>
+ <format>dir</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+
+ <fileSets>
+ <fileSet>
+ <directory>src/main/bin</directory>
+ <outputDirectory>/bin</outputDirectory>
+ <fileMode>0755</fileMode>
+ </fileSet>
+ <fileSet>
+ <directory>target/*.jar</directory>
+ <outputDirectory>/lib</outputDirectory>
+ </fileSet>
+ </fileSets>
+
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>/lib</outputDirectory>
+ <unpack>false</unpack>
+ <scope>compile</scope>
+ </dependencySet>
+ <dependencySet>
+ <outputDirectory>/lib</outputDirectory>
+ <unpack>false</unpack>
+ <scope>provided</scope>
+ </dependencySet>
+ </dependencySets>
+</assembly>
View
6 rexster-console/src/main/bin/README.txt
@@ -0,0 +1,6 @@
+-= Rexster Console: A remote REPL for Rexster =-
+
+Script evaluation within Rexster Console occurs remotely on a Rexster server.
+Rexster Console communicates with any Gremlin-flavored JSR223 compliant ScriptEngine hosted within the Rexster server.
+Rexster Console provides access to configured graphs within Rexster server.
+
View
0  ...r-server/src/main/bin/rexster-console.bat → ...-console/src/main/bin/rexster-console.bat
File renamed without changes
View
0  ...er-server/src/main/bin/rexster-console.sh → ...r-console/src/main/bin/rexster-console.sh
File renamed without changes
View
0  ...rpop/rexster/protocol/RexsterConsole.java → ...rpop/rexster/protocol/RexsterConsole.java
File renamed without changes
View
0  ...kerpop/rexster/protocol/BitWorksTest.java → ...kerpop/rexster/protocol/BitWorksTest.java
File renamed without changes
View
0  ...op/rexster/protocol/EngineHolderTest.java → ...op/rexster/protocol/EngineHolderTest.java
File renamed without changes
View
0  ...rexster/protocol/RexsterBindingsTest.java → ...rexster/protocol/RexsterBindingsTest.java
File renamed without changes
View
8 rexster-core/README.textile
@@ -0,0 +1,8 @@
+!https://github.com/tinkerpop/rexster/raw/master/doc/images/rexster-logo.png!
+
+Rexster Core provides the building blocks utilized in the extension of Rexster. These components include classes for creating:
+
+* "Extensions":https://github.com/tinkerpop/rexster/wiki/Extensions
+* Graph Configurations
+
+The documentation for Rexster can be found at this "location":http://rexster.tinkerpop.com. Finally, please visit "TinkerPop":http://tinkerpop.com for other software products.
View
4 rexster-core/pom.xml
@@ -88,10 +88,6 @@
<directory>${basedir}/src/test/resources
</directory>
</testResource>
- <testResource>
- <directory>${basedir}/src/integration/resources
- </directory>
- </testResource>
</testResources>
<plugins>
<plugin>
View
6 rexster-core/src/assembly/distribution.xml
@@ -13,14 +13,12 @@
</fileSet>
<fileSet>
<directory>target/apidocs</directory>
- </fileSet>
- <fileSet>
- <directory>target/site</directory>
+ <outputDirectory>doc/javadoc</outputDirectory>
</fileSet>
<fileSet>
<directory>target</directory>
<includes>
- <include>frames-core-*.jar</include>
+ <include>rexster-core-*.jar</include>
</includes>
</fileSet>
</fileSets>
View
0  ...tinkerpop/rexster/RexsterApplication.java → ...tinkerpop/rexster/RexsterApplication.java
File renamed without changes
View
0  ...er/gremlin/converter/ResultConverter.java → ...er/gremlin/converter/ResultConverter.java
File renamed without changes
View
121 rexster-protocol/pom.xml
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <artifactId>rexster</artifactId>
+ <groupId>com.tinkerpop.rexster</groupId>
+ <version>2.1.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>rexster-protocol</artifactId>
+ <name>RexPro: Binary Protocol</name>
+ <description>RexPro is a binary protocol for Rexster graph server.</description>
+ <inceptionYear>2012</inceptionYear>
+ <contributors>
+ <contributor>
+ <name>Stephen Mallette</name>
+ <email>spmva@genoprime.com</email>
+ <url>http://stephen.genoprime.com</url>
+ </contributor>
+ </contributors>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.tinkerpop.rexster</groupId>
+ <artifactId>rexster-core</artifactId>
+ <version>${rexster.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.tinkerpop.blueprints</groupId>
+ <artifactId>blueprints-core</artifactId>
+ <version>${blueprints.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.tinkerpop</groupId>
+ <artifactId>pipes</artifactId>
+ <version>${pipes.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.msgpack</groupId>
+ <artifactId>msgpack</artifactId>
+ <version>0.6.5</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.jettison</groupId>
+ <artifactId>jettison</artifactId>
+ <version>1.3.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.grizzly</groupId>
+ <artifactId>grizzly-framework</artifactId>
+ <version>2.1.2</version>
+ </dependency>
+ <!-- LOGGING -->
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.14</version>
+ </dependency>
+ <!-- TESTING -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jmock</groupId>
+ <artifactId>jmock-junit4</artifactId>
+ <version>2.5.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <directory>${basedir}/target</directory>
+ <finalName>${project.artifactId}-${project.version}</finalName>
+ <testSourceDirectory>src/test/java</testSourceDirectory>
+ <resources>
+ <resource>
+ <directory>${basedir}/src/main/resources
+ </directory>
+ </resource>
+ </resources>
+ <testResources>
+ <testResource>
+ <directory>${basedir}/src/test/resources
+ </directory>
+ </testResource>
+ </testResources>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2-beta-4</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>attached</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <descriptors>
+ <descriptor>src/assembly/standalone.xml</descriptor>
+ <descriptor>src/assembly/distribution.xml</descriptor>
+ </descriptors>
+ <finalName>${project.artifactId}-${project.version}</finalName>
+ <outputDirectory>target</outputDirectory>
+ <workDirectory>target/assembly/work</workDirectory>
+ <tarLongFileMode>warn</tarLongFileMode>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
View
25 rexster-protocol/src/assembly/distribution.xml
@@ -0,0 +1,25 @@
+<assembly>
+ <formats>
+ <format>zip</format>
+ </formats>
+ <fileSets>
+ <fileSet>
+ <includes>
+ <include>pom.xml</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>src</directory>
+ </fileSet>
+ <fileSet>
+ <directory>target/apidocs</directory>
+ <outputDirectory>doc/javadoc</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>target</directory>
+ <includes>
+ <include>rexster-protocol-*.jar</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+</assembly>
View
22 rexster-protocol/src/assembly/standalone.xml
@@ -0,0 +1,22 @@
+<assembly>
+ <id>standalone</id>
+ <formats>
+ <format>jar</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+
+ <fileSets>
+ <fileSet>
+ <directory>target/classes</directory>
+ <outputDirectory>/</outputDirectory>
+ </fileSet>
+ </fileSets>
+
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>/</outputDirectory>
+ <unpack>true</unpack>
+ <scope>runtime</scope>
+ </dependencySet>
+ </dependencySets>
+</assembly>
View
0  ...lin/converter/ConsoleResultConverter.java → ...lin/converter/ConsoleResultConverter.java
File renamed without changes
View
0  ...lin/converter/MsgPackResultConverter.java → ...lin/converter/MsgPackResultConverter.java
File renamed without changes
View
0  .../tinkerpop/rexster/protocol/BitWorks.java → .../tinkerpop/rexster/protocol/BitWorks.java
File renamed without changes
View
0  ...op/rexster/protocol/EngineController.java → ...op/rexster/protocol/EngineController.java
File renamed without changes
View
0  ...kerpop/rexster/protocol/EngineHolder.java → ...kerpop/rexster/protocol/EngineHolder.java
File renamed without changes
View
0  ...exster/protocol/RemoteRexsterSession.java → ...exster/protocol/RemoteRexsterSession.java
File renamed without changes
View
0  ...p/rexster/protocol/ResultAndBindings.java → ...p/rexster/protocol/ResultAndBindings.java
File renamed without changes
View
0  ...om/tinkerpop/rexster/protocol/RexPro.java → ...om/tinkerpop/rexster/protocol/RexPro.java
File renamed without changes
View
0  ...erpop/rexster/protocol/RexProSession.java → ...erpop/rexster/protocol/RexProSession.java
File renamed without changes
View
0  ...exster/protocol/RexProSessionMonitor.java → ...exster/protocol/RexProSessionMonitor.java
File renamed without changes
View
0  ...rpop/rexster/protocol/RexProSessions.java → ...rpop/rexster/protocol/RexProSessions.java
File renamed without changes
View
0  ...pop/rexster/protocol/RexsterBindings.java → ...pop/rexster/protocol/RexsterBindings.java
File renamed without changes
View
0  .../protocol/filter/RexProMessageFilter.java → .../protocol/filter/RexProMessageFilter.java
File renamed without changes
View
0  ...rexster/protocol/filter/ScriptFilter.java → ...rexster/protocol/filter/ScriptFilter.java
File renamed without changes
View
0  ...exster/protocol/filter/SessionFilter.java → ...exster/protocol/filter/SessionFilter.java
File renamed without changes
View
0  ...col/msg/ConsoleScriptResponseMessage.java → ...col/msg/ConsoleScriptResponseMessage.java
File renamed without changes
View
0  ...er/protocol/msg/ErrorResponseMessage.java → ...er/protocol/msg/ErrorResponseMessage.java
File renamed without changes
View
0  ...pop/rexster/protocol/msg/MessageType.java → ...pop/rexster/protocol/msg/MessageType.java
File renamed without changes
View
0  ...col/msg/MsgPackScriptResponseMessage.java → ...col/msg/MsgPackScriptResponseMessage.java
File renamed without changes
View
0  ...p/rexster/protocol/msg/RexProMessage.java → ...p/rexster/protocol/msg/RexProMessage.java
File renamed without changes
View
0  ...er/protocol/msg/ScriptRequestMessage.java → ...er/protocol/msg/ScriptRequestMessage.java
File renamed without changes
View
0  ...r/protocol/msg/SessionRequestMessage.java → ...r/protocol/msg/SessionRequestMessage.java
File renamed without changes
View
0  .../protocol/msg/SessionResponseMessage.java → .../protocol/msg/SessionResponseMessage.java
File renamed without changes
View
3  ...converter/MsgPackResultConverterTest.java → ...converter/MsgPackResultConverterTest.java
@@ -12,11 +12,8 @@
import org.msgpack.type.ValueFactory;
import org.msgpack.unpacker.BufferUnpacker;
import org.msgpack.unpacker.Converter;
-import org.msgpack.unpacker.Unpacker;
import org.msgpack.unpacker.UnpackerIterator;
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
View
23 rexster-server/pom.xml
@@ -29,7 +29,12 @@
<dependency>
<groupId>com.tinkerpop.rexster</groupId>
<artifactId>rexster-core</artifactId>
- <version>2.1.0-SNAPSHOT</version>
+ <version>${rexster.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.tinkerpop.rexster</groupId>
+ <artifactId>rexster-protocol</artifactId>
+ <version>${rexster.version}</version>
</dependency>
<!-- PROPERTY GRAPH MODEL SUPPORT -->
<dependency>
@@ -115,20 +120,10 @@
<version>2.1.2</version>
</dependency>
<dependency>
- <groupId>org.glassfish.grizzly</groupId>
- <artifactId>grizzly-framework</artifactId>
- <version>2.1.2</version>
- </dependency>
- <dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
</dependency>
- <dependency>
- <groupId>org.msgpack</groupId>
- <artifactId>msgpack</artifactId>
- <version>0.6.5</version>
- </dependency>
<!-- LOGGING -->
<dependency>
<groupId>log4j</groupId>
@@ -151,12 +146,6 @@
<artifactId>commons-io</artifactId>
<version>2.0.1</version>
</dependency>
- <!-- OTHER -->
- <dependency>
- <groupId>jline</groupId>
- <artifactId>jline</artifactId>
- <version>0.9.94</version>
- </dependency>
<!-- TESTING -->
<dependency>
<groupId>junit</groupId>
View
3  rexster-server/rexster-console.sh
@@ -1,3 +0,0 @@
-#!/bin/bash
-
-target/rexster-server-*-standalone/bin/rexster-console.sh $@
View
1  rexster-server/src/main/java/com/tinkerpop/rexster/WebServer.java
@@ -30,7 +30,6 @@
import org.glassfish.grizzly.http.server.HttpServer;
import org.glassfish.grizzly.http.server.NetworkListener;
import org.glassfish.grizzly.http.server.ServerConfiguration;
-import org.glassfish.grizzly.http.server.StaticHttpHandler;
import org.glassfish.grizzly.nio.transport.TCPNIOTransport;
import org.glassfish.grizzly.nio.transport.TCPNIOTransportBuilder;
import org.glassfish.grizzly.servlet.ServletHandler;
View
162 rexster-server/src/main/java/com/tinkerpop/rexster/protocol/RexProMsgPack.java
@@ -1,162 +0,0 @@
-package com.tinkerpop.rexster.protocol;
-
-import com.tinkerpop.blueprints.impls.rexster.RestHelper;
-import com.tinkerpop.blueprints.impls.rexster.RexsterAuthentication;
-import com.tinkerpop.rexster.Tokens;
-import com.tinkerpop.rexster.protocol.msg.ConsoleScriptResponseMessage;
-import com.tinkerpop.rexster.protocol.msg.MsgPackScriptResponseMessage;
-import com.tinkerpop.rexster.protocol.msg.ScriptRequestMessage;
-import com.tinkerpop.rexster.protocol.msg.SessionRequestMessage;
-import org.codehaus.jettison.json.JSONArray;
-import org.codehaus.jettison.json.JSONObject;
-import org.msgpack.MessagePack;
-import org.msgpack.type.Value;
-import org.msgpack.unpacker.BufferUnpacker;
-import org.msgpack.unpacker.Converter;
-import org.msgpack.unpacker.UnpackerIterator;
-
-import java.io.IOException;
-import java.util.Map;
-import java.util.UUID;
-
-import static org.msgpack.template.Templates.tMap;
-import static org.msgpack.template.Templates.TString;
-import static org.msgpack.template.Templates.TValue;
-
-/**
- * A bit of an experiment.
- */
-public class RexProMsgPack {
-
- private static final byte[] emptyBindings;
-
- static {{
- byte [] empty;
- try {
- empty = ConsoleScriptResponseMessage.convertBindingsToByteArray(new RexsterBindings());
- } catch (IOException ioe) {
- empty = new byte[0];
- }
-
- emptyBindings = empty;
- }};
-
- public static void main(String[] args) {
- //bigCalls();
- lotsOfCalls(false);
- }
-
- private static void bigCalls() {
-
- RemoteRexsterSession session = new RemoteRexsterSession("localhost", 8184, 100, "", "",
- SessionRequestMessage.CHANNEL_MSGPACK);
- session.open();
-
- RestHelper.Authentication = new RexsterAuthentication(null, null);
-
- long start = System.currentTimeMillis();
-
- JSONObject restResult = RestHelper.get("http://localhost:8182/graphs/gratefulgraph/tp/gremlin?script=g.V");
- restResult = RestHelper.get("http://localhost:8182/graphs/gratefulgraph/tp/gremlin?script=g.E");
-
- long checkpoint = System.currentTimeMillis();
-
- try {
- MsgPackScriptResponseMessage resultMessage = (MsgPackScriptResponseMessage) session.sendRequest(
- createScriptRequestMessage(session, "g=rexster.getGraph('gratefulgraph');g.V;"), 100);
- resultMessage = (MsgPackScriptResponseMessage) session.sendRequest(
- createScriptRequestMessage(session, "g.E;"), 100);
- System.out.println((checkpoint - start) + ":" + (System.currentTimeMillis() - checkpoint));
-
- } catch (Exception ex) {
- ex.printStackTrace();
- }
-
-
- }
-
- private static void lotsOfCalls(boolean doJson){
-
- RemoteRexsterSession session = new RemoteRexsterSession("localhost", 8184, 100, "", "", SessionRequestMessage.CHANNEL_MSGPACK);
- session.open();
- RestHelper.Authentication = new RexsterAuthentication(null, null);
-
- MessagePack msgpack = new MessagePack();
-
- long start = System.currentTimeMillis();
-
- if (doJson) {
- JSONObject restResult = RestHelper.get("http://localhost:8182/graphs/gratefulgraph/tp/gremlin?script=g.V");
- JSONArray restVertices = restResult.optJSONArray(Tokens.RESULTS);
- for (int ix =0; ix < restVertices.length(); ix++) {
- JSONObject restVertex = RestHelper.get("http://localhost:8182/graphs/gratefulgraph/tp/gremlin?script=g.v(" + restVertices.optJSONObject(ix).optString(Tokens._ID) + ")");
- System.out.println(restVertex);
- }
-
- restResult = RestHelper.get("http://localhost:8182/graphs/gratefulgraph/tp/gremlin?script=g.E");
- JSONArray restEdges = restResult.optJSONArray(Tokens.RESULTS);
- for (int ix =0; ix < restEdges.length(); ix++) {
- JSONObject restEdge = RestHelper.get("http://localhost:8182/graphs/gratefulgraph/tp/gremlin?script=g.e(" + restEdges.optJSONObject(ix).optString(Tokens._ID) + ")");
- System.out.println(restEdge);
- }
- }
-
- long checkpoint = System.currentTimeMillis();
-
- try {
-
- MsgPackScriptResponseMessage resultMessage = (MsgPackScriptResponseMessage) session.sendRequest(
- createScriptRequestMessage(session, "g=rexster.getGraph('gratefulgraph');g.V;"), 100);
-
- BufferUnpacker unpacker = msgpack.createBufferUnpacker(resultMessage.Results);
- unpacker.setArraySizeLimit(Integer.MAX_VALUE);
- unpacker.setMapSizeLimit(Integer.MAX_VALUE);
- unpacker.setRawSizeLimit(Integer.MAX_VALUE);
-
- UnpackerIterator itty = unpacker.iterator();
- while (itty.hasNext()){
- final Map<String,Value> map = new Converter(msgpack, itty.next()).read(tMap(TString, TValue));
- final String vId = map.get(Tokens._ID).asRawValue().getString();
-
- MsgPackScriptResponseMessage vertexResultMessage = (MsgPackScriptResponseMessage) session.sendRequest(
- createScriptRequestMessage(session, "g.v(" + vId + ")"), 100);
-
- unpacker = msgpack.createBufferUnpacker(vertexResultMessage.Results);
- System.out.println(unpacker.read(tMap(TString, TValue)));
-
- }
-
- resultMessage = (MsgPackScriptResponseMessage) session.sendRequest(
- createScriptRequestMessage(session, "g.E;"), 100);
-
- unpacker = msgpack.createBufferUnpacker(resultMessage.Results);
-
- itty = unpacker.iterator();
- while (itty.hasNext()){
- final Map<String,Value> map = new Converter(msgpack, itty.next()).read(tMap(TString, TValue));
- final String eId = map.get(Tokens._ID).asRawValue().getString();
-
- MsgPackScriptResponseMessage edgeResultMessage = (MsgPackScriptResponseMessage) session.sendRequest(
- createScriptRequestMessage(session, "g.e(" + eId + ")"), 100);
-
- unpacker = msgpack.createBufferUnpacker(edgeResultMessage.Results);
- System.out.println(unpacker.read(tMap(TString, TValue)));
- }
-
- System.out.println((checkpoint - start) + ":" + (System.currentTimeMillis() - checkpoint));
- } catch (Exception ex) {
- ex.printStackTrace();
- }
- }
-
- private static ScriptRequestMessage createScriptRequestMessage(RemoteRexsterSession session, String script) throws IOException {
- ScriptRequestMessage scriptMessage = new ScriptRequestMessage();
- scriptMessage.setSessionAsUUID(session.getSessionKey());
- scriptMessage.Script = script;
- scriptMessage.Bindings = emptyBindings;
- scriptMessage.LanguageName = "groovy";
- scriptMessage.Flag = (byte) 0;
- scriptMessage.setRequestAsUUID(UUID.randomUUID());
- return scriptMessage;
- }
-}
Please sign in to comment.
Something went wrong with that request. Please try again.