RE: Non-blocking web server

2024-03-25 Thread Maxime Devos
Your flag #:blocking? #true would do a per-connection thread, which while implementing lack of blocking, is a stronger property than non-blocking. Also, (kernel-level) threads have some overhead, which is sub-optimal; Instead of a flag, I propose defining a new ‘server-impl’ Web Server (Guile R

Re: Non-blocking web server

2024-03-25 Thread Nala Ginrut
Hi Ryan! For the single-threaded non-blocking server in Guile, you have to make sure at least 3 steps: 1. set socket to non-blocking 2. enable suspended ports to prepare delimited-continuation powered coroutine 3. designed your own scheduler Even in the single thread, you can handle requests concu

Re: Non-blocking web server

2024-03-24 Thread tomas
On Sun, Mar 24, 2024 at 03:41:32PM -0400, Ryan Raymond wrote: > Hello, all. > I was able to build a non-blocking web-server using network sockets. > However, the existing guile web/server.scm implementation is > single-threaded and therefore blocking [...] How does "single-threaded" imply "blockin