Browse Source

Merge branch 'undertow' of https://github.com/ctomc/FrameworkBenchmarks into 865

Conflicts:
	undertow/pom.xml
mcoccia 11 years ago
parent
commit
7e4ae50f3d

+ 3 - 3
undertow-edge/src/main/resources/hello/server.properties

@@ -1,14 +1,14 @@
 web.port = 8080
 web.port = 8080
 web.host = 0.0.0.0
 web.host = 0.0.0.0
-mysql.uri = jdbc:mysql://DATABASE_HOST: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&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true
+mysql.uri = jdbc:mysql://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&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true
 mysql.user = benchmarkdbuser
 mysql.user = benchmarkdbuser
 mysql.password = benchmarkdbpass
 mysql.password = benchmarkdbpass
 #
 #
 # TODO: Audit this postgresql connection string.
 # TODO: Audit this postgresql connection string.
 # It looks copy & pasted from MySQL.  Do these parameters even do anything?
 # It looks copy & pasted from MySQL.  Do these parameters even do anything?
 #
 #
-postgresql.uri = jdbc:postgresql://DATABASE_HOST: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&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true
+postgresql.uri = jdbc:postgresql://localhost: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&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true
 postgresql.user = benchmarkdbuser
 postgresql.user = benchmarkdbuser
 postgresql.password = benchmarkdbpass
 postgresql.password = benchmarkdbpass
-mongodb.host = DATABASE_HOST:27017
+mongodb.host = localhost:27017
 mongodb.name = hello_world
 mongodb.name = hello_world

+ 12 - 10
undertow/pom.xml

@@ -7,34 +7,36 @@
     <groupId>com.techempower</groupId>
     <groupId>com.techempower</groupId>
     <artifactId>undertow-example</artifactId>
     <artifactId>undertow-example</artifactId>
     <version>0.1</version>
     <version>0.1</version>
-
+     <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    </properties>
     <dependencies>
     <dependencies>
         <!-- Web server -->
         <!-- Web server -->
         <dependency>
         <dependency>
             <groupId>io.undertow</groupId>
             <groupId>io.undertow</groupId>
             <artifactId>undertow-core</artifactId>
             <artifactId>undertow-core</artifactId>
-            <version>1.0.13.Final</version>
+            <version>1.0.14.Final</version>
         </dependency>
         </dependency>
         <dependency>
         <dependency>
             <groupId>org.jboss.xnio</groupId>
             <groupId>org.jboss.xnio</groupId>
             <artifactId>xnio-api</artifactId>
             <artifactId>xnio-api</artifactId>
-            <version>3.2.1.Final</version>
+            <version>3.2.2.Final</version>
         </dependency>
         </dependency>
         <dependency>
         <dependency>
             <groupId>org.jboss.xnio</groupId>
             <groupId>org.jboss.xnio</groupId>
             <artifactId>xnio-nio</artifactId>
             <artifactId>xnio-nio</artifactId>
-            <version>3.2.1.Final</version>
+            <version>3.2.2.Final</version>
         </dependency>
         </dependency>
         <!-- Database drivers -->
         <!-- Database drivers -->
         <dependency>
         <dependency>
             <groupId>mysql</groupId>
             <groupId>mysql</groupId>
             <artifactId>mysql-connector-java</artifactId>
             <artifactId>mysql-connector-java</artifactId>
-            <version>5.1.25</version>
+            <version>5.1.30</version>
         </dependency>
         </dependency>
         <dependency>
         <dependency>
             <groupId>postgresql</groupId>
             <groupId>postgresql</groupId>
             <artifactId>postgresql</artifactId>
             <artifactId>postgresql</artifactId>
-            <version>9.0-801.jdbc4</version>
+            <version>9.1-901-1.jdbc4</version>
         </dependency>
         </dependency>
         <dependency>
         <dependency>
             <groupId>org.mongodb</groupId>
             <groupId>org.mongodb</groupId>
@@ -51,23 +53,23 @@
         <dependency>
         <dependency>
             <groupId>com.google.guava</groupId>
             <groupId>com.google.guava</groupId>
             <artifactId>guava</artifactId>
             <artifactId>guava</artifactId>
-            <version>14.0.1</version>
+            <version>16.0.1</version>
         </dependency>
         </dependency>
         <!-- JSON encoding -->
         <!-- JSON encoding -->
         <dependency>
         <dependency>
             <groupId>com.fasterxml.jackson.core</groupId>
             <groupId>com.fasterxml.jackson.core</groupId>
             <artifactId>jackson-databind</artifactId>
             <artifactId>jackson-databind</artifactId>
