-
Notifications
You must be signed in to change notification settings - Fork 666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
D frameworks #6488
D frameworks #6488
Conversation
Two authors of framework (handy and arsd:cgi) agreed to add their framework to bench. I also added threads to archttp - probably it will improve results. Lighttp - simple and straightforward framework that was abandoned by the original author, bit it is still working. Also I propose to use dlangchina containter for Docker - it should use more modern version of LDC compiler. At least for the time when official containers for D will be ready (WIP now)
2.096 - is the version of DMD reference compiler. LDC - LLVM backend has different structure of the semver.
@adamdruppe @andrewlalis @Kripth we are going to add those framework in here. is it ok for you ? |
@@ -1,7 +1,9 @@ | |||
{ | |||
"name": "server", | |||
"dependencies": { | |||
"archttp": "~>1.1.1" | |||
"archttp": "~>1.1.1", | |||
"mir-cpuid": "~>1.2.10" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it a common usage ? I mean physical resources handling should not be a part of the framework / language ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably it will work without it. I've just took it from other repo: https://github.com/tchaloupka/httpbench/tree/master/dlang/archttp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like a hack for me, I prefer no to, but let's check with @zoujiaqing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I propose to try with this one. In case it doesn't give any value - we can remove it.
d/config.yaml
Outdated
@@ -1,5 +1,5 @@ | |||
language: | |||
version: 2.096 | |||
version: 1.32.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
ℹ️ Not sure how to determine language version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
D has several compilers.
DMD has versions 2.XXX - now it is 2.104 https://dlang.org/download.html#dmd
LDC (based on LLVM) has different versions. The latest is 1.32.2 https://github.com/ldc-developers/ldc/releases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If using ldc
package of debian, how can we be sure of version number (of the language) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just saw that C uses Debian as well. So you are right - we can rely only on version from the package. Could we use it as temporary decision? While the updated versions of official (or at least community-driven) docker images are under preparation?
yeah i think benchmarks are generally silly and useless (they are so far away from any real world concerns) but i don't mind them being there. |
The approve from Andrew is here: andrewlalis/handy-httpd#20 |
Also added fix for version numbers as suggested
Check if it works without it
Move Docker to latest Alpine. And install LDC in Docker file
Mark as build
@waghanza do you know the error with wrong URL?
Don't know how to fix it. |
Maybe if server is not listening to 0.0.0.0 inside the container, and on port 3000 @cyrusmsk |
It seems problem in Docker configuration. If I will use old ubuntu-based two solutions passed tests successfully. But now I'm trying to use Alpine image and faced with this problem. |
is it possible to echo/cat the file 'd/archttp/ip-default.txt' somehow with Docker command? |
Forgot to add dub
change ip for handy_http
Added SUCCESS statuses for response for handy_http
Ok, with last commit everything passed tests: https://github.com/cyrusmsk/web-frameworks/actions/runs/5592528052/jobs/10225103834 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure that ldc
provided by debian side use d lang version 1.32 @cyrusmsk ?
https://packages.debian.org/unstable/ldc
Change language version and move to Devian bookworm
Fixed to 1.30.0. And also I saw that you are planning to move other Debian based images to Bookworm, so I've change the container to Bookworm as well. All tests are passed https://github.com/cyrusmsk/web-frameworks/actions/runs/5602125606 in local repo. |
Could you use multi-layer container @cyrusmsk ? |
added static files copy
change copy command
Updated to multi-stage container. But because D need runtime - it still required ldc package to run. Probably it is possible to build static executables, but I haven't tested them for HTTPs frameworks. Test locally run here https://github.com/cyrusmsk/web-frameworks/actions/runs/5603841227 |
Hi @waghanza |
Added 3 more frameworks:
Also small changes to archttp and Docker file (for latest version of LDC).
Please review and test to approve the PR into master branch.