Skip to content
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

Make the vweb http server multithreaded + epoll/kqueue. Move it to net/http/server.v #7000

Open
medvednikov opened this issue Nov 28, 2020 · 15 comments
Assignees
Labels
Bug This tag is applied to issues which reports bugs.
Projects

Comments

@medvednikov
Copy link
Member

No description provided.

@medvednikov medvednikov created this issue from a note in 0.3 (To do) Nov 28, 2020
@danieldaeschle
Copy link
Member

danieldaeschle commented Nov 29, 2020

http/server? not just http/web or even net/http/server? :)

@medvednikov
Copy link
Member Author

Not sure what you are asking.

The server is in the vweb.v right now, it has to be moved to http/server.v, http module.

@JalonSolov
Copy link
Contributor

There's already a net/http module. He was asking if you were talking about creating a new http module at the same level as net, or if the server should go under net/http/server.

@medvednikov
Copy link
Member Author

Again, it has to be moved to http/server.v, http module.

I think I made it very clear.

http module doesn't have the server.

@JalonSolov
Copy link
Contributor

So it will be net/http/server.v since net/http is the existing http module.

@medvednikov medvednikov changed the title Make the vweb http server multithreaded + epoll/kqueue. Move it to http/server.v Make the vweb http server multithreaded + epoll/kqueue. Move it to net/http/server.v Nov 30, 2020
@medvednikov
Copy link
Member Author

Correct.

@spytheman
Copy link
Member

spytheman commented Dec 2, 2020

Moving it into net.http will burden all http clients with a web server implementation too.
I think it would be better in net.http.server, especially if we later have to support http2/http3 .

@danieldaeschle
Copy link
Member

@spytheman you said the same thing we already did. Did you misspelled something?

@JalonSolov
Copy link
Contributor

No... The previous discussions was to put it in net/http/server.v. @spytheman is suggesting putting it in net/http/server/server.v - extra level of directory, so that you do NOT get that code if you just want net.http module. You would have to import net.http.server separately.

@danieldaeschle
Copy link
Member

Hmm net/web would also be an option? or net/http/web.

@medvednikov
Copy link
Member Author

V's stdlib imitates Go's stdlib, which is now a standard. In Go, it's all in one module net.http. I don't see how having both client and server code for the protocol in one module can burden anything.

https://golang.org/src/net/http/

@JalonSolov
Copy link
Contributor

The only effect is having unused code in the final executable. If you're just writing a client, you don't need (and will never call) the server code.

Perhaps this will be optimized out, perhaps not. Depends on the backend.

@medvednikov
Copy link
Member Author

Unused functions will not be added to the final executable. @joe-conigliaro did some work on that and will wrap it up at some point soon.

@JalonSolov
Copy link
Contributor

Very nice. Will it be done before backend is called, so it applies to all?

@medvednikov
Copy link
Member Author

Yes.

@spytheman spytheman self-assigned this Dec 23, 2020
@medvednikov medvednikov added the Bug This tag is applied to issues which reports bugs. label Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This tag is applied to issues which reports bugs.
Projects
No open projects
0.3
  
To do
Development

No branches or pull requests

4 participants