[swift-evolution] HTTP webserver protocol's

Maxthon Chan xcvista at me.com
Mon Dec 7 11:59:58 CST 2015


I would suggest against implementing HTTP protocol directly unless you are willing to tackle complexities like TLS, HTTP/2 and even supporting other languages directly. We can implement the FastCGI protocol and let the user piece together the final website using a purpose-built Web server software that implements all above like nginx.

FastCGI is a mature protocol so it is safe and stable to track (while HTTP is receiving quick development in both HTTP/2 and TLS layers), has the benefit of being able to be executed on a separate machine from the Web server so vulnerability can be isolated and would be a natural fit for load balancing, and is widely used in hosting other languages like PHP, Python and Perl.

Sent from my iPad

> On Dec 8, 2015, at 00:24, Lukas Stabe via swift-evolution <swift-evolution at swift.org> wrote:
> 
> The [Nest project](https://github.com/nestproject/Nest) seems to aim to be something like this.
> 
> While I agree that a Rack/WSGI/Plack equivalent would be benificial to have, I don’t think it fits the current goals of the stdlib (providing basic data structures and algorithms) for now.
> 
> Lukas
> 
>> On 07 Dec 2015, at 16:27, John Siracusa via swift-evolution <swift-evolution at swift.org> wrote:
>> 
>> The very first thing I considered writing in Swift is an implementation of Plack (http://plackperl.org/). It seems like every language benefits from having something like this (Rack in Ruby, WSGI in Python, etc.), even if only to insulate web applications from the web server implementation. I'm not sure if a language benefits from having 20 things like this, at least in the long run…
>> 
>> -John
>> 
>> 
>>> On Mon, Dec 7, 2015 at 9:08 AM, Coen Wessels via swift-evolution <swift-evolution at swift.org> wrote:
>>> Since the linux port is available everybody is implementing their own HTTP server framework https://github.com/search?utf8=✓&q=http+language%3Aswift. I think introducing a default http web server protocol(swift protocol) in the stdlib, something like rack(ruby) or plug(elixir), would prevent a lot of fragmentation in interfaces.
>>>  
>>> _______________________________________________
>>> swift-evolution mailing list
>>> swift-evolution at swift.org
>>> https://lists.swift.org/mailman/listinfo/swift-evolution
>> 
>>  _______________________________________________
>> swift-evolution mailing list
>> swift-evolution at swift.org
>> https://lists.swift.org/mailman/listinfo/swift-evolution
> 
> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151208/7488fa57/attachment.html>


More information about the swift-evolution mailing list