-            <version>2.3.0</version>
+            <version>2.3.3</version>
         </dependency>
         </dependency>
         <dependency>
         <dependency>
             <groupId>com.fasterxml.jackson.core</groupId>
             <groupId>com.fasterxml.jackson.core</groupId>
             <artifactId>jackson-annotations</artifactId>
             <artifactId>jackson-annotations</artifactId>
-            <version>2.3.0</version>
+            <version>2.3.3</version>
         </dependency>
         </dependency>
         <dependency>
         <dependency>
             <groupId>com.fasterxml.jackson.core</groupId>
             <groupId>com.fasterxml.jackson.core</groupId>
             <artifactId>jackson-core</artifactId>
             <artifactId>jackson-core</artifactId>
-            <version>2.3.0</version>
+            <version>2.3.3</version>
         </dependency>
         </dependency>
         <!-- HTML templates -->
         <!-- HTML templates -->
         <dependency>
         <dependency>

+ 4 - 3
undertow/src/main/java/hello/HelloWebServer.java

@@ -115,14 +115,15 @@ public final class HelloWebServer {
       }
       }
     }
     }
     Undertow.builder()
     Undertow.builder()
-        .addListener(
+        .addHttpListener(
             Integer.parseInt(properties.getProperty("web.port")),
             Integer.parseInt(properties.getProperty("web.port")),
             properties.getProperty("web.host"))
             properties.getProperty("web.host"))
         .setBufferSize(1024 * 16)
         .setBufferSize(1024 * 16)
         .setIoThreads(Runtime.getRuntime().availableProcessors() * 2) //this seems slightly faster in some configurations
         .setIoThreads(Runtime.getRuntime().availableProcessors() * 2) //this seems slightly faster in some configurations
         .setSocketOption(Options.BACKLOG, 10000)
         .setSocketOption(Options.BACKLOG, 10000)
         .setServerOption(UndertowOptions.ALWAYS_SET_KEEP_ALIVE, false) //don't send a keep-alive header for HTTP/1.1 requests, as it is not required
         .setServerOption(UndertowOptions.ALWAYS_SET_KEEP_ALIVE, false) //don't send a keep-alive header for HTTP/1.1 requests, as it is not required
-        .setHandler(Handlers.date(Handlers.header(Handlers.path()
+        .setServerOption(UndertowOptions.ALWAYS_SET_DATE, true)
+        .setHandler(Handlers.header(Handlers.path()
             .addPrefixPath("/json",
             .addPrefixPath("/json",
                 new JsonHandler(objectMapper))
                 new JsonHandler(objectMapper))
             .addPrefixPath("/db/mysql",
             .addPrefixPath("/db/mysql",
@@ -153,7 +154,7 @@ public final class HelloWebServer {
                 new PlaintextHandler())
                 new PlaintextHandler())
             .addPrefixPath("/cache",
             .addPrefixPath("/cache",
                 new CacheHandler(objectMapper, worldCache)),
                 new CacheHandler(objectMapper, worldCache)),
-            Headers.SERVER_STRING, "U-tow")))
+            Headers.SERVER_STRING, "U-tow"))
         .setWorkerThreads(200)
         .setWorkerThreads(200)
         .build()
         .build()
         .start();
         .start();

+ 3 - 3
undertow/src/main/resources/hello/server.properties

@@ -1,14 +1,14 @@
 web.port = 8080
 web.port = 8080
 web.host = 0.0.0.0
 web.host = 0.0.0.0
-mysql.uri = jdbc:mysql://DATABASE_HOST: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&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true
+mysql.uri = jdbc:mysql://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&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true
 mysql.user = benchmarkdbuser
 mysql.user = benchmarkdbuser
 mysql.password = benchmarkdbpass
 mysql.password = benchmarkdbpass
 #
 #
 # TODO: Audit this postgresql connection string.
 # TODO: Audit this postgresql connection string.
 # It looks copy & pasted from MySQL.  Do these parameters even do anything?
 # It looks copy & pasted from MySQL.  Do these parameters even do anything?
 #
 #
-postgresql.uri = jdbc:postgresql://DATABASE_HOST: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&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true
+postgresql.uri = jdbc:postgresql://localhost: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&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true
 postgresql.user = benchmarkdbuser
 postgresql.user = benchmarkdbuser
 postgresql.password = benchmarkdbpass
 postgresql.password = benchmarkdbpass
-mongodb.host = DATABASE_HOST:27017
+mongodb.host = localhost:27017
 mongodb.name = hello_world
 mongodb.name = hello_world