-
Notifications
You must be signed in to change notification settings - Fork 676
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
V: pure v server #7932
V: pure v server #7932
Conversation
v/vanilla/src/server.v
Outdated
@@ -0,0 +1,291 @@ | |||
// This module implements a basic HTTP server using epoll for handling multiple client connections efficiently. |
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.
Should be named server.c.v
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 you do not change the name of this file, it will fail to compile when V changes the default so that files with C.
references in them must have .c.v
extension.
Maybe use v instead of vanilla for the reference implementation |
|
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.
Timeout on /user for raw v implementation @enghitalo
https://github.com/the-benchmarker/web-frameworks/actions/runs/11753378945/job/32746167449?pr=7932
I'm not sure that such low-level unsafe and "static" (return string instead of generated HTTP response) implementation should be used in the benchmark |
You say @cyrusmsk , that having such an implementation is not usefull here. It's quite the opposite for me. I think this raw implementation (v here) is useful when comparing other with v frameworks, not very useful when you compare with ruby based frameworks (example) |
I just followed initial message (written somewhere) that the idea of the project is to have production-ready solutions. |
You have a point. The main goal of this project is to compare web frameworks, so as you can decide wich to choose (if you want to migrate, or create a new project with a business idea or not). However, to make great framework, contributors need to compare with some reference implementation (in this case pure v for v based frameworks). For this it could be valuable, but indeed not got the primary goal. |
My intention with this project is to take advantage of Mr. @waghanza 's incredible project to have a standardized reference point between our frameworks and the frameworks of other projects in other languages and, thus, be able to outline, in a more coherent way, the performance improvements that we can have within the Language. |
I think @enghitalo's goal is spot on here. The idea of a "vanilla" (non veb-based in this case) starting point is of value and then from there it appears that he will implement a veb-based version (since that is the primarily official "batteries included" option) and perhaps other V-based frameworks. |
Let's fix the CI and I will update results today 😌 |
It is clear and a nice target, I agree. Why not create a separate V package? and put all low-level code over there and provide only high-level interface to it? |
Soon |
@@ -1,10 +1,10 @@ | |||
language: | |||
version: "weekly.2024.49" | |||
version: "latest" |
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.
Could master be considered as stable ?
I mean since v is not at 1.0, it could be ok to point to master, but it could be inconvenient to fix compilation issues (or else) in there is some
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.
That seems reasonable to me. V is so fast moving at the moment that this definitely makes sense @waghanza. I frankly don't think anyone is going to want to support older snapshots with so many updates coming in constantly and consistently... but I should defer to @enghitalo on his intention here.
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.
@waghanza For now, master is as stable as previous releases. I changed to master because "weekly.2024.49" is breaking the CI.
Good work @enghitalo! |
Thank you! |
challenge to make V top 1, and then rewrite the veb library
Local results
v wipe-cache && v -prod -gc none -d no_bounds_checking crun .
v wipe-cache && v -prod crun .