Browse Source

Add new web framework for DLang. (#7349)

* Add archttp for D.

* Add README.md

* Use archttp 0.0.1

* Enable multi-threaded for Archttp

* Fix archttp.dockefile

* Add install  dub in archttp.dockefile

* Add ldc dependency tools to dockerfile, and upgrade Archttp version to 0.2.0

* Use dlang2/ldc docker file

* Upgrade Archttp version to 1.0.1 to support 'Server' value in response header.

* Upgrade archttp version to 1.1.0

* upgrade archttp version to 1.1.1
zoujiaqing 2 years ago
parent
commit
ae86766bdd

+ 18 - 0
frameworks/D/archttp/README.md

@@ -0,0 +1,18 @@
+# Archttp Benchmarking
+A highly performant web framework written in D.
+
+## Requirements
+* LDC > 1.27
+
+## Infrastructure Software Versions
+* [Archttp ~main](https://github.com/kerisy/archttp)
+
+## Test URLs
+
+### PlanText Test
+
+    http://localhost:1111/plaintext
+
+### JSON Encoding Test
+
+    http://localhost:1111/json

+ 12 - 0
frameworks/D/archttp/archttp.dockerfile

@@ -0,0 +1,12 @@
+FROM dlang2/ldc-ubuntu:latest
+
+ADD ./ /archttp
+WORKDIR /archttp
+
+RUN apt-get update -yqq && apt-get install -yqq zlib1g-dev
+
+RUN dub build -b release --compiler=ldc2 --verbose
+
+EXPOSE 1111
+
+CMD ["./archttp-server"]

+ 24 - 0
frameworks/D/archttp/benchmark_config.json

@@ -0,0 +1,24 @@
+{
+  "framework": "archttp",
+  "tests": [{
+    "default": {
+      "json_url": "/json",
+      "plaintext_url": "/plaintext",
+      "port": 1111,
+      "approach": "Realistic",
+      "classification": "Platform",
+      "database": "None",
+      "framework": "Archttp",
+      "language": "D",
+      "flavor": "LDC",
+      "orm": "Raw",
+      "platform": "Archttp",
+      "webserver": "None",
+      "os": "Linux",
+      "database_os": "Linux",
+      "display_name": "Archttp",
+      "notes": "",
+      "versus": "Archttp"
+  }
+  }]
+}

+ 15 - 0
frameworks/D/archttp/config.toml

@@ -0,0 +1,15 @@
+[framework]
+name = "archttp"
+
+[main]
+urls.plaintext = "/plaintext"
+urls.json = "/json"
+approach = "Realistic"
+classification = "Platform"
+database = "None"
+database_os = "Linux"
+os = "Linux"
+orm = "Raw"
+platform = "Archttp"
+webserver = "None"
+versus = "Archttp"

+ 5 - 0
frameworks/D/archttp/dub.sdl

@@ -0,0 +1,5 @@
+name "archttp-server"
+description "Archttp server application."
+authors "[email protected]"
+copyright "Copyright © 2021-2022, kerisy.com"
+dependency "archttp" version="~>1.1.1"

+ 19 - 0
frameworks/D/archttp/source/main.d

@@ -0,0 +1,19 @@
+
+import archttp;
+
+void main()
+{
+    auto app = new Archttp;
+
+    app.get("/plaintext", (req, res) {
+        res.send("Hello, World!");
+    });
+
+    app.get("/json", (req, res) {
+        import std.json;
+
+        res.send( JSONValue( ["message" : "Hello, World!"] ) );
+    });
+
+    app.listen(1111);
+}