[swift-server-dev] HTTP Parser
Helge Heß
me at helgehess.eu
Mon Nov 7 05:20:01 CST 2016
On 07 Nov 2016, at 02:59, Chris Bailey <BAILEYC at uk.ibm.com> wrote:
> To add some data into the debate...
>
> The C based http_parser used by Node.js (and original from NGINX) is approx 3K lines of code. If we think strictly in terms of effort to implement (and ignore maintenance costs or what's required to reach the same quality levels etc) then it shouldn't be an unreasonable amount of effort to do a Swift implementation - and in fact we could look at both approaches and see which is preferable (as both approaches have been taken by Swift frameworks already).
>
> The nghttp2 library however is approx 64K lines of code (looking only at the src directory).
Ahh common! :-) The http_parser is just the parser. nghttp2 is a full HTTP networking library, pretty much a C++ version of what this groups wants to come up with! Included in your LOC is stuff like a `memcached_dispatcher.h/.cc` and `ruby_module.h/.cc` …
Do you really want to use nghttp2? Unlike the name suggests this isn’t a plain-C thing, it is actually a C++ code base. Scanning the code it looks like that would bring in the C++ stdlib, Boost!, libevent and who knows what. This is fine for Node which is C++ in the first place, but I really don’t find it desirable to pull in such a big thing as part of this effort.
hh
P.S.: As a sidenote, can’t someone (hm hm, who would come to mind?) sponsor the CryptoSwift guy to do a java.security like Security standard framework (which includes TLS)? That would be pretty cool :-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://lists.swift.org/pipermail/swift-server-dev/attachments/20161107/8d581bd5/attachment.sig>
More information about the swift-server-dev
mailing list