Browse Source

Update Hexagon and remove not needed run configuration (#6996)

* Fix error with URLs in JEE servers

* Clean up

* Avoid classpath URLs

* Fix template loading error

* Fix template loading error

* Chores

* Fix template loading error

* Delete MongoDB DB support

Storage support in Hexagon will be moved outside the Toolkit, and so, it will be left outside the benchmark.

* Fix runtime problem

* Update Hexagon version

* Make Jackson Blackbird module optional

* Add variation with Blackbird module enabled

* Upgrade Hexagon version

* Enable blackbird Jackson module by default

* Update dependencies
Juanjo Aguililla 3 years ago
parent
commit
a9dd0535d2

+ 0 - 23
frameworks/Kotlin/hexagon/benchmark_config.json

@@ -25,29 +25,6 @@
                 "notes": "http://hexagonkt.com",
                 "versus": "servlet"
             },
-            "blackbird": {
-                "json_url": "/json",
-                "db_url": "/postgresql/db",
-                "query_url": "/postgresql/query?queries=",
-                "fortune_url": "/postgresql/pebble/fortunes",
-                "update_url": "/postgresql/update?queries=",
-                "cached_query_url": "/postgresql/cached?count=",
-                "plaintext_url": "/plaintext",
-                "port": 9090,
-                "approach": "Realistic",
-                "classification": "Micro",
-                "database": "postgres",
-                "framework": "Hexagon",
-                "language": "Kotlin",
-                "orm": "Raw",
-                "platform": "Servlet",
-                "webserver": "None",
-                "os": "Linux",
-                "database_os": "Linux",
-                "display_name": "Hexagon Jetty PostgreSQL",
-                "notes": "http://hexagonkt.com",
-                "versus": "servlet"
-            },
             "resin": {
                 "json_url": "/json",
                 "db_url": "/postgresql/db",

+ 5 - 5
frameworks/Kotlin/hexagon/build.gradle

@@ -1,16 +1,16 @@
 
 plugins {
-    id "org.jetbrains.kotlin.jvm" version "1.5.31"
+    id "org.jetbrains.kotlin.jvm" version "1.6.10"
 }
 
 ext {
-    gradleScripts = "https://raw.githubusercontent.com/hexagonkt/hexagon/1.4.7/gradle"
+    gradleScripts = "https://raw.githubusercontent.com/hexagonkt/hexagon/1.5.1/gradle"
 
-    hexagonVersion = "1.4.7"
+    hexagonVersion = "1.5.1"
     hikariVersion = "5.0.0"
     jettyVersion = "10.0.7"
-    postgresqlVersion = "42.2.24"
-    cache2kVersion = "2.2.1.Final"
+    postgresqlVersion = "42.3.1"
+    cache2kVersion = "2.4.1.Final"
     jacksonBlackbirdVersion = "2.13.0"
 }
 

+ 0 - 18
frameworks/Kotlin/hexagon/config.toml

@@ -19,24 +19,6 @@ platform = "Servlet"
 webserver = "None"
 versus = "servlet"
 
-[blackbird]
-urls.plaintext = "/plaintext"
-urls.json = "/json"
-urls.db = "/postgresql/db"
-urls.query = "/postgresql/query?queries="
-urls.update = "/postgresql/update?queries="
-urls.fortune = "/postgresql/pebble/fortunes"
-urls.cached_query = "/postgresql/cached?count="
-approach = "Realistic"
-classification = "Micro"
-database = "postgres"
-database_os = "Linux"
-os = "Linux"
-orm = "Raw"
-platform = "Servlet"
-webserver = "None"
-versus = "servlet"
-
 [resin]
 urls.plaintext = "/plaintext"
 urls.json = "/json"

+ 0 - 26
frameworks/Kotlin/hexagon/hexagon-blackbird.dockerfile

@@ -1,26 +0,0 @@
-#
-# BUILD
-#
-FROM gradle:7.2-jdk11 AS gradle_build
-USER root
-WORKDIR /hexagon
-
-COPY src src
-COPY build.gradle build.gradle
-RUN gradle --quiet
-
-#
-# RUNTIME
-#
-FROM adoptopenjdk:11-jre-hotspot-bionic
-ENV DBSTORE postgresql
-ENV POSTGRESQL_DB_HOST tfb-database
-ENV WEBENGINE jetty
-ENV PROJECT hexagon
-ENV ENABLE_BLACKBIRD true
-
-COPY --from=gradle_build /hexagon/build/install/$PROJECT /opt/$PROJECT
-
-EXPOSE 9090
-
-ENTRYPOINT /opt/$PROJECT/bin/$PROJECT

+ 2 - 1
frameworks/Kotlin/hexagon/hexagon.dockerfile

@@ -1,7 +1,7 @@
 #
 # BUILD
 #
-FROM gradle:7.2-jdk11 AS gradle_build
+FROM gradle:7.3.3-jdk11 AS gradle_build
 USER root
 WORKDIR /hexagon
 
@@ -17,6 +17,7 @@ ENV DBSTORE postgresql
 ENV POSTGRESQL_DB_HOST tfb-database
 ENV WEBENGINE jetty
 ENV PROJECT hexagon
+ENV ENABLE_BLACKBIRD true
 
 COPY --from=gradle_build /hexagon/build/install/$PROJECT /opt/$PROJECT
 

+ 2 - 1
frameworks/Kotlin/hexagon/src/main/kotlin/Benchmark.kt

@@ -1,12 +1,13 @@
 package com.hexagonkt
 
 import com.fasterxml.jackson.module.blackbird.BlackbirdModule
-import com.hexagonkt.helpers.Jvm
+import com.hexagonkt.core.helpers.Jvm
 import com.hexagonkt.http.server.Server
 import com.hexagonkt.http.server.ServerPort
 import com.hexagonkt.http.server.ServerSettings
 import com.hexagonkt.http.server.jetty.JettyServletAdapter
 import com.hexagonkt.serialization.*
+import com.hexagonkt.serialization.json.*
 import com.hexagonkt.store.BenchmarkSqlStore
 import com.hexagonkt.store.BenchmarkStore
 import com.hexagonkt.templates.TemplatePort

+ 3 - 3
frameworks/Kotlin/hexagon/src/main/kotlin/Controller.kt

@@ -1,9 +1,9 @@
 package com.hexagonkt
 
-import com.hexagonkt.helpers.require
+import com.hexagonkt.core.helpers.require
 import com.hexagonkt.http.server.Call
 import com.hexagonkt.http.server.Router
-import com.hexagonkt.serialization.Json
+import com.hexagonkt.serialization.json.Json
 import com.hexagonkt.serialization.toFieldsMap
 import com.hexagonkt.store.BenchmarkStore
 import com.hexagonkt.templates.TemplatePort
@@ -91,4 +91,4 @@ class Controller(private val settings: Settings) {
         catch (e: Exception) {
             null
         }
-}
+}

+ 2 - 2
frameworks/Kotlin/hexagon/src/main/kotlin/Settings.kt

@@ -1,6 +1,6 @@
 package com.hexagonkt
 
-import com.hexagonkt.helpers.Jvm.systemSetting
+import com.hexagonkt.core.helpers.Jvm.systemSetting
 
 data class Settings(
     val bindPort: Int = systemSetting("bindPort") ?: 9090,
@@ -25,4 +25,4 @@ data class Settings(
     val textMessage: String = "Hello, World!",
     val queriesParam: String = "queries",
     val cachedQueriesParam: String = "count",
-)
+)

+ 3 - 3
frameworks/Kotlin/hexagon/src/main/kotlin/WebListenerServer.kt

@@ -2,8 +2,8 @@ package com.hexagonkt
 
 import com.fasterxml.jackson.module.blackbird.BlackbirdModule
 import com.hexagonkt.http.server.servlet.ServletServer
-import com.hexagonkt.serialization.JacksonMapper
-import com.hexagonkt.serialization.Json
+import com.hexagonkt.serialization.json.JacksonMapper
+import com.hexagonkt.serialization.json.Json
 import com.hexagonkt.serialization.SerializationManager
 import javax.servlet.annotation.WebListener
 
@@ -14,4 +14,4 @@ import javax.servlet.annotation.WebListener
         SerializationManager.mapper = JacksonMapper
         SerializationManager.formats = linkedSetOf(Json)
     }
-}
+}

+ 2 - 2
frameworks/Kotlin/hexagon/src/main/kotlin/store/BenchmarkSqlStore.kt

@@ -4,7 +4,7 @@ import com.hexagonkt.CachedWorld
 import com.hexagonkt.Fortune
 import com.hexagonkt.Settings
 import com.hexagonkt.World
-import com.hexagonkt.helpers.Jvm
+import com.hexagonkt.core.helpers.Jvm
 import com.zaxxer.hikari.HikariConfig
 import com.zaxxer.hikari.HikariDataSource
 import org.cache2k.Cache
@@ -100,4 +100,4 @@ internal class BenchmarkSqlStore(engine: String, private val settings: Settings
         rs.next()
         return World(rs.getInt(1), rs.getInt(2))
     }
-}
+}