Browse Source

reimplemented Gemini-Postgres due to Travis error

Keith Newman 10 years ago
parent
commit
0c91f8d916

+ 5 - 5
frameworks/Java/gemini/Docroot/WEB-INF/GeminiHello.conf

@@ -87,19 +87,19 @@ DeploymentDescription = Production
 # specific configuration files.
 
 # MySQL/ConnectorJ
-db.Driver.Class = com.mysql.jdbc.Driver
-db.Driver.UrlPrefix = jdbc:mysql://
+db.Driver.Class = org.postgresql.Driver
+db.Driver.UrlPrefix = jdbc:postgresql://
 db.Driver.SupportsAbsolute = yes
 db.Driver.SupportsGetRow = yes
 db.Driver.Jdbc1 = no
 
-db.ConnectString = localhost:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useServerPrepStmts&enableQueryTimeouts=false&useUnbufferedIO=false&useReadAheadInput=false&maintainTimeStats=false&cacheRSMetadata=true
+db.ConnectString = 127.0.0.1:5432/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useServerPrepStmts&enableQueryTimeouts=false&useUnbufferedIO=false&useReadAheadInput=false&maintainTimeStats=false&cacheRSMetadata=true
 db.LoginName = benchmarkdbuser
 db.LoginPass = benchmarkdbpass
 
 # JTDS (Open source JDBC driver for Microsoft SQL Server)
-#db.Driver.Class = net.sourceforge.jtds.jdbc.Driver
-#db.Driver.UrlPrefix = jdbc:jtds:sqlserver://
+#db.Driver.Class = org.postgresql.Driver
+#db.Driver.UrlPrefix = jdbc:postgresql://
 #db.Driver.SupportsAbsolute = yes
 #db.Driver.SupportsGetRow = yes
 #db.Driver.Jdbc1 = no

BIN
frameworks/Java/gemini/Docroot/WEB-INF/lib/postgresql-9.4-1200.jdbc41.jar


+ 1 - 1
frameworks/Java/gemini/Docroot/WEB-INF/resin.xml

@@ -14,7 +14,7 @@
     </server>
 
     <host>
-      <web-app id="/" root-directory="/home/tfb/FrameworkBenchmarks/frameworks/Java/gemini/Docroot" />
+      <web-app id="/" root-directory="/home/knewman/FrameworkBenchmarks/frameworks/Java/gemini/Docroot" />
     </host>
 
   </cluster>

+ 40 - 2
frameworks/Java/gemini/benchmark_config

@@ -4,11 +4,49 @@
     "default": {
       "setup_file": "start",
       "json_url": "/",
+      "plaintext_url": "/plaintext",
+      "port": 8080,
+      "approach": "Realistic",
+      "classification": "Fullstack",
+      "database": "None",
+      "framework": "gemini",
+      "language": "Java",
+      "orm": "Micro",
+      "platform": "Servlet",
+      "webserver": "None",
+      "os": "Linux",
+      "database_os": "Linux",
+      "display_name": "gemini",
+      "notes": "",
+      "versus": "servlet"
+    },
+    "mysql": {
+      "setup_file": "start",
+      "db_url": "/db",
+      "query_url": "/query?queries=",
+      "fortune_url": "/fortunes",
+      "update_url": "/update?queries=",
+      "port": 8080,
+      "approach": "Realistic",
+      "classification": "Fullstack",
+      "database": "MySQL",
+      "framework": "gemini",
+      "language": "Java",
+      "orm": "Micro",
+      "platform": "Servlet",
+      "webserver": "Resin",
+      "os": "Linux",
+      "database_os": "Linux",
+      "display_name": "gemini",
+      "notes": "",
+      "versus": "servlet"
+    },
+    "postgres": {
+      "setup_file": "start_postgres",
       "db_url": "/db",
       "query_url": "/query?queries=",
       "fortune_url": "/fortunes",
       "update_url": "/update?queries=",
-      "plaintext_url": "/plaintext",
       "port": 8080,
       "approach": "Realistic",
       "classification": "Fullstack",
@@ -23,6 +61,6 @@
       "display_name": "gemini",
       "notes": "",
       "versus": "servlet"
-    }
+    }   
   }]
 }

+ 1 - 0
frameworks/Java/gemini/source_code

@@ -24,6 +24,7 @@
 ./gemini/Docroot/WEB-INF/lib
 ./gemini/Docroot/WEB-INF/lib/kryonet-1.04-all.jar
 ./gemini/Docroot/WEB-INF/lib/mysql-connector-java-5.1.23-bin.jar
+./gemini-Docroot/WEB-INF/lib/postgresql-9.4-1200.jdbc41.jar
 ./gemini/Docroot/WEB-INF/lib/mustache-compiler-0.8.13.jar
 ./gemini/Docroot/WEB-INF/lib/mail.jar
 ./gemini/Docroot/WEB-INF/lib/activation.jar

+ 4 - 2
frameworks/Java/gemini/start.sh

@@ -1,7 +1,9 @@
 #!/bin/bash
 
-sed -i 's/db.ConnectString = .*:3306/db.ConnectString = '"$DBHOST"':3306/g' Docroot/WEB-INF/GeminiHello.conf
+sed -i 's|db.ConnectString = .*/|db.ConnectString = '"$DBHOST"':3306/|g' Docroot/WEB-INF/GeminiHello.conf
 sed -i 's|root-directory=".*/FrameworkBenchmarks/frameworks/Java/gemini|root-directory="'"$TROOT"'|g' Docroot/WEB-INF/resin.xml
+sed -i 's|db.Driver.Class = .*|db.Driver.Class = com.mysql.jdbc.Driver|g' Docroot/WEB-INF/GeminiHello.conf
+sed -i 's|db.Driver.UrlPrefix = .*|db.Driver.UrlPrefix = jdbc:mysql://|g' Docroot/WEB-INF/GeminiHello.conf
 mkdir -p Docroot/WEB-INF/classes
 ant compile
-$RESIN_HOME/bin/resinctl -conf $TROOT/Docroot/WEB-INF/resin.xml start
+$RESIN_HOME/bin/resinctl -conf $TROOT/Docroot/WEB-INF/resin.xml start

+ 9 - 0
frameworks/Java/gemini/start_postgres.sh

@@ -0,0 +1,9 @@
+#!/bin/bash
+
+sed -i 's|db.ConnectString = .*/|db.ConnectString = '"$DBHOST"':5432/|g' Docroot/WEB-INF/GeminiHello.conf
+sed -i 's|root-directory=".*/FrameworkBenchmarks/frameworks/Java/gemini|root-directory="'"$TROOT"'|g' Docroot/WEB-INF/resin.xml
+sed -i 's|db.Driver.Class = .*|db.Driver.Class = org.postgresql.Driver|g' Docroot/WEB-INF/GeminiHello.conf
+sed -i 's|db.Driver.UrlPrefix = .*|db.Driver.UrlPrefix = jdbc:postgresql://|g' Docroot/WEB-INF/GeminiHello.conf
+mkdir -p Docroot/WEB-INF/classes
+ant compile
+$RESIN_HOME/bin/resinctl -conf $TROOT/Docroot/WEB-INF/resin.xml start