[ prog / sol / mona ]

sol


textboard?

6 2018-11-02 17:12

>>5
There are actually 3 good libraries, so you can use actors (Erlang-style) of CSP (Go-style) or coroutines (Lua-style)

* https://www.gnu.org/software/8sync/news/8sync-02-released-and-the-future-of-8sync.html
* https://github.com/wingo/fibers
* https://github.com/ChrisVine/guile-a-sync

I've used Fibers because it has a drop-in replacement for Guile's webserver. Guile is also multi-threaded, it will use of your 4 cores.

About Racket, I benchmarked every web servers I could find in Scheme and the performances were really disappointing. Maybe I haven't tried the mose efficient one, which one do you use?

A simple "hello world" with Guile:

(use-modules (web server))

(define (handler request body)
  (values '((content-type . (text/plain)))
          "Hello, World!"))

(run-server handler 'fibers)
12


VIP:

do not edit these