[swift-server-dev] Prototype of the discussed HTTP API Spec
Michael Chiu
hatsuneyuji at icloud.com
Thu Jun 1 12:36:53 CDT 2017
Hi Johannes and Paulo
>> I think what Michael means is that we must allow other frameworks based on libdispatch/libuv/libdill/libwhatever to implement their approach too. And this means providing synchronous APIs for the base IO and exposing the file descriptor so people can choose how they are going to poll/schedule for reads and writes. I agree with him a 100%.
>
> but the base APIs are orthogonal to the HTTP API, right? The HTTP API is implemented using some underlying mechanisms, be it libdill/mill/venice, kevent/epoll, Apache, Perfect-Net, DispatchSource, or DispatchIO. But as you say, that's a detail.
Actually I think the HTTP API won’t need to use any of libdispatch/libuv/libdill, despite HTTP2 has quite a lot of layer violations.
What I think will be great is a input driven parser, so instead of the the HTTP library actively reading data from the IO side, the IO side feed the parser with data like how nodejs’ http parser does.
Michael
More information about the swift-server-dev
mailing list