Racket asynchronous web server (event-based)

I plan to create REST-based services using Racket and its web server. One of the requirements that I have is an asynchronous web server (non-blocking based on events).

Is there an example of setting up or configuring a Racket web server to work in asynchronous mode?

I looked at the Racket documentation, but cannot figure out how to do this.

+4
source share
1 answer

I am the author of the Racket web server. It is always in asynchronous mode. As Greg mentions, it uses Racket streams that are compiled for continuations, and when you block I / O, they are stored in the data structure associated with the blocked port that is polled using kpoll / kqueue / etc, just like manually written asynchronous IO.

+4
source

Source: https://habr.com/ru/post/1501328/


All Articles