Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
ec495ab
Update Solon Version To 2.9.1
noear Aug 24, 2024
68230d6
Update Solon Version To 2.9.1
noear Aug 25, 2024
7716c14
Merge branch 'TechEmpower:master' into master
noear Aug 31, 2024
4f889c7
Update Solon Jdk To 21
noear Aug 31, 2024
a9fb8de
Update Solon Jdk To 21
noear Sep 1, 2024
9ae3b14
Update Solon Jdk To 21
noear Sep 1, 2024
c47ce32
Update Solon Jdk To 21
noear Sep 1, 2024
da9ba21
Update Solon Jdk To 21
noear Sep 1, 2024
72ca067
Update Solon Version To 2.9.2
noear Sep 8, 2024
9c8bf48
Merge branch 'master' of https://github.com/noear/FrameworkBenchmarks
noear Sep 8, 2024
940b673
Add Solon-Virtual
noear Sep 8, 2024
dcc414a
Remove solon-virtual
noear Sep 8, 2024
c39cf23
Merge branch 'TechEmpower:master' into master
noear Oct 23, 2024
d4bfde6
Update Solon Version To 3.0.2
noear Oct 24, 2024
a61b871
Merge branch 'master' of https://github.com/noear/FrameworkBenchmarks
noear Oct 24, 2024
574595c
Add Solon-Vertx
noear Oct 29, 2024
69ec85b
Tweak description
noear Oct 29, 2024
190ad20
Tweak the dockerfile
noear Oct 29, 2024
ccd3a29
Tweak the dockerfile
noear Oct 29, 2024
be86ab7
Tweak config
noear Oct 29, 2024
2e6fc3a
Tweak dockefile name
noear Oct 29, 2024
9ad4a99
Add FilterImpl
noear Oct 29, 2024
68d43a1
Add FilterImpl
noear Oct 29, 2024
8191627
The json plugin is changed to jackson
noear Oct 31, 2024
2440838
Update Solon Jdk To 23
noear Oct 31, 2024
5026b1d
Merge branch 'master' into master
noear Oct 31, 2024
6981e6a
Update Solon-Vertx Jdk To 23
noear Oct 31, 2024
263b4ca
Merge branch 'master' of https://github.com/noear/FrameworkBenchmarks
noear Oct 31, 2024
6316e88
Solon-vertx is restored to jdk 21
noear Oct 31, 2024
df26e43
Solon is restored to jdk 21
noear Oct 31, 2024
0698765
Solon-vertx adjusts the Date output format
noear Oct 31, 2024
d2c20e7
Solon is restored to jdk 21
noear Oct 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions frameworks/Java/solon-vertx/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# solon-vertx Benchmarking Test


This is the solon-vertx portion of a [benchmarking test suite](../) comparing a variety of web development platforms.

### JSON Encoding Test
* [JSON test source](src/main/java/hello/Main.java)
* [Plaintext test source](src/main/java/hello/Main.java)

## Versions

* [Java OpenJDK 21](http://openjdk.java.net/)
* [solon 3.0.2](https://github.com/noear/solon)

## Test URLs

### JSON Encoding Test

http://localhost:8080/json

### Plaintext Encoding Test

http://localhost:8080/plaintext
26 changes: 26 additions & 0 deletions frameworks/Java/solon-vertx/benchmark_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"framework": "solon-vertx",
"tests": [
{
"default": {
"json_url": "/json",
"plaintext_url": "/plaintext",
"port": 8080,
"approach": "Realistic",
"classification": "Fullstack",
"database": "None",
"framework": "solon",
"language": "Java",
"flavor": "None",
"orm": "Micro",
"platform": "Netty",
"webserver": "None",
"os": "Linux",
"database_os": "Linux",
"display_name": "solon-vertx",
"notes": "",
"versus": "solon"
}
}
]
}
15 changes: 15 additions & 0 deletions frameworks/Java/solon-vertx/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[framework]
name = "solon-vertx"

[main]
urls.plaintext = "/plaintext"
urls.json = "/json"
approach = "Realistic"
classification = "Platform"
database = "None"
database_os = "Linux"
os = "Linux"
orm = "Micro"
platform = "Netty"
webserver = "None"
versus = "solon"
61 changes: 61 additions & 0 deletions frameworks/Java/solon-vertx/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<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">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.noear</groupId>
<artifactId>solon-parent</artifactId>
<version>3.0.2</version>
</parent>

<groupId>hello</groupId>
<artifactId>hello-solon</artifactId>
<version>1.0</version>
<packaging>jar</packaging>

<properties>
<java.version>21</java.version>
</properties>

<dependencies>
<dependency>
<groupId>org.noear</groupId>
<artifactId>solon-boot-vertx</artifactId>
</dependency>

<dependency>
<groupId>org.noear</groupId>
<artifactId>solon-serialization-jackson</artifactId>
</dependency>
</dependencies>

<build>
<finalName>${project.artifactId}</finalName>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>hello.Main</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
13 changes: 13 additions & 0 deletions frameworks/Java/solon-vertx/solon-vertx.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM maven:3.9.7-amazoncorretto-21 as maven
WORKDIR /solon
COPY pom.xml pom.xml
COPY src src
RUN mvn compile assembly:single -q

FROM openjdk:21-jdk-slim
WORKDIR /solon
COPY --from=maven /solon/target/hello-solon.jar app.jar

EXPOSE 8080

CMD ["java", "-server", "-cp", "app.jar", "hello.Main"]
13 changes: 13 additions & 0 deletions frameworks/Java/solon-vertx/src/main/java/hello/Main.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package hello;

import org.noear.solon.Solon;

/**
* @author noear
* @version V1.0
*/
public class Main {
public static void main(String[] args) {
Solon.start(Main.class, args);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package hello.controller;

import org.noear.solon.annotation.Component;
import org.noear.solon.core.handle.Context;
import org.noear.solon.core.handle.Filter;
import org.noear.solon.core.handle.FilterChain;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

@Component
public class FilterImpl implements Filter {
private static DateFormat DATE_FORMAT = new SimpleDateFormat("EEE, d MMM yyyyy HH:mm:ss z");

@Override
public void doFilter(Context ctx, FilterChain chain) throws Throwable {
String dateString = DATE_FORMAT.format(new Date());
ctx.headerSet("Date", dateString);
ctx.headerSet("Server", "solon-boot-vertx");
chain.doFilter(ctx);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package hello.controller;

import org.noear.solon.annotation.Controller;
import org.noear.solon.annotation.Get;
import org.noear.solon.annotation.Mapping;
import hello.model.Message;

/**
* @author noear
* @version V1.0
*/
@Controller
public class HelloController {
@Get
@Mapping("plaintext")
public String plaintext() {
return "Hello, World!";
}

@Get
@Mapping("json")
public Message json() {
return new Message("Hello, World!");
}
}
21 changes: 21 additions & 0 deletions frameworks/Java/solon-vertx/src/main/java/hello/model/Message.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package hello.model;

/**
* @author noear
* @version V1.0
*/
public class Message {
private String message;

public Message(String message) {
this.message = message;
}

public String getMessage() {
return message;
}

public void setMessage(String message) {
this.message = message;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
server.http.ioBound=false
2 changes: 1 addition & 1 deletion frameworks/Java/solon/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<dependency>
<groupId>org.noear</groupId>
<artifactId>solon-serialization-snack3</artifactId>
<artifactId>solon-serialization-jackson</artifactId>
</dependency>
</dependencies>

Expand Down
Loading