[swift-server-dev] HTTP Parser

Chris Bailey BAILEYC at uk.ibm.com
Mon Nov 21 05:55:51 CST 2016

>> But it sounds like MIT licensed code can’t be used as part of the 
effort, maybe that should be added the the front-page of the effort.

I'm not 100% convinced this is true. There's nothing (legally) preventing 
the inclusion of MIT licensed code in a Apache 2.0 licensed product, you 
just may have to list some Product Unique Terms (PUTs) to cover it - we 
don't need the Node.js community to dual-license it for us to use it. 
Parts of the Swift toolchain already have compiled-in dependencies on MIT 
licensed code, so my guess is that ship has already sailed on using 
non-Apache 2.0 licensed code.

Having said that, we'd obviously need a read and approval from the Swift 
Core Team (and Apple legal!) before making a compiled-in dependency on 


From:   Helge Heß via swift-server-dev <swift-server-dev at swift.org>
To:     "swift-server-dev at swift.org" <swift-server-dev at swift.org>
Date:   20/11/2016 18:08
Subject:        Re: [swift-server-dev] HTTP Parser
Sent by:        swift-server-dev-bounces at swift.org

Hi Dave,

thanks for your post, this detail is indeed quite helpful.

I don’t think anyone seriously suggested using a Swift port of the 
http_parser but instead just the upstream C one. But it sounds like MIT 
licensed code can’t be used as part of the effort, maybe that should be 
added the the front-page of the effort.

I assume it is not a huge issue though as a libhttp_parser can be shipped 
separately from Swift itself, similar to what you would do for OpenSSL etc 
(and what is already being done with libcurl on Linux).

In any case: Whatever is decided, it at least establishes a performance 
characteristic, I think any replacement should accomplish a comparable one 
- preferably faster of course :-)


> On 20 Nov 2016, at 16:58, David Sperling via swift-server-dev 
<swift-server-dev at swift.org> wrote:
> I would like to provide some additional detail to the discussion on 
November 4 (which I missed since I joined recently).
> The team pointed out this thread in Kitura which I initially opened:
> https://github.com/IBM-Swift/Kitura-net/issues/52
> Here is the referenced Swift http_parser project which I initially 
ported as a thought experiment.  The goals, API and performance are 
described in the readme.
> https://github.com/smithmicro/HTTPParser
> Michael Gottesman from Apple (@gottesmm) contacted me 2 weeks ago to see 
if we could add the project into the Swift Benchmark Suite.  See the 
bottom of this PR for the request:
> https://github.com/IBM-Swift/Kitura-net/pull/55
> Michael and I approached the Node.js Foundation to see if they were 
willing to dual license http_parser under Apache 2 so it would be 
compatible with the Swift license.  Here is that discussion, but in 
summary, a dual license is not realistic.
> https://github.com/nodejs/http-parser/issues/344
> So, a http_parser Swift port:
> - Would not have the proper license to be included in Swift
> - Does not take full advantage of Swift
> - Has the issues previously pointed out (UnsafePointers, asserts, throws 
simulating gotos)
> - Does, however, demonstrate a Swift HTTP parser performance of 500K 
requests per second
> Looking forward to meeting everyone on our call tomorrow.  Hopefully 
this detail was helpful.
> Dave Sperling
> Smith Micro

swift-server-dev mailing list
swift-server-dev at swift.org

Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-server-dev/attachments/20161121/2dce7053/attachment.html>

More information about the swift-server-dev mailing